cluster_links
Creates, updates, deletes, gets or lists a cluster_links resource.
Overview
| Name | cluster_links |
| Type | Resource |
| Id | confluent.kafka.cluster_links |
Fields
The following fields are returned by SELECT queries:
- get_kafka_link
- list_kafka_links
Single link name and properties
| Name | Datatype | Description |
|---|---|---|
cluster_link_id | string | |
destination_cluster_id | string | |
link_id | string | |
remote_cluster_id | string | |
source_cluster_id | string | |
link_name | string | |
category_counts | array | |
kind | string | |
link_error | string | |
link_error_message | string | |
link_state | string | |
metadata | object | |
tasks | array | |
topic_names | array |
A list of link names and properties
| Name | Datatype | Description |
|---|---|---|
cluster_link_id | string | |
destination_cluster_id | string | |
link_id | string | |
remote_cluster_id | string | |
source_cluster_id | string | |
link_name | string | |
category_counts | array | |
kind | string | |
link_error | string | |
link_error_message | string | |
link_state | string | |
metadata | object | |
tasks | array | |
topic_names | array |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_kafka_link | select | cluster_id, link_name, kafka_endpoint_id, region, cloud_provider | include_tasks | link_id in ListLinksResponseData is deprecated and may be removed in a future release. Use the new cluster_link_id instead. |
list_kafka_links | select | cluster_id, kafka_endpoint_id, region, cloud_provider | link_id in ListLinksResponseData is deprecated and may be removed in a future release. Use the new cluster_link_id instead. | |
create_kafka_link | insert | link_name, cluster_id, kafka_endpoint_id, region, cloud_provider | validate_only, validate_link | Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. |
delete_kafka_link | delete | cluster_id, link_name, kafka_endpoint_id, region, cloud_provider | force, validate_only |
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) |
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) |
link_name | string | The link name (example: link-sb1) |
region | string | Cloud region the cluster runs in, e.g. ap-southeast-2 (from the cluster spec.region). (default: region) |
force | boolean | Force the action. Default: false (example: false) |
include_tasks | boolean | Whether to include cluster linking tasks in the response. Default: false (example: false) |
validate_link | boolean | To synchronously validate that the source cluster ID is expected and the dest cluster has the permission to read topics in the source cluster. Default: true (example: false) |
validate_only | boolean | To validate the action can be performed successfully or not. Default: false (example: false) |
SELECT examples
- get_kafka_link
- list_kafka_links
link_id in ListLinksResponseData is deprecated and may be removed in a future release. Use the new cluster_link_id instead.
SELECT
cluster_link_id,
destination_cluster_id,
link_id,
remote_cluster_id,
source_cluster_id,
link_name,
category_counts,
kind,
link_error,
link_error_message,
link_state,
metadata,
tasks,
topic_names
FROM confluent.kafka.cluster_links
WHERE cluster_id = '{{ cluster_id }}' -- required
AND link_name = '{{ link_name }}' -- required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' -- required
AND region = '{{ region }}' -- required
AND cloud_provider = '{{ cloud_provider }}' -- required
AND include_tasks = '{{ include_tasks }}'
;
link_id in ListLinksResponseData is deprecated and may be removed in a future release. Use the new cluster_link_id instead.
SELECT
cluster_link_id,
destination_cluster_id,
link_id,
remote_cluster_id,
source_cluster_id,
link_name,
category_counts,
kind,
link_error,
link_error_message,
link_state,
metadata,
tasks,
topic_names
FROM confluent.kafka.cluster_links
WHERE cluster_id = '{{ cluster_id }}' -- required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' -- required
AND region = '{{ region }}' -- required
AND cloud_provider = '{{ cloud_provider }}' -- required
;
INSERT examples
- create_kafka_link
- Manifest
Cluster link creation requires source cluster security configurations in
the configs JSON section of the data request payload.
INSERT INTO confluent.kafka.cluster_links (
source_cluster_id,
destination_cluster_id,
remote_cluster_id,
cluster_link_id,
configs,
link_name,
cluster_id,
kafka_endpoint_id,
region,
cloud_provider,
validate_only,
validate_link
)
SELECT
'{{ source_cluster_id }}',
'{{ destination_cluster_id }}',
'{{ remote_cluster_id }}',
'{{ cluster_link_id }}',
'{{ configs }}',
'{{ link_name }}',
'{{ cluster_id }}',
'{{ kafka_endpoint_id }}',
'{{ region }}',
'{{ cloud_provider }}',
'{{ validate_only }}',
'{{ validate_link }}'
;
# Description fields are for documentation purposes
- name: cluster_links
props:
- name: link_name
value: "{{ link_name }}"
description: Required parameter for the cluster_links resource.
- name: cluster_id
value: "{{ cluster_id }}"
description: Required parameter for the cluster_links resource.
- name: kafka_endpoint_id
value: "{{ kafka_endpoint_id }}"
description: Required parameter for the cluster_links resource.
- name: region
value: "{{ region }}"
description: Required parameter for the cluster_links resource.
- name: cloud_provider
value: "{{ cloud_provider }}"
description: Required parameter for the cluster_links resource.
- name: source_cluster_id
value: "{{ source_cluster_id }}"
- name: destination_cluster_id
value: "{{ destination_cluster_id }}"
- name: remote_cluster_id
value: "{{ remote_cluster_id }}"
description: |
The expected remote cluster ID.
- name: cluster_link_id
value: "{{ cluster_link_id }}"
description: |
The expected cluster link ID. Can be provided when creating the second side of a bidirectional link for validating the link ID is as expected. If it's not provided, it's inferred from the remote cluster.
- name: configs
value:
- name: "{{ name }}"
value: "{{ value }}"
- name: validate_only
value: {{ validate_only }}
description: To validate the action can be performed successfully or not. Default: false (example: false)
description: To validate the action can be performed successfully or not. Default: false (example: false)
- name: validate_link
value: {{ validate_link }}
description: To synchronously validate that the source cluster ID is expected and the dest cluster has the permission to read topics in the source cluster. Default: true (example: false)
description: To synchronously validate that the source cluster ID is expected and the dest cluster has the permission to read topics in the source cluster. Default: true (example: false)
DELETE examples
- delete_kafka_link
DELETE FROM confluent.kafka.cluster_links
WHERE cluster_id = '{{ cluster_id }}' --required
AND link_name = '{{ link_name }}' --required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' --required
AND region = '{{ region }}' --required
AND cloud_provider = '{{ cloud_provider }}' --required
AND force = '{{ force }}'
AND validate_only = '{{ validate_only }}'
;