consumer_groups
Creates, updates, deletes, gets or lists a consumer_groups resource.
Overview
| Name | consumer_groups |
| Type | Resource |
| Id | confluent.kafka.consumer_groups |
Fields
The following fields are returned by SELECT queries:
- get_kafka_consumer_group
- list_kafka_consumer_groups
The consumer group.
| Name | Datatype | Description |
|---|---|---|
cluster_id | string | |
consumer_group_id | string | |
consumers | object | |
coordinator | object | |
is_mixed_consumer_group | boolean | |
is_simple | boolean | |
kind | string | |
lag_summary | object | |
metadata | object | |
partition_assignor | string | |
state | string | |
type | string |
The list of consumer groups.
| Name | Datatype | Description |
|---|---|---|
cluster_id | string | |
consumer_group_id | string | |
consumers | object | |
coordinator | object | |
is_mixed_consumer_group | boolean | |
is_simple | boolean | |
kind | string | |
lag_summary | object | |
metadata | object | |
partition_assignor | string | |
state | string | |
type | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_kafka_consumer_group | select | cluster_id, consumer_group_id, kafka_endpoint_id, region, cloud_provider | Return the consumer group specified by the consumer_group_id. | |
list_kafka_consumer_groups | select | cluster_id, kafka_endpoint_id, region, cloud_provider | Return the list of consumer groups that belong to the specified Kafka 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 |
|---|---|---|
cloud_provider | string | Cloud provider, lowercase: aws, gcp, or azure (from the cluster spec.cloud). (default: cloud) |
cluster_id | string | The Kafka cluster ID. (example: cluster-1) |
consumer_group_id | string | The consumer group ID. (example: consumer-group-1) |
kafka_endpoint_id | string | Per-cluster Kafka REST endpoint ID (the pkc-* host prefix from the Confluent UI Cluster -> Overview -> REST endpoint, or extract from confluent.managed_kafka_clusters.clusters spec.http_endpoint). (default: pkc-00000) |
region | string | Cloud region the cluster runs in, e.g. ap-southeast-2 (from the cluster spec.region). (default: region) |
SELECT examples
- get_kafka_consumer_group
- list_kafka_consumer_groups
Return the consumer group specified by the consumer_group_id.
SELECT
cluster_id,
consumer_group_id,
consumers,
coordinator,
is_mixed_consumer_group,
is_simple,
kind,
lag_summary,
metadata,
partition_assignor,
state,
type
FROM confluent.kafka.consumer_groups
WHERE cluster_id = '{{ cluster_id }}' -- required
AND consumer_group_id = '{{ consumer_group_id }}' -- required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' -- required
AND region = '{{ region }}' -- required
AND cloud_provider = '{{ cloud_provider }}' -- required
;
Return the list of consumer groups that belong to the specified
Kafka cluster.
SELECT
cluster_id,
consumer_group_id,
consumers,
coordinator,
is_mixed_consumer_group,
is_simple,
kind,
lag_summary,
metadata,
partition_assignor,
state,
type
FROM confluent.kafka.consumer_groups
WHERE cluster_id = '{{ cluster_id }}' -- required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' -- required
AND region = '{{ region }}' -- required
AND cloud_provider = '{{ cloud_provider }}' -- required
;