Skip to main content

clusters

Creates, updates, deletes, gets or lists a clusters resource.

Overview

Nameclusters
TypeResource
Idgoogle.managedkafka.clusters

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the cluster. Structured like: projects/{project_number}/locations/{location}/clusters/{cluster_id}
capacityConfigobjectRequired. Capacity configuration for the Kafka cluster. (id: CapacityConfig)
createTimestring (google-datetime)Output only. The time when the cluster was created.
gcpConfigobjectRequired. Configuration properties for a Kafka cluster deployed to Google Cloud Platform. (id: GcpConfig)
labelsobjectOptional. Labels as key value pairs.
rebalanceConfigobjectOptional. Rebalance configuration for the Kafka cluster. (id: RebalanceConfig)
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
statestringOutput only. The current state of the cluster.
tlsConfigobjectOptional. TLS configuration for the Kafka cluster. (id: TlsConfig)
updateTimestring (google-datetime)Output only. The time when the cluster was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, clustersIdReturns the properties of a single cluster.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists the clusters in a given project and location.
createinsertprojectsId, locationsIdclusterId, requestIdCreates a new cluster in a given project and location.
patchupdateprojectsId, locationsId, clustersIdupdateMask, requestIdUpdates the properties of a single cluster.
deletedeleteprojectsId, locationsId, clustersIdrequestIdDeletes 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.

NameDatatypeDescription
clustersIdstring
locationsIdstring
projectsIdstring
clusterIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Returns the properties of a single cluster.

SELECT
name,
capacityConfig,
createTime,
gcpConfig,
labels,
rebalanceConfig,
satisfiesPzi,
satisfiesPzs,
state,
tlsConfig,
updateTime
FROM google.managedkafka.clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required;

INSERT examples

Creates a new cluster in a given project and location.

INSERT INTO google.managedkafka.clusters (
data__gcpConfig,
data__name,
data__labels,
data__capacityConfig,
data__rebalanceConfig,
data__tlsConfig,
projectsId,
locationsId,
clusterId,
requestId
)
SELECT
'{{ gcpConfig }}',
'{{ name }}',
'{{ labels }}',
'{{ capacityConfig }}',
'{{ rebalanceConfig }}',
'{{ tlsConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ clusterId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the properties of a single cluster.

UPDATE google.managedkafka.clusters
SET
data__gcpConfig = '{{ gcpConfig }}',
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__capacityConfig = '{{ capacityConfig }}',
data__rebalanceConfig = '{{ rebalanceConfig }}',
data__tlsConfig = '{{ tlsConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single cluster.

DELETE FROM google.managedkafka.clusters
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND requestId = '{{ requestId }}';