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.cloud_database.kafka_mirror_maker_replications |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Service ID |
emit_heartbeats | boolean | Defines whether heartbeats are emitted (wire: emitHeartbeats) |
enabled | boolean | Defines whether the replication is actived |
replication_policy_class | string | ReplicationPolicyClass used for the replication (org.apache.kafka.connect.mirror.DefaultReplicationPolicy, org.apache.kafka.connect.mirror.IdentityReplicationPolicy) (wire: replicationPolicyClass) |
source_integration | string (uuid) | ID of the integration source (wire: sourceIntegration) |
sync_group_offsets | boolean | Defines whether the group offsets must be sync (wire: syncGroupOffsets) |
sync_interval | integer | Defines the interval in second between 2 sync (wire: syncInterval) |
target_integration | string (uuid) | ID of the integration target (wire: targetIntegration) |
topic_exclude_list | array | Patterns of the topics to exclude from the replication (wire: topicExcludeList) |
topics | array | Patterns of the topics to replicate |
Cloud database service replication definition
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Service ID |
emit_heartbeats | boolean | Defines whether heartbeats are emitted (wire: emitHeartbeats) |
enabled | boolean | Defines whether the replication is actived |
replication_policy_class | string | ReplicationPolicyClass used for the replication (org.apache.kafka.connect.mirror.DefaultReplicationPolicy, org.apache.kafka.connect.mirror.IdentityReplicationPolicy) (wire: replicationPolicyClass) |
source_integration | string (uuid) | ID of the integration source (wire: sourceIntegration) |
sync_group_offsets | boolean | Defines whether the group offsets must be sync (wire: syncGroupOffsets) |
sync_interval | integer | Defines the interval in second between 2 sync (wire: syncInterval) |
target_integration | string (uuid) | ID of the integration target (wire: targetIntegration) |
topic_exclude_list | array | Patterns of the topics to exclude from the replication (wire: topicExcludeList) |
topics | array | Patterns of the topics to replicate |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | cluster_id, replication_id, service_name | Get kafkaMirrorMaker replication | |
list | select | cluster_id, service_name | x_pagination_mode | List replication of the kafkaMirrorMaker |
create | insert | cluster_id, service_name, enabled, source_integration, target_integration | Create a new replication | |
update | update | cluster_id, replication_id, service_name, enabled | Updates a replication | |
delete | delete | cluster_id, replication_id, service_name | Delete 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.
| 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"}}) |
cluster_id | string (uuid) | Cluster ID (wire: clusterId) |
replication_id | string (uuid) | Replication ID (wire: replicationId) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
List replication of the kafkaMirrorMaker
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 service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: kafka_mirror_maker_replications
props:
- name: cluster_id
value: "{{ cluster_id }}"
description: Required parameter for the kafka_mirror_maker_replications resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the kafka_mirror_maker_replications resource.
- name: emit_heartbeats
value: {{ emit_heartbeats }}
description: |
Defines whether heartbeats are emitted
- name: enabled
value: {{ enabled }}
description: |
Defines whether the replication is actived
- name: replication_policy_class
value: "{{ replication_policy_class }}"
description: |
ReplicationPolicyClass used for the replication
valid_values: ['org.apache.kafka.connect.mirror.DefaultReplicationPolicy', 'org.apache.kafka.connect.mirror.IdentityReplicationPolicy']
- name: source_integration
value: "{{ source_integration }}"
description: |
ID of the integration source
- name: sync_group_offsets
value: {{ sync_group_offsets }}
description: |
Defines whether the group offsets must be sync
- name: sync_interval
value: {{ sync_interval }}
description: |
Defines the interval in second between 2 sync
- name: target_integration
value: "{{ target_integration }}"
description: |
ID of the integration target
- name: topic_exclude_list
value:
- "{{ topic_exclude_list }}"
description: |
Patterns of the topics to exclude from the replication
- name: topics
value:
- "{{ topics }}"
description: |
Patterns of the topics to replicate
UPDATE examples​
- update
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
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
;