clusters
Creates, updates, deletes, gets or lists a clusters resource.
Overview
| Name | clusters |
| Type | Resource |
| Id | confluent.managed_kafka_clusters.clusters |
Fields
The following fields are returned by SELECT queries:
- get_cmk_v2_cluster
- list_cmk_v2_clusters
Cluster.
| Name | Datatype | Description |
|---|---|---|
id | string | ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de) |
api_version | string | APIVersion defines the schema version of this representation of a resource. (cmk/v2) |
kind | string | Kind defines the object this REST resource represents. (Cluster) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
spec | object | The desired state of the Cluster |
status | object | The status of the Cluster |
Cluster.
| Name | Datatype | Description |
|---|---|---|
id | string | ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de) |
api_version | string | APIVersion defines the schema version of this representation of a resource. (cmk/v2) |
kind | string | Kind defines the object this REST resource represents. (Cluster) |
metadata | object | ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. |
spec | object | The desired state of the Cluster |
status | object | The status of the Cluster |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_cmk_v2_cluster | select | environment, id | Make a request to read a cluster. | |
list_cmk_v2_clusters | select | environment | spec.network, page_size, page_token | Retrieve a sorted, filtered, paginated list of all clusters. |
create_cmk_v2_cluster | insert | spec | Make a request to create a cluster. | |
update_cmk_v2_cluster | update | id, spec | Make a request to update a cluster. | |
delete_cmk_v2_cluster | delete | environment, id | Make a request to delete a 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 |
|---|---|---|
environment | string | Scope the operation to the given environment. (example: env-00000) |
id | string | The unique identifier for the cluster. |
page_size | integer | A pagination size for collection requests. |
page_token | string | An opaque pagination token for collection requests. |
spec.network | array | Filter the results by exact match for spec.network. Pass multiple times to see results matching any of the values. (example: [n-00000, n-00001]) |
SELECT examples
- get_cmk_v2_cluster
- list_cmk_v2_clusters
Make a request to read a cluster.
SELECT
id,
api_version,
kind,
metadata,
spec,
status
FROM confluent.managed_kafka_clusters.clusters
WHERE environment = '{{ environment }}' -- required
AND id = '{{ id }}' -- required
;
Retrieve a sorted, filtered, paginated list of all clusters.
SELECT
id,
api_version,
kind,
metadata,
spec,
status
FROM confluent.managed_kafka_clusters.clusters
WHERE environment = '{{ environment }}' -- required
AND spec.network = '{{ spec.network }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create_cmk_v2_cluster
- Manifest
Make a request to create a cluster.
INSERT INTO confluent.managed_kafka_clusters.clusters (
spec
)
SELECT
'{{ spec }}' /* required */
RETURNING
id,
api_version,
kind,
metadata,
spec,
status
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: spec
description: |
The desired state of the Cluster
value:
display_name: "{{ display_name }}"
availability: "{{ availability }}"
cloud: "{{ cloud }}"
region: "{{ region }}"
config:
kind: "{{ kind }}"
max_ecku: {{ max_ecku }}
cku: {{ cku }}
encryption_key: "{{ encryption_key }}"
zones:
- "{{ zones }}"
kafka_bootstrap_endpoint: "{{ kafka_bootstrap_endpoint }}"
http_endpoint: "{{ http_endpoint }}"
api_endpoint: "{{ api_endpoint }}"
endpoints: "{{ endpoints }}"
environment:
id: "{{ id }}"
environment: "{{ environment }}"
related: "{{ related }}"
resource_name: "{{ resource_name }}"
network:
id: "{{ id }}"
environment: "{{ environment }}"
related: "{{ related }}"
resource_name: "{{ resource_name }}"
byok:
id: "{{ id }}"
related: "{{ related }}"
resource_name: "{{ resource_name }}"
UPDATE examples
- update_cmk_v2_cluster
Make a request to update a cluster.
UPDATE confluent.managed_kafka_clusters.clusters
SET
spec = '{{ spec }}'
WHERE
id = '{{ id }}' --required
AND spec = '{{ spec }}' --required
RETURNING
id,
api_version,
kind,
metadata,
spec,
status;
DELETE examples
- delete_cmk_v2_cluster
Make a request to delete a cluster.
DELETE FROM confluent.managed_kafka_clusters.clusters
WHERE environment = '{{ environment }}' --required
AND id = '{{ id }}' --required
;