Skip to main content

replicators

Creates, updates, deletes or gets a replicator resource or lists replicators in a region

Overview

Namereplicators
TypeResource
DescriptionResource Type definition for AWS::MSK::Replicator
Idawscc.msk.replicators

Fields

NameDatatypeDescription
replicator_arnstringAmazon Resource Name for the created replicator.
replicator_namestringThe name of the replicator.
current_versionstringThe current version of the MSK replicator.
descriptionstringA summary description of the replicator.
kafka_clustersarraySpecifies a list of Kafka clusters which are targets of the replicator.
replication_info_listarrayA list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow.
service_execution_role_arnstringThe Amazon Resource Name (ARN) of the IAM role used by the replicator to access external resources.
tagsarrayA collection of tags associated with a resource
regionstringAWS region.

For more information, see AWS::MSK::Replicator.

Methods

NameResourceAccessible byRequired Params
create_resourcereplicatorsINSERTReplicatorName, ReplicationInfoList, KafkaClusters, ServiceExecutionRoleArn, region
delete_resourcereplicatorsDELETEIdentifier, region
update_resourcereplicatorsUPDATEIdentifier, PatchDocument, region
list_resourcesreplicators_list_onlySELECTregion
get_resourcereplicatorsSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ replicator_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new replicator resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.msk.replicators (
ReplicatorName,
KafkaClusters,
ReplicationInfoList,
ServiceExecutionRoleArn,
region
)
SELECT
'{{ replicator_name }}',
'{{ kafka_clusters }}',
'{{ replication_info_list }}',
'{{ service_execution_role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.msk.replicators
WHERE
Identifier = '{{ replicator_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the replicators resource, the following permissions are required:

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