updateTrafficDistribution method

Future<void> updateTrafficDistribution({
  1. required String id,
  2. AgentConfig? agentConfig,
  3. SignInConfig? signInConfig,
  4. TelephonyConfig? telephonyConfig,
})

Updates the traffic distribution for a given traffic distribution group. For more information about updating a traffic distribution group, see Update telephony traffic distribution across Amazon Web Services Regions in the Connect Customer Administrator Guide.

Important things to know

  • Invoke the UpdateTrafficDistribution API in the region that should handle traffic.

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

Parameter id : The identifier of the traffic distribution group. This can be the ID or the ARN if the API is being called in the Region where the traffic distribution group was created. The ARN must be provided if the call is from the replicated Region.

Parameter agentConfig : The distribution of agents between the instance and its replica(s).

Parameter signInConfig : The distribution that determines which Amazon Web Services Regions should be used to sign in agents in to both the instance and its replica(s).

Parameter telephonyConfig : The distribution of traffic between the instance and its replica(s).

Implementation

Future<void> updateTrafficDistribution({
  required String id,
  AgentConfig? agentConfig,
  SignInConfig? signInConfig,
  TelephonyConfig? telephonyConfig,
}) async {
  final $payload = <String, dynamic>{
    if (agentConfig != null) 'AgentConfig': agentConfig,
    if (signInConfig != null) 'SignInConfig': signInConfig,
    if (telephonyConfig != null) 'TelephonyConfig': telephonyConfig,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/traffic-distribution/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
}