Skip to main content

consumer_groups

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

Overview

Nameconsumer_groups
TypeResource
Idgoogle.managedkafka.consumer_groups

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the consumer group. The consumer_group segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}
topicsobjectOptional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, clustersId, consumerGroupsIdReturns the properties of a single consumer group.
listselectprojectsId, locationsId, clustersIdpageSize, pageTokenLists the consumer groups in a given cluster.
patchupdateprojectsId, locationsId, clustersId, consumerGroupsIdupdateMaskUpdates the properties of a single consumer group.
deletedeleteprojectsId, locationsId, clustersId, consumerGroupsIdDeletes a single consumer group.

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
consumerGroupsIdstring
locationsIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Returns the properties of a single consumer group.

SELECT
name,
topics
FROM google.managedkafka.consumer_groups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
AND consumerGroupsId = '{{ consumerGroupsId }}' -- required;

UPDATE examples

Updates the properties of a single consumer group.

UPDATE google.managedkafka.consumer_groups
SET
data__name = '{{ name }}',
data__topics = '{{ topics }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND consumerGroupsId = '{{ consumerGroupsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
topics;

DELETE examples

Deletes a single consumer group.

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