---
title: "Update deployment"
method: PATCH
path: "/preview/v2/deployments/{id}"
tags: ["Deployments"]
---

# Update deployment

`PATCH /preview/v2/deployments/{id}`

> ⚠️ This endpoint is in [public preview](/preview/roadmap).

Update a deployment's configuration.

## Path parameters

- `id` 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.

## Request body

- SfcApiPatchDeploymentRequest
  - `name` string
  - `instance_template` string — 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.
  - `target_instance_count` integer, nullable
  - `instance_name_template` string — 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.

## Response `200`

Deployment updated.

- SfcApiDeploymentResponse
  - `id` string, required
  - `resource_path` string, required — A resource path for a deployment resource. Format: sfc:deployment:<account>:<workspace>:<name>.
  - `owner` string, required
  - `workspace` string, required
  - `name` string, required
  - `object` 'deployment', required
  - `capacity` SfcApiCapacitySummary, required
    - `id` string, required
    - `name` string, required
  - `instance_template` SfcApiInstanceTemplateSummary, required
    - `id` string, required
    - `name` string, required
  - `target_instance_count` integer, required
  - `instance_name_template` string, required — 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.
  - `status` SfcApiReconciliationStatus, required
    - `state` 'info' | 'warning' | 'error', required
    - `message` string, required
  - `created_at` integer, required — Unix timestamp.
  - `updated_at` integer, required — Unix timestamp.

## Other responses

- `400` — Deployment with this name already exists.
- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Deployment not found.
- `422` — Validation failed.
- `500` — Internal server error.

---

[API](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation.md) · [All operations](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sfcompute/san-francisco-compute-documentation/revisions/93dd7661e9bb/schema)
