Updates a cluster within an instance. This method updates only the serveNodes for a Cluster, and can only be used on manually scaled clusters. To update autoscaled clusters or enable autoscaling via clusterConfig.cluster_autoscaling_config, use clusters.partialUpdateCluster.

### HTTP request

`PUT https://bigtableadmin.googleapis.com/v2/{name=projects/*/instances/*/clusters/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` The unique name of the cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "location": string, "state": enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#State`), "serveNodes": integer, "nodeScalingFactor": enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#NodeScalingFactor`), "defaultStorageType": enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#StorageType`), "encryptionConfig": { object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#EncryptionConfig`) }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "clusterConfig": { object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#ClusterConfig`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `location` | `string` Immutable. The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/{project}/locations/{zone}`. |
| `state` | ``enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#State`)`` Output only. The current state of the cluster. |
| `serveNodes` | `integer` The number of nodes in the cluster. If no value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization. |
| `nodeScalingFactor` | ``enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#NodeScalingFactor`)`` Immutable. The node scaling factor of this cluster. |
| `defaultStorageType` | ``enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#StorageType`)`` Immutable. The type of storage used by this cluster to serve its parent instance's tables, unless explicitly overridden. |
| `encryptionConfig` | ``object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#EncryptionConfig`)`` Immutable. The encryption configuration for CMEK-protected clusters. |
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `clusterConfig` | ``object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters#ClusterConfig`)`` Configuration for this cluster. |
| End of mutually exclusive fields. ||

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/bigtable.admin`
- `https://www.googleapis.com/auth/bigtable.admin.cluster`
- `https://www.googleapis.com/auth/bigtable.admin.instance`
- `https://www.googleapis.com/auth/cloud-bigtable.admin`
- `https://www.googleapis.com/auth/cloud-bigtable.admin.cluster`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).