Skip to main content

cluster_links

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

Overview

Namecluster_links
TypeResource
Idconfluent.kafka.cluster_links

Fields

The following fields are returned by SELECT queries:

Single link name and properties

NameDatatypeDescription
cluster_link_idstring
destination_cluster_idstring
link_idstring
remote_cluster_idstring
source_cluster_idstring
link_namestring
category_countsarray
kindstring
link_errorstring
link_error_messagestring
link_statestring
metadataobject
tasksarray
topic_namesarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_kafka_linkselectcluster_id, link_name, kafka_endpoint_id, region, cloud_providerinclude_taskslink_id in ListLinksResponseData is deprecated and may be removed in a future release. Use the new cluster_link_id instead.
list_kafka_linksselectcluster_id, kafka_endpoint_id, region, cloud_providerlink_id in ListLinksResponseData is deprecated and may be removed in a future release. Use the new cluster_link_id instead.
create_kafka_linkinsertlink_name, cluster_id, kafka_endpoint_id, region, cloud_providervalidate_only, validate_linkCluster link creation requires source cluster security configurations in
the configs JSON section of the data request payload.
delete_kafka_linkdeletecluster_id, link_name, kafka_endpoint_id, region, cloud_providerforce, 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.

NameDatatypeDescription
cloud_providerstringCloud provider, lowercase: aws, gcp, or azure (from the cluster spec.cloud). (default: cloud)
cluster_idstringThe Kafka cluster ID. (example: cluster-1)
kafka_endpoint_idstringPer-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)
regionstringCloud region the cluster runs in, e.g. ap-southeast-2 (from the cluster spec.region). (default: region)
forcebooleanForce the action. Default: false (example: false)
include_tasksbooleanWhether to include cluster linking tasks in the response. Default: false (example: false)
validate_onlybooleanTo validate the action can be performed successfully or not. Default: false (example: false)

SELECT examples

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 }}'
;

INSERT examples

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 }}'
;

DELETE examples

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 }}'
;