replicateInstance method

Future<ReplicateInstanceResponse> replicateInstance({
  1. required String instanceId,
  2. required String replicaAlias,
  3. required String replicaRegion,
  4. String? clientToken,
})

Replicates an Connect Customer instance in the specified Amazon Web Services Region and copies configuration information for Connect Customer resources across Amazon Web Services Regions.

For more information about replicating an Connect Customer instance, see Create a replica of your existing Connect Customer instance in the Connect Customer Administrator Guide.

May throw AccessDeniedException. May throw InternalServiceException. May throw InvalidRequestException. May throw ResourceConflictException. May throw ResourceNotFoundException. May throw ResourceNotReadyException. May throw ServiceQuotaExceededException. May throw ThrottlingException.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. You can provide the InstanceId, or the entire ARN.

Parameter replicaAlias : The alias for the replicated instance. The ReplicaAlias must be unique.

Parameter replicaRegion : The Amazon Web Services Region where to replicate the Connect Customer instance.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

Implementation

Future<ReplicateInstanceResponse> replicateInstance({
  required String instanceId,
  required String replicaAlias,
  required String replicaRegion,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'ReplicaAlias': replicaAlias,
    'ReplicaRegion': replicaRegion,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/instance/${Uri.encodeComponent(instanceId)}/replicate',
    exceptionFnMap: _exceptionFns,
  );
  return ReplicateInstanceResponse.fromJson(response);
}