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.public_cloud_analytics.kafka_mirror_maker_replications

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the replication flow
source_integration_idstring (uuid)Identifier of the source integration (wire: sourceIntegrationId)
target_integration_idstring (uuid)Identifier of the target integration (wire: targetIntegrationId)
checksumstringHash of the resource used for concurrency control
created_atstring (date-time)Date at which the resource was created (wire: createdAt)
emit_heartbeatsbooleanWhether heartbeats are emitted on the replication flow (wire: emitHeartbeats)
enabledbooleanWhether this replication flow is enabled
replication_policy_classstringReplication policy class used for this replication flow (org.apache.kafka.connect.mirror.DefaultReplicationPolicy, org.apache.kafka.connect.mirror.IdentityReplicationPolicy) (wire: replicationPolicyClass)
sync_group_offsets_enabledbooleanWhether consumer group offsets are synced (wire: syncGroupOffsetsEnabled)
sync_intervalintegerSync interval in seconds (wire: syncInterval)
topic_exclude_listarrayList of topic patterns to exclude from replication (wire: topicExcludeList)
topic_include_listarrayList of topic patterns to include in replication (wire: topicIncludeList)
updated_atstring (date-time)Date of the last update to the resource (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectreplication_id, service_id, project_idReturns the source and target integrations of the flow, its topic patterns and its sync settings. (Beta version)
listselectservice_id, project_idx_pagination_cursor, x_pagination_sizeReturns the replication flows of the service, with their source and target integrations and whether they are enabled. (Beta version)
createinsertservice_id, project_id, enabled, source_integration_id, target_integration_idCreates a replication flow from a source integration to a target integration. Topics matching the include patterns are replicated, except those matching the exclude patterns. (Beta version)
updateupdatereplication_id, service_id, project_idPartially updates the topic patterns, sync settings or state of the flow. The source and target integrations cannot be changed. (Beta version)
deletedeletereplication_id, service_id, project_idDeletes the replication flow and stops the replication. (Beta version)
replaceexecreplicationId, serviceId, project_id, emitHeartbeats, enabled, replicationPolicyClass, syncGroupOffsetsEnabled, syncInterval, topicExcludeList, topicIncludeListUpdates the topic patterns, sync settings and state of the flow. Every field is required. The source and target integrations cannot be changed. (Beta version)

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"}})
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
replicationIdstring (uuid)Replication ID
replication_idstring (uuid)Replication ID (wire: replicationId)
serviceIdstring (uuid)Service ID
service_idstring (uuid)Service ID (wire: serviceId)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the source and target integrations of the flow, its topic patterns and its sync settings. (Beta version)

SELECT
id,
source_integration_id,
target_integration_id,
checksum,
created_at,
emit_heartbeats,
enabled,
replication_policy_class,
sync_group_offsets_enabled,
sync_interval,
topic_exclude_list,
topic_include_list,
updated_at
FROM ovh.public_cloud_analytics.kafka_mirror_maker_replications
WHERE replication_id = '{{ replication_id }}' -- required
AND service_id = '{{ service_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Creates a replication flow from a source integration to a target integration. Topics matching the include patterns are replicated, except those matching the exclude patterns. (Beta version)

INSERT INTO ovh.public_cloud_analytics.kafka_mirror_maker_replications (
emit_heartbeats,
enabled,
replication_policy_class,
source_integration_id,
sync_group_offsets_enabled,
sync_interval,
target_integration_id,
topic_exclude_list,
topic_include_list,
service_id,
project_id
)
SELECT
{{ emit_heartbeats }},
{{ enabled }} /* required */,
'{{ replication_policy_class }}',
'{{ source_integration_id }}' /* required */,
{{ sync_group_offsets_enabled }},
{{ sync_interval }},
'{{ target_integration_id }}' /* required */,
'{{ topic_exclude_list }}',
'{{ topic_include_list }}',
'{{ service_id }}',
'{{ project_id }}'
RETURNING
id,
source_integration_id,
target_integration_id,
checksum,
created_at,
emit_heartbeats,
enabled,
replication_policy_class,
sync_group_offsets_enabled,
sync_interval,
topic_exclude_list,
topic_include_list,
updated_at
;

UPDATE examples​

Partially updates the topic patterns, sync settings or state of the flow. The source and target integrations cannot be changed. (Beta version)

UPDATE ovh.public_cloud_analytics.kafka_mirror_maker_replications
SET
emit_heartbeats = {{ emit_heartbeats }},
enabled = {{ enabled }},
replication_policy_class = '{{ replication_policy_class }}',
sync_group_offsets_enabled = {{ sync_group_offsets_enabled }},
sync_interval = {{ sync_interval }},
topic_exclude_list = '{{ topic_exclude_list }}',
topic_include_list = '{{ topic_include_list }}'
WHERE
replication_id = '{{ replication_id }}' --required
AND service_id = '{{ service_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
RETURNING
id,
source_integration_id,
target_integration_id,
checksum,
created_at,
emit_heartbeats,
enabled,
replication_policy_class,
sync_group_offsets_enabled,
sync_interval,
topic_exclude_list,
topic_include_list,
updated_at;

DELETE examples​

Deletes the replication flow and stops the replication. (Beta version)

DELETE FROM ovh.public_cloud_analytics.kafka_mirror_maker_replications
WHERE replication_id = '{{ replication_id }}' --required
AND service_id = '{{ service_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Updates the topic patterns, sync settings and state of the flow. Every field is required. The source and target integrations cannot be changed. (Beta version)

EXEC ovh.public_cloud_analytics.kafka_mirror_maker_replications.replace
@replicationId='{{ replicationId }}' --required,
@serviceId='{{ serviceId }}' --required,
@project_id='{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"emitHeartbeats": {{ emitHeartbeats }},
"enabled": {{ enabled }},
"replicationPolicyClass": "{{ replicationPolicyClass }}",
"syncGroupOffsetsEnabled": {{ syncGroupOffsetsEnabled }},
"syncInterval": {{ syncInterval }},
"topicExcludeList": "{{ topicExcludeList }}",
"topicIncludeList": "{{ topicIncludeList }}"
}'
;