---
title: "POST /v1/{+parent}/clusters"
method: POST
path: "/v1/{+parent}/clusters"
tags: ["projects"]
---

# POST /v1/{+parent}/clusters

`POST /v1/{+parent}/clusters`

Creates a new cluster in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `clusterId` string
- `requestId` string

## Request body

- Cluster — An Apache Kafka cluster deployed in a location.
  - `name` string — Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}
  - `updateOptions` UpdateOptions — UpdateOptions specifies options that influence how a cluster update is applied. These options control the behavior of the update process, rather than defining the desired end-state of a cluster.
    - `allowBrokerDownscaleOnClusterUpscale` boolean — Optional. If true, allows an update operation that increases the total vCPU and/or memory allocation of the cluster to significantly decrease the per-broker vCPU and/or memory allocation. This can result in reduced performance and availability. By default, the update operation will fail if an upscale request results in a vCPU or memory allocation for the brokers that is smaller than 90% of the current broker size.
  - `brokerDetails` BrokerDetails[] — Output only. Only populated when FULL view is requested. Details of each broker in the cluster.
    - `nodeId` string, int64 — Output only. The node id of the broker.
    - `brokerIndex` string, int64 — Output only. The index of the broker.
    - `rack` string — Output only. The rack of the broker.
  - `capacityConfig` CapacityConfig — A capacity configuration of a Kafka cluster.
    - `memoryBytes` string, int64 — Required. The memory to provision for the cluster in bytes. The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. Minimum: 3221225472 (3 GiB).
    - `vcpuCount` string, int64 — Required. The number of vCPUs to provision for the cluster. Minimum: 3.
  - `gcpConfig` GcpConfig — Configuration properties for a Kafka cluster deployed to Google Cloud Platform.
    - `kmsKey` string — Optional. Immutable. The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Structured like: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
    - `accessConfig` AccessConfig — The configuration of access to the Kafka cluster.
      - `networkConfigs` NetworkConfig[] — Required. Virtual Private Cloud (VPC) networks that must be granted direct access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 networks can be specified.
        - `subnet` string — Required. Name of the VPC subnet in which to create Private Service Connect (PSC) endpoints for the Kafka brokers and bootstrap address. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id} The subnet must be located in the same region as the Kafka cluster. The project may differ. Multiple subnets from the same parent network must not be specified.
  - `updateTime` string, google-datetime — Output only. The time when the cluster was last updated.
  - `tlsConfig` TlsConfig — The TLS configuration for the Kafka cluster.
    - `trustConfig` TrustConfig — Sources of CA certificates to install in the broker's truststore.
      - `casConfigs` CertificateAuthorityServiceConfig[] — Optional. Configuration for the Google Certificate Authority Service. Maximum 10.
        - `caPool` string — Required. The name of the CA pool to pull CA certificates from. Structured like: projects/{project}/locations/{location}/caPools/{ca_pool}. The CA pool does not need to be in the same project or location as the Kafka cluster.
    - `sslPrincipalMappingRules` string — Optional. A list of rules for mapping from SSL principal names to short names. These are applied in order by Kafka. Refer to the Apache Kafka documentation for `ssl.principal.mapping.rules` for the precise formatting details and syntax. Example: "RULE:^CN=(.*?),OU=ServiceUsers.*$/$1@example.com/,DEFAULT" This is a static Kafka broker configuration. Setting or modifying this field will trigger a rolling restart of the Kafka brokers to apply the change. An empty string means no rules are applied (Kafka default).
  - `labels` object — Optional. Labels as key value pairs.
  - `kafkaVersion` string — Output only. Only populated when FULL view is requested. The Kafka version of the cluster.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACTIVE' | 'DELETING' | 'UPDATING' — Output only. The current state of the cluster.
  - `satisfiesPzi` boolean — Output only. Reserved for future use.
  - `satisfiesPzs` boolean — Output only. Reserved for future use.
  - `createTime` string, google-datetime — Output only. The time when the cluster was created.
  - `rebalanceConfig` RebalanceConfig — Defines rebalancing behavior of a Kafka cluster.
    - `mode` 'MODE_UNSPECIFIED' | 'NO_REBALANCE' | 'AUTO_REBALANCE_ON_SCALE_UP' — Optional. The rebalance behavior for the cluster. When not specified, defaults to `NO_REBALANCE`.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/managedkafka.md) · [All operations](https://skmtc.net/google/apis/managedkafka/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/managedkafka/versions/ebfb70483869/schema)
