createTrafficDistributionGroup method
Creates a traffic distribution group given an Connect Customer instance that has been replicated. For more information about creating traffic distribution groups, see Set up traffic distribution groups 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 that has been replicated.
You can find the instanceId in the ARN of the instance.
Parameter name :
The name for the traffic distribution group.
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.
Parameter description :
A description for the traffic distribution group.
Parameter tags :
The tags used to organize, track, or control access for this resource. For
example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Implementation
Future<CreateTrafficDistributionGroupResponse>
createTrafficDistributionGroup({
required String instanceId,
required String name,
String? clientToken,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'InstanceId': instanceId,
'Name': name,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/traffic-distribution-group',
exceptionFnMap: _exceptionFns,
);
return CreateTrafficDistributionGroupResponse.fromJson(response);
}