replicators
Creates, updates, deletes or gets a replicator resource or lists replicators in a region
Overview
| Name | replicators |
| Type | Resource |
| Description | Resource Type definition for AWS::MSK::Replicator |
| Id | awscc.msk.replicators |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
replicator_arn | string | Amazon Resource Name for the created replicator. |
replicator_name | string | The name of the replicator. |
current_version | string | The current version of the MSK replicator. |
description | string | A summary description of the replicator. |
kafka_clusters | array | Specifies a list of Kafka clusters which are targets of the replicator. |
replication_info_list | array | A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow. |
service_execution_role_arn | string | The Amazon Resource Name (ARN) of the IAM role used by the replicator to access external resources. |
tags | array | A collection of tags associated with a resource |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
replicator_arn | string | Amazon Resource Name for the created replicator. |
region | string | AWS region. |
For more information, see AWS::MSK::Replicator.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | replicators | INSERT | ReplicatorName, ReplicationInfoList, KafkaClusters, ServiceExecutionRoleArn, region |
delete_resource | replicators | DELETE | Identifier, region |
update_resource | replicators | UPDATE | Identifier, PatchDocument, region |
list_resources | replicators_list_only | SELECT | region |
get_resource | replicators | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual replicator.
SELECT
region,
replicator_arn,
replicator_name,
current_version,
description,
kafka_clusters,
replication_info_list,
service_execution_role_arn,
tags
FROM awscc.msk.replicators
WHERE
region = 'us-east-1' AND
Identifier = '{{ replicator_arn }}';
Lists all replicators in a region.
SELECT
region,
replicator_arn
FROM awscc.msk.replicators_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new replicator resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.msk.replicators (
ReplicatorName,
KafkaClusters,
ReplicationInfoList,
ServiceExecutionRoleArn,
region
)
SELECT
'{{ replicator_name }}',
'{{ kafka_clusters }}',
'{{ replication_info_list }}',
'{{ service_execution_role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.msk.replicators (
ReplicatorName,
Description,
KafkaClusters,
ReplicationInfoList,
ServiceExecutionRoleArn,
Tags,
region
)
SELECT
'{{ replicator_name }}',
'{{ description }}',
'{{ kafka_clusters }}',
'{{ replication_info_list }}',
'{{ service_execution_role_arn }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: replicator
props:
- name: replicator_name
value: '{{ replicator_name }}'
- name: description
value: '{{ description }}'
- name: kafka_clusters
value:
- amazon_msk_cluster:
msk_cluster_arn: '{{ msk_cluster_arn }}'
vpc_config:
security_group_ids:
- '{{ security_group_ids[0] }}'
subnet_ids:
- '{{ subnet_ids[0] }}'
- name: replication_info_list
value:
- source_kafka_cluster_arn: '{{ source_kafka_cluster_arn }}'
target_kafka_cluster_arn: '{{ target_kafka_cluster_arn }}'
target_compression_type: '{{ target_compression_type }}'
topic_replication:
topics_to_replicate:
- '{{ topics_to_replicate[0] }}'
topics_to_exclude:
- '{{ topics_to_exclude[0] }}'
copy_topic_configurations: '{{ copy_topic_configurations }}'
copy_access_control_lists_for_topics: '{{ copy_access_control_lists_for_topics }}'
detect_and_copy_new_topics: '{{ detect_and_copy_new_topics }}'
starting_position:
type: '{{ type }}'
topic_name_configuration:
type: '{{ type }}'
consumer_group_replication:
consumer_groups_to_replicate:
- '{{ consumer_groups_to_replicate[0] }}'
consumer_groups_to_exclude:
- '{{ consumer_groups_to_exclude[0] }}'
synchronise_consumer_group_offsets: '{{ synchronise_consumer_group_offsets }}'
detect_and_copy_new_consumer_groups: '{{ detect_and_copy_new_consumer_groups }}'
- name: service_execution_role_arn
value: '{{ service_execution_role_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a replicator resource, using stack-deploy.
/*+ update */
UPDATE awscc.msk.replicators
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ replicator_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.msk.replicators
WHERE
Identifier = '{{ replicator_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the replicators resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
ec2:CreateNetworkInterface,
ec2:DescribeSecurityGroups,
ec2:DescribeSubnets,
ec2:DescribeVpcs,
iam:CreateServiceLinkedRole,
iam:PassRole,
kafka:CreateReplicator,
kafka:CreateReplicatorReference,
kafka:DescribeClusterV2,
kafka:DescribeReplicator,
kafka:GetBootstrapBrokers,
kafka:ListTagsForResource,
kafka:TagResource
kafka:DescribeReplicator,
kafka:ListTagsForResource
kafka:DescribeReplicator,
kafka:ListTagsForResource,
kafka:TagResource,
kafka:UntagResource,
kafka:UpdateReplicationInfo
kafka:DeleteReplicator,
kafka:DescribeReplicator,
kafka:ListTagsForResource,
kafka:UntagResource
kafka:ListReplicators