disassociateQueueEmailAddresses method

Future<void> disassociateQueueEmailAddresses({
  1. required List<String> emailAddressesId,
  2. required String instanceId,
  3. required String queueId,
  4. String? clientToken,
})

Removes the association between a set of email addresses and a queue. After disassociation, agents will no longer be able to select these email addresses as "From" addresses when replying to inbound email contacts or initiating outbound email contacts in this queue.

Important things to know

  • Agents will no longer see these email addresses in their "From" address selection options for this queue.
  • The email addresses themselves are not deleted from the instance, only their availability for agent selection in this queue is removed.
  • Changes take effect immediately and will affect the agent experience in the Contact Control Panel (CCP).

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

Parameter emailAddressesId : List of email address identifiers to disassociate from the queue. These are the unique identifiers of email addresses that should no longer be routed to this queue.

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 queueId : The identifier for the queue.

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<void> disassociateQueueEmailAddresses({
  required List<String> emailAddressesId,
  required String instanceId,
  required String queueId,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'EmailAddressesId': emailAddressesId,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/queues/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(queueId)}/disassociate-email-addresses',
    exceptionFnMap: _exceptionFns,
  );
}