kafka_mirror_maker_replications
Creates, updates, deletes, gets or lists a kafka_mirror_maker_replications resource.
Overview​
| Name | kafka_mirror_maker_replications |
| Type | Resource |
| Id | ovh.public_cloud_analytics.kafka_mirror_maker_replications |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the replication flow |
source_integration_id | string (uuid) | Identifier of the source integration (wire: sourceIntegrationId) |
target_integration_id | string (uuid) | Identifier of the target integration (wire: targetIntegrationId) |
checksum | string | Hash of the resource used for concurrency control |
created_at | string (date-time) | Date at which the resource was created (wire: createdAt) |
emit_heartbeats | boolean | Whether heartbeats are emitted on the replication flow (wire: emitHeartbeats) |
enabled | boolean | Whether this replication flow is enabled |
replication_policy_class | string | Replication policy class used for this replication flow (org.apache.kafka.connect.mirror.DefaultReplicationPolicy, org.apache.kafka.connect.mirror.IdentityReplicationPolicy) (wire: replicationPolicyClass) |
sync_group_offsets_enabled | boolean | Whether consumer group offsets are synced (wire: syncGroupOffsetsEnabled) |
sync_interval | integer | Sync interval in seconds (wire: syncInterval) |
topic_exclude_list | array | List of topic patterns to exclude from replication (wire: topicExcludeList) |
topic_include_list | array | List of topic patterns to include in replication (wire: topicIncludeList) |
updated_at | string (date-time) | Date of the last update to the resource (wire: updatedAt) |
A replication flow on a managed Kafka MirrorMaker service
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the replication flow |
source_integration_id | string (uuid) | Identifier of the source integration (wire: sourceIntegrationId) |
target_integration_id | string (uuid) | Identifier of the target integration (wire: targetIntegrationId) |
checksum | string | Hash of the resource used for concurrency control |
created_at | string (date-time) | Date at which the resource was created (wire: createdAt) |
emit_heartbeats | boolean | Whether heartbeats are emitted on the replication flow (wire: emitHeartbeats) |
enabled | boolean | Whether this replication flow is enabled |
replication_policy_class | string | Replication policy class used for this replication flow (org.apache.kafka.connect.mirror.DefaultReplicationPolicy, org.apache.kafka.connect.mirror.IdentityReplicationPolicy) (wire: replicationPolicyClass) |
sync_group_offsets_enabled | boolean | Whether consumer group offsets are synced (wire: syncGroupOffsetsEnabled) |
sync_interval | integer | Sync interval in seconds (wire: syncInterval) |
topic_exclude_list | array | List of topic patterns to exclude from replication (wire: topicExcludeList) |
topic_include_list | array | List of topic patterns to include in replication (wire: topicIncludeList) |
updated_at | string (date-time) | Date of the last update to the resource (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | replication_id, service_id, project_id | Returns the source and target integrations of the flow, its topic patterns and its sync settings. (Beta version) | |
list | select | service_id, project_id | x_pagination_cursor, x_pagination_size | Returns the replication flows of the service, with their source and target integrations and whether they are enabled. (Beta version) |
create | insert | service_id, project_id, enabled, source_integration_id, target_integration_id | 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) | |
update | update | replication_id, service_id, project_id | Partially updates the topic patterns, sync settings or state of the flow. The source and target integrations cannot be changed. (Beta version) | |
delete | delete | replication_id, service_id, project_id | Deletes the replication flow and stops the replication. (Beta version) | |
replace | exec | replicationId, serviceId, project_id, emitHeartbeats, enabled, replicationPolicyClass, syncGroupOffsetsEnabled, syncInterval, topicExcludeList, topicIncludeList | 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) |
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 |
|---|---|---|
api_host | string | The 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_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
replicationId | string (uuid) | Replication ID |
replication_id | string (uuid) | Replication ID (wire: replicationId) |
serviceId | string (uuid) | Service ID |
service_id | string (uuid) | Service ID (wire: serviceId) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
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
;
Returns the replication flows of the service, with their source and target integrations and whether they are enabled. (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 service_id = '{{ service_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: kafka_mirror_maker_replications
props:
- name: service_id
value: "{{ service_id }}"
description: Required parameter for the kafka_mirror_maker_replications resource.
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the kafka_mirror_maker_replications resource.
- name: emit_heartbeats
value: {{ emit_heartbeats }}
description: |
Whether heartbeats are emitted on the replication flow
- name: enabled
value: {{ enabled }}
description: |
Whether this replication flow is enabled
- name: replication_policy_class
value: "{{ replication_policy_class }}"
description: |
Replication policy class used for this replication flow
valid_values: ['org.apache.kafka.connect.mirror.DefaultReplicationPolicy', 'org.apache.kafka.connect.mirror.IdentityReplicationPolicy']
- name: source_integration_id
value: "{{ source_integration_id }}"
description: |
Identifier of the source integration
- name: sync_group_offsets_enabled
value: {{ sync_group_offsets_enabled }}
description: |
Whether to sync consumer group offsets
- name: sync_interval
value: {{ sync_interval }}
description: |
Sync interval in seconds
- name: target_integration_id
value: "{{ target_integration_id }}"
description: |
Identifier of the target integration
- name: topic_exclude_list
value:
- "{{ topic_exclude_list }}"
description: |
Topic patterns to exclude from replication
- name: topic_include_list
value:
- "{{ topic_include_list }}"
description: |
Topic patterns to include in replication
UPDATE examples​
- update
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​
- delete
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.
- replace
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 }}"
}'
;