Skip to main content

kafka_mirror_maker_replications

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

Overview​

Namekafka_mirror_maker_replications
TypeResource
Idovh.cloud_database.kafka_mirror_maker_replications

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Service ID
emit_heartbeatsbooleanDefines whether heartbeats are emitted (wire: emitHeartbeats)
enabledbooleanDefines whether the replication is actived
replication_policy_classstringReplicationPolicyClass used for the replication (org.apache.kafka.connect.mirror.DefaultReplicationPolicy, org.apache.kafka.connect.mirror.IdentityReplicationPolicy) (wire: replicationPolicyClass)
source_integrationstring (uuid)ID of the integration source (wire: sourceIntegration)
sync_group_offsetsbooleanDefines whether the group offsets must be sync (wire: syncGroupOffsets)
sync_intervalintegerDefines the interval in second between 2 sync (wire: syncInterval)
target_integrationstring (uuid)ID of the integration target (wire: targetIntegration)
topic_exclude_listarrayPatterns of the topics to exclude from the replication (wire: topicExcludeList)
topicsarrayPatterns of the topics to replicate

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcluster_id, replication_id, service_nameGet kafkaMirrorMaker replication
listselectcluster_id, service_namex_pagination_modeList replication of the kafkaMirrorMaker
createinsertcluster_id, service_name, enabled, source_integration, target_integrationCreate a new replication
updateupdatecluster_id, replication_id, service_name, enabledUpdates a replication
deletedeletecluster_id, replication_id, service_nameDelete an replication

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
cluster_idstring (uuid)Cluster ID (wire: clusterId)
replication_idstring (uuid)Replication ID (wire: replicationId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get kafkaMirrorMaker replication

SELECT
id,
emit_heartbeats,
enabled,
replication_policy_class,
source_integration,
sync_group_offsets,
sync_interval,
target_integration,
topic_exclude_list,
topics
FROM ovh.cloud_database.kafka_mirror_maker_replications
WHERE cluster_id = '{{ cluster_id }}' -- required
AND replication_id = '{{ replication_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a new replication

INSERT INTO ovh.cloud_database.kafka_mirror_maker_replications (
emit_heartbeats,
enabled,
replication_policy_class,
source_integration,
sync_group_offsets,
sync_interval,
target_integration,
topic_exclude_list,
topics,
cluster_id,
service_name
)
SELECT
{{ emit_heartbeats }},
{{ enabled }} /* required */,
'{{ replication_policy_class }}',
'{{ source_integration }}' /* required */,
{{ sync_group_offsets }},
{{ sync_interval }},
'{{ target_integration }}' /* required */,
'{{ topic_exclude_list }}',
'{{ topics }}',
'{{ cluster_id }}',
'{{ service_name }}'
RETURNING
id,
emit_heartbeats,
enabled,
replication_policy_class,
source_integration,
sync_group_offsets,
sync_interval,
target_integration,
topic_exclude_list,
topics
;

UPDATE examples​

Updates a replication

UPDATE ovh.cloud_database.kafka_mirror_maker_replications
SET
emit_heartbeats = {{ emit_heartbeats }},
enabled = {{ enabled }},
replication_policy_class = '{{ replication_policy_class }}',
sync_group_offsets = {{ sync_group_offsets }},
sync_interval = {{ sync_interval }},
topic_exclude_list = '{{ topic_exclude_list }}',
topics = '{{ topics }}'
WHERE
cluster_id = '{{ cluster_id }}' --required
AND replication_id = '{{ replication_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND enabled = {{ enabled }} --required
RETURNING
id,
emit_heartbeats,
enabled,
replication_policy_class,
source_integration,
sync_group_offsets,
sync_interval,
target_integration,
topic_exclude_list,
topics;

DELETE examples​

Delete an replication

DELETE FROM ovh.cloud_database.kafka_mirror_maker_replications
WHERE cluster_id = '{{ cluster_id }}' --required
AND replication_id = '{{ replication_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;