curl --request PATCH \
--url https://api.sfcompute.com/v2/deployments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-resource-name",
"node_template": "ntmpl_k3R-nX9vLm7Qp2Yw5Jd8F",
"target_node_count": 123,
"node_name_template": "my-fleet-{{nanoid(9)}}"
}
'{
"id": "<string>",
"resource_path": "<string>",
"owner": "<string>",
"workspace": "<string>",
"name": "<string>",
"object": "deployment",
"capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"node_template": "ntmpl_k3R-nX9vLm7Qp2Yw5Jd8F",
"target_node_count": 123,
"node_name_template": "<string>",
"status": {
"state": "info",
"message": "<string>"
},
"created_at": 1738972800,
"updated_at": 1738972800
}Update a deployment’s configuration.
curl --request PATCH \
--url https://api.sfcompute.com/v2/deployments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-resource-name",
"node_template": "ntmpl_k3R-nX9vLm7Qp2Yw5Jd8F",
"target_node_count": 123,
"node_name_template": "my-fleet-{{nanoid(9)}}"
}
'{
"id": "<string>",
"resource_path": "<string>",
"owner": "<string>",
"workspace": "<string>",
"name": "<string>",
"object": "deployment",
"capacity": "cap_k3R-nX9vLm7Qp2Yw5Jd8F",
"node_template": "ntmpl_k3R-nX9vLm7Qp2Yw5Jd8F",
"target_node_count": 123,
"node_name_template": "<string>",
"status": {
"state": "info",
"message": "<string>"
},
"created_at": 1738972800,
"updated_at": 1738972800
}Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
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.
(depl_[0-9a-zA-Z_-]{1,21})|(sfc:deployment:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,3})"depl_k3R-nX9vLm7Qp2Yw5Jd8F"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
A resource path like 'sfc:node_template:acme:prod:my-node_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.
(ntmpl_[0-9a-zA-Z_-]{1,21})|(sfc:node_template:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,3})"ntmpl_k3R-nX9vLm7Qp2Yw5Jd8F"
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.
512"my-fleet-{{nanoid(9)}}"
Deployment updated.
depl_[0-9a-zA-Z_-]{1,21}"depl_k3R-nX9vLm7Qp2Yw5Jd8F"
A resource path for a deployment resource. Format: sfc:deployment:
sfc:deployment:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+"sfc:deployment:<account_id>:<workspace>:<name>"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
"deployment"ID (default) or expanded summary when using expand parameter
cap_[0-9a-zA-Z_-]{1,21}"cap_k3R-nX9vLm7Qp2Yw5Jd8F"
ID (default) or expanded summary when using expand parameter
ntmpl_[0-9a-zA-Z_-]{1,21}"ntmpl_k3R-nX9vLm7Qp2Yw5Jd8F"
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.
512"my-fleet-{{nanoid(9)}}"
Show child attributes
Unix timestamp.
1738972800
Unix timestamp.
1738972800