clusters
Creates, updates, deletes, gets or lists a clusters resource.
Overview
| Name | clusters |
| Type | Resource |
| Id | google.managedkafka.clusters |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id} |
brokerDetails | array | Output only. Only populated when FULL view is requested. Details of each broker in the cluster. |
capacityConfig | object | Required. Capacity configuration for the Kafka cluster. (id: CapacityConfig) |
createTime | string (google-datetime) | Output only. The time when the cluster was created. |
gcpConfig | object | Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform. (id: GcpConfig) |
kafkaVersion | string | Output only. Only populated when FULL view is requested. The Kafka version of the cluster. |
labels | object | Optional. Labels as key value pairs. |
rebalanceConfig | object | Optional. Rebalance configuration for the Kafka cluster. (id: RebalanceConfig) |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
state | string | Output only. The current state of the cluster. (STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING, UPDATING) |
tlsConfig | object | Optional. TLS configuration for the Kafka cluster. (id: TlsConfig) |
updateOptions | object | Optional. UpdateOptions represents options that control how updates to the cluster are applied. (id: UpdateOptions) |
updateTime | string (google-datetime) | Output only. The time when the cluster was last updated. |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, clustersId | view | Returns the properties of a single cluster. |
list | select | projectsId, locationsId | orderBy, pageSize, pageToken, filter | Lists the clusters in a given project and location. |
create | insert | projectsId, locationsId | clusterId, requestId | Creates a new cluster in a given project and location. |
patch | update | projectsId, locationsId, clustersId | requestId, updateMask | Updates the properties of a single cluster. |
delete | delete | projectsId, locationsId, clustersId | requestId | Deletes a single cluster. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
clustersId | string | |
locationsId | string | |
projectsId | string | |
clusterId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT examples
- get
- list
Returns the properties of a single cluster.
SELECT
name,
brokerDetails,
capacityConfig,
createTime,
gcpConfig,
kafkaVersion,
labels,
rebalanceConfig,
satisfiesPzi,
satisfiesPzs,
state,
tlsConfig,
updateOptions,
updateTime
FROM google.managedkafka.clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
AND view = '{{ view }}'
;
Lists the clusters in a given project and location.
SELECT
*
FROM google.managedkafka.clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a new cluster in a given project and location.
INSERT INTO google.managedkafka.clusters (
data__capacityConfig,
data__rebalanceConfig,
data__gcpConfig,
data__name,
data__updateOptions,
data__tlsConfig,
data__labels,
projectsId,
locationsId,
clusterId,
requestId
)
SELECT
'{{ capacityConfig }}',
'{{ rebalanceConfig }}',
'{{ gcpConfig }}',
'{{ name }}',
'{{ updateOptions }}',
'{{ tlsConfig }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ clusterId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the clusters resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the clusters resource.
- name: capacityConfig
description: |
Required. Capacity configuration for the Kafka cluster.
value:
vcpuCount: "{{ vcpuCount }}"
memoryBytes: "{{ memoryBytes }}"
- name: rebalanceConfig
description: |
Optional. Rebalance configuration for the Kafka cluster.
value:
mode: "{{ mode }}"
- name: gcpConfig
description: |
Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform.
value:
kmsKey: "{{ kmsKey }}"
accessConfig:
networkConfigs:
- subnet: "{{ subnet }}"
- name: name
value: "{{ name }}"
description: |
Identifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}
- name: updateOptions
description: |
Optional. UpdateOptions represents options that control how updates to the cluster are applied.
value:
allowBrokerDownscaleOnClusterUpscale: {{ allowBrokerDownscaleOnClusterUpscale }}
- name: tlsConfig
description: |
Optional. TLS configuration for the Kafka cluster.
value:
trustConfig:
casConfigs:
- caPool: "{{ caPool }}"
sslPrincipalMappingRules: "{{ sslPrincipalMappingRules }}"
- name: labels
value: "{{ labels }}"
description: |
Optional. Labels as key value pairs.
- name: clusterId
value: "{{ clusterId }}"
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Updates the properties of a single cluster.
UPDATE google.managedkafka.clusters
SET
data__capacityConfig = '{{ capacityConfig }}',
data__rebalanceConfig = '{{ rebalanceConfig }}',
data__gcpConfig = '{{ gcpConfig }}',
data__name = '{{ name }}',
data__updateOptions = '{{ updateOptions }}',
data__tlsConfig = '{{ tlsConfig }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single cluster.
DELETE FROM google.managedkafka.clusters
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND requestId = '{{ requestId }}'
;