vw_clusters
Creates, updates, deletes, gets or lists a vw_clusters resource.
Overview
| Name | vw_clusters |
| Type | View |
| Id | confluent.managed_kafka_clusters.vw_clusters |
Fields
The following fields are returned by this view:
| Name | Datatype | Description |
|---|---|---|
environment | string | Environment ID used to scope the cluster list (required WHERE parameter; echoed back as a column). |
id | string | Cluster ID (e.g. lkc-50r5wn). |
kind | string | Object kind (always Cluster). |
api_version | string | Confluent API version (e.g. cmk/v2). |
display_name | string | Human-readable cluster name. |
availability | string | Cluster availability tier (e.g. LOW, HIGH). |
cloud | string | Cloud provider (AWS, GCP, AZURE). |
region | string | Cloud region the cluster runs in. |
config_kind | string | Cluster sizing kind (Basic, Standard, Enterprise, Dedicated, Freight). |
max_ecku | integer | Maximum eCKU count for elastic clusters. |
api_endpoint | string | Cluster REST API endpoint URL. |
http_endpoint | string | Cluster HTTP endpoint URL. |
kafka_bootstrap_endpoint | string | Kafka bootstrap endpoint URL (SASL_SSL://...). |
environment_id | string | ID of the environment that owns this cluster. |
environment_resource_name | string | Confluent Resource Name (CRN) of the owning environment. |
phase | string | Cluster lifecycle phase (e.g. PROVISIONED). |
created_at | string | Timestamp when the cluster was created (ISO 8601). |
updated_at | string | Timestamp when the cluster was last updated (ISO 8601). |
resource_name | string | Confluent Resource Name (CRN) for this cluster. |
self | string | Self-link URL for this cluster. |
Required Parameters
The following parameters are required by this view:
| Name | Datatype | Description |
|---|---|---|
environment | string | Environment ID used to scope the cluster list. |
SELECT Examples
SELECT
environment,
id,
kind,
api_version,
display_name,
availability,
cloud,
region,
config_kind,
max_ecku,
api_endpoint,
http_endpoint,
kafka_bootstrap_endpoint,
environment_id,
environment_resource_name,
phase,
created_at,
updated_at,
resource_name,
self
FROM confluent.managed_kafka_clusters.vw_clusters
WHERE environment = '{{ environment }}';
SQL Definition
- Sqlite3
- Postgres
SELECT
id,
kind,
api_version,
environment,
JSON_EXTRACT(spec, '$.display_name') AS display_name,
JSON_EXTRACT(spec, '$.availability') AS availability,
JSON_EXTRACT(spec, '$.cloud') AS cloud,
JSON_EXTRACT(spec, '$.region') AS region,
JSON_EXTRACT(spec, '$.config.kind') AS config_kind,
JSON_EXTRACT(spec, '$.config.max_ecku') AS max_ecku,
JSON_EXTRACT(spec, '$.api_endpoint') AS api_endpoint,
JSON_EXTRACT(spec, '$.http_endpoint') AS http_endpoint,
JSON_EXTRACT(spec, '$.kafka_bootstrap_endpoint') AS kafka_bootstrap_endpoint,
JSON_EXTRACT(spec, '$.environment.id') AS environment_id,
JSON_EXTRACT(spec, '$.environment.resource_name') AS environment_resource_name,
JSON_EXTRACT(status, '$.phase') AS phase,
JSON_EXTRACT(metadata, '$.created_at') AS created_at,
JSON_EXTRACT(metadata, '$.updated_at') AS updated_at,
JSON_EXTRACT(metadata, '$.resource_name') AS resource_name,
JSON_EXTRACT(metadata, '$.self') AS self
FROM confluent.managed_kafka_clusters.clusters
WHERE environment = '{{ environment }}'
SELECT
id,
kind,
api_version,
environment,
spec->>'display_name' AS display_name,
spec->>'availability' AS availability,
spec->>'cloud' AS cloud,
spec->>'region' AS region,
spec->'config'->>'kind' AS config_kind,
(spec->'config'->>'max_ecku')::integer AS max_ecku,
spec->>'api_endpoint' AS api_endpoint,
spec->>'http_endpoint' AS http_endpoint,
spec->>'kafka_bootstrap_endpoint' AS kafka_bootstrap_endpoint,
spec->'environment'->>'id' AS environment_id,
spec->'environment'->>'resource_name' AS environment_resource_name,
status->>'phase' AS phase,
metadata->>'created_at' AS created_at,
metadata->>'updated_at' AS updated_at,
metadata->>'resource_name' AS resource_name,
metadata->>'self' AS self
FROM confluent.managed_kafka_clusters.clusters
WHERE environment = '{{ environment }}'