v1

latestOpenAPI 3.1.02026-07-2665179189.7 KB
Deployments

Update deployment

⚠️ This endpoint is in public preview.

Update a deployment or spot deployment's configuration.

patch/preview/v2/deployments/{id}

Path parameters

string required

A resource path like 'sfc:deployment:acme:prod:my-deployment' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.

OR
string required

A resource path like 'sfc:spot_deployment:acme:prod:my-spot_deployment' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.

Example:depl_k3R-nX9vLm7Qp2Yw5Jd8F

Request body

namestring
instance_templatestring

A resource path like 'sfc:instance_template:acme:prod:my-instance_template' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.

enabledboolean nullable
target_instance_countinteger nullable
instance_name_templatestring

A name template using {{variable}} syntax. Available variables: {{adjective}} (~128 random adjectives), {{noun}} (~128 random nouns), {{nanoid(N)}} (N-character alphanumeric identifier, 1 ≤ N ≤ 21). The template must produce enough unique combinations to avoid collisions — equivalent to at least the default template {{adjective}}-{{noun}}-{{nanoid(6)}} (~1 quadrillion possibilities). Must start with an alphanumeric character. Resolved names are limited to 255 characters.

max_buy_price_dollars_per_node_hourstring

Price in dollars per node-hour, encoded as a decimal string. Prices are rounded to the nearest $0.000060/node-hour market tick. This is one microdollar per node-minute. Responses contain the rounded value with six decimal places. Inputs must contain a decimal point, be non-negative, and not exceed $500/node-hour.

Example request

{
  "name": "my-resource-name",
  "instance_template": "itmpl_k3R-nX9vLm7Qp2Yw5Jd8F",
  "instance_name_template": "my-fleet-{{nanoid(9)}}",
  "max_buy_price_dollars_per_node_hour": "1.500000"
}

Response

Deployment updated.

OR

Example response

{
  "id": "depl_k3R-nX9vLm7Qp2Yw5Jd8F",
  "resource_path": "sfc:deployment:<account_id>:<workspace>:<name>",
  "owner": "my-resource-name",
  "workspace": "my-resource-name",
  "workspace_id": "wksp_k3R-nX9vLm7Qp2Yw5Jd8F",
  "name": "my-resource-name",
  "capacity": {
    "id": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
    "name": "my-resource-name"
  },
  "pool": {
    "id": "pool_k3R-nX9vLm7Qp2Yw5Jd8F",
    "name": "my-resource-name"
  },
  "instance_sku": {
    "id": "isku_k3R-nX9vLm7Qp2Yw5Jd8F",
    "alias": "my-resource-name"
  },
  "instance_template": {
    "id": "itmpl_k3R-nX9vLm7Qp2Yw5Jd8F",
    "name": "my-resource-name"
  },
  "instance_name_template": "my-fleet-{{nanoid(9)}}",
  "created_at": 1738972800,
  "updated_at": 1738972800
}