associateTrafficDistributionGroupUser method

Future<void> associateTrafficDistributionGroupUser({
  1. required String instanceId,
  2. required String trafficDistributionGroupId,
  3. required String userId,
})

Associates an agent with a traffic distribution group. This API can be called only in the Region where the traffic distribution group is created.

May throw AccessDeniedException. May throw InternalServiceException. May throw InvalidRequestException. May throw ResourceConflictException. May throw ResourceNotFoundException. 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.

Parameter trafficDistributionGroupId : The identifier of the traffic distribution group. This can be the ID or the ARN of the traffic distribution group.

Parameter userId : The identifier of the user account. This can be the ID or the ARN of the user.

Implementation

Future<void> associateTrafficDistributionGroupUser({
  required String instanceId,
  required String trafficDistributionGroupId,
  required String userId,
}) async {
  final $payload = <String, dynamic>{
    'InstanceId': instanceId,
    'UserId': userId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/traffic-distribution-group/${Uri.encodeComponent(trafficDistributionGroupId)}/user',
    exceptionFnMap: _exceptionFns,
  );
}