Simulations

Update a resource using a right-sizing hint

Applies a right-sizing recommendation from GET /simulations/{simulationId}/right-sizing-hint to the targeted resource in one call. Pass the affectedResourceId and recommendedSlug from the hint response; the server validates the slug against the resource's available sizes before mutating anything.

Validation: Returns 400 UNKNOWN_SIZE with a list of valid slugs if recommendedSlug is not recognized for the resource's provider and type — so callers can pass the hint slug directly without a separate size lookup.

Supported resource types: compute, database, storage (any provider). GPU node-count hints (gpu-underutilized, gpu-saturated) and managed-API breakeven hints (gpu-api-breakeven) produce non-slug recommendedSlug values and cannot be applied via this endpoint. SQL Server Express databases are also excluded: their instance class and CPU-credit billing configuration must remain consistent. This route returns 400 UNSUPPORTED_RESIZE without changing the simulation for those resources.

Cross-provider alternatives: DigitalOcean slugs returned as cross-provider alternatives in right-sizing hints are accepted for non-DO resources; the resource's cost characteristics are updated to the DO tier without changing the provider field.

Requires write scope and ownership.

post/simulations/{simulationId}/apply-right-sizing

Request

  • Base URL: https://www.cloudworldmodel.ai/api
  • URL: https://www.cloudworldmodel.ai/api/simulations/{simulationId}/apply-right-sizing
  • Auth: one of:
    • HTTP bearer
    • API key in header X-PAYMENT
    • API key in header PAYMENT-SIGNATURE

Path parameters

simulationIdstring required

Simulation UUID

Request body

resourceIdstring required

ID of the resource to resize — use affectedResourceId from a right-sizing-hint response

recommendedSlugstring required

Size slug to apply — use recommendedSlug from a right-sizing-hint response (e.g. t3.small, n1-standard-1, s-1vcpu-2gb)

Example request

{
  "resourceId": "res-1",
  "recommendedSlug": "t3.small"
}

Response

Size applied successfully

resourceIdstring

ID of the resized resource

resourceNamestring

Display name of the resized resource

appliedSlugstring

The size slug that was applied

costMultipliernumber

Cost multiplier for the new size tier

isDoAlternativeboolean

True when the applied slug is a DigitalOcean cross-provider alternative

Changes

No recorded changes to this operation across all 1 revision of this API.