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 | aws.msk.replicators |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ReplicatorName, ReplicationInfoList, KafkaClusters, ServiceExecutionRoleArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all replicators
in a region.
SELECT
region,
replicator_arn,
replicator_name,
current_version,
description,
kafka_clusters,
replication_info_list,
service_execution_role_arn,
tags
FROM aws.msk.replicators
WHERE region = 'us-east-1';
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 aws.msk.replicators
WHERE region = 'us-east-1' AND data__Identifier = '<ReplicatorArn>';
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 aws.msk.replicators (
ReplicatorName,
KafkaClusters,
ReplicationInfoList,
ServiceExecutionRoleArn,
region
)
SELECT
'{{ ReplicatorName }}',
'{{ KafkaClusters }}',
'{{ ReplicationInfoList }}',
'{{ ServiceExecutionRoleArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.msk.replicators (
ReplicatorName,
CurrentVersion,
Description,
KafkaClusters,
ReplicationInfoList,
ServiceExecutionRoleArn,
Tags,
region
)
SELECT
'{{ ReplicatorName }}',
'{{ CurrentVersion }}',
'{{ Description }}',
'{{ KafkaClusters }}',
'{{ ReplicationInfoList }}',
'{{ ServiceExecutionRoleArn }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: replicator
props:
- name: ReplicatorName
value: '{{ ReplicatorName }}'
- name: CurrentVersion
value: '{{ CurrentVersion }}'
- name: Description
value: '{{ Description }}'
- name: KafkaClusters
value:
- AmazonMskCluster:
MskClusterArn: '{{ MskClusterArn }}'
VpcConfig:
SecurityGroupIds:
- '{{ SecurityGroupIds[0] }}'
SubnetIds:
- '{{ SubnetIds[0] }}'
- name: ReplicationInfoList
value:
- SourceKafkaClusterArn: '{{ SourceKafkaClusterArn }}'
TargetKafkaClusterArn: '{{ TargetKafkaClusterArn }}'
TargetCompressionType: '{{ TargetCompressionType }}'
TopicReplication:
TopicsToReplicate:
- '{{ TopicsToReplicate[0] }}'
TopicsToExclude:
- '{{ TopicsToExclude[0] }}'
CopyTopicConfigurations: '{{ CopyTopicConfigurations }}'
CopyAccessControlListsForTopics: '{{ CopyAccessControlListsForTopics }}'
DetectAndCopyNewTopics: '{{ DetectAndCopyNewTopics }}'
StartingPosition:
Type: '{{ Type }}'
ConsumerGroupReplication:
ConsumerGroupsToReplicate:
- '{{ ConsumerGroupsToReplicate[0] }}'
ConsumerGroupsToExclude:
- '{{ ConsumerGroupsToExclude[0] }}'
SynchroniseConsumerGroupOffsets: '{{ SynchroniseConsumerGroupOffsets }}'
DetectAndCopyNewConsumerGroups: '{{ DetectAndCopyNewConsumerGroups }}'
- name: ServiceExecutionRoleArn
value: '{{ ServiceExecutionRoleArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.msk.replicators
WHERE data__Identifier = '<ReplicatorArn>'
AND region = 'us-east-1';
Permissions
To operate on the replicators
resource, the following permissions are required:
Create
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
Read
kafka:DescribeReplicator,
kafka:ListTagsForResource
Update
kafka:DescribeReplicator,
kafka:ListTagsForResource,
kafka:TagResource,
kafka:UntagResource,
kafka:UpdateReplicationInfo
Delete
kafka:DeleteReplicator,
kafka:DescribeReplicator,
kafka:ListTagsForResource,
kafka:UntagResource
List
kafka:ListReplicators