---
title: "Update a cluster"
method: PUT
path: "/clusters/{clusterId}"
tags: ["Clusters"]
---

# Update a cluster

`PUT /clusters/{clusterId}`

User must have the CLUSTER_DEFINITION[UPDATE] permission.

Kafka virtual cluster lifecycle: removing all backends is a plain edit. On a deployed
virtual cluster the update is accepted (200) and the cluster moves to `lifecycleState`
`PENDING`: the gateway keeps serving the previous configuration, and the emptied
configuration cannot be deployed until at least one backend is added back (the deploy
endpoint rejects virtual clusters without backends).

## Request body

- UpdateCluster
  - `name` string
  - `description` string
  - `configuration` object

## Response `200`

Cluster updated

- Cluster
  - `id` string
  - `crossId` string — Portable identifier for cross-environment references. Immutable after creation.
  - `type` 'KAFKA_CLUSTER_STANDALONE' | 'KAFKA_CLUSTER' | 'KAFKA_VIRTUAL_CLUSTER'
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `name` string
  - `description` string
  - `configuration` object
  - `groups` string[]
  - `lifecycleState` 'UNDEPLOYED' | 'DEPLOYED' | 'PENDING' — Current lifecycle state of the cluster.
  - `deployedAt` string, date-time — Last deployment or undeployment timestamp.
  - `version` integer — Deployment version, incremented on each deploy.

## Other responses

- `default` — Generic error response

---

[API](https://skmtc.net/gravitee-io/apis/gravitee-io-apim-management-api-environments.md) · [All operations](https://skmtc.net/gravitee-io/apis/gravitee-io-apim-management-api-environments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gravitee-io/gravitee-io-apim-management-api-environments/versions/37e8cbe5f769/schema)
