createReplicator method

Future<CreateReplicatorResponse> createReplicator({
  1. required List<KafkaCluster> kafkaClusters,
  2. required List<ReplicationInfo> replicationInfoList,
  3. required String replicatorName,
  4. required String serviceExecutionRoleArn,
  5. String? description,
  6. LogDelivery? logDelivery,
  7. Map<String, String>? tags,
})

Creates the replicator.

May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter kafkaClusters : Kafka Clusters to use in setting up sources / targets for replication.

Parameter replicationInfoList : A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow.

Parameter replicatorName : The name of the replicator. Alpha-numeric characters with '-' are allowed.

Parameter serviceExecutionRoleArn : The ARN of the IAM role used by the replicator to access resources in the customer's account (e.g source and target clusters)

Parameter description : A summary description of the replicator.

Parameter logDelivery : Configuration for delivering replicator logs to customer destinations.

Parameter tags : List of tags to attach to created Replicator.

Implementation

Future<CreateReplicatorResponse> createReplicator({
  required List<KafkaCluster> kafkaClusters,
  required List<ReplicationInfo> replicationInfoList,
  required String replicatorName,
  required String serviceExecutionRoleArn,
  String? description,
  LogDelivery? logDelivery,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'kafkaClusters': kafkaClusters,
    'replicationInfoList': replicationInfoList,
    'replicatorName': replicatorName,
    'serviceExecutionRoleArn': serviceExecutionRoleArn,
    if (description != null) 'description': description,
    if (logDelivery != null) 'logDelivery': logDelivery,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/replication/v1/replicators',
    exceptionFnMap: _exceptionFns,
  );
  return CreateReplicatorResponse.fromJson(response);
}