disassociatePhoneNumbersFromVoiceConnector method

Future<DisassociatePhoneNumbersFromVoiceConnectorResponse> disassociatePhoneNumbersFromVoiceConnector({
  1. required List<String> e164PhoneNumbers,
  2. required String voiceConnectorId,
})

Disassociates the specified phone numbers from the specified Amazon Chime Voice Connector.

May throw UnauthorizedClientException. May throw NotFoundException. May throw ForbiddenException. May throw BadRequestException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter e164PhoneNumbers : List of phone numbers, in E.164 format.

Parameter voiceConnectorId : The Amazon Chime Voice Connector ID.

Implementation

Future<DisassociatePhoneNumbersFromVoiceConnectorResponse>
    disassociatePhoneNumbersFromVoiceConnector({
  required List<String> e164PhoneNumbers,
  required String voiceConnectorId,
}) async {
  ArgumentError.checkNotNull(e164PhoneNumbers, 'e164PhoneNumbers');
  ArgumentError.checkNotNull(voiceConnectorId, 'voiceConnectorId');
  final $payload = <String, dynamic>{
    'E164PhoneNumbers': e164PhoneNumbers,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/voice-connectors/${Uri.encodeComponent(voiceConnectorId)}?operation=disassociate-phone-numbers',
    exceptionFnMap: _exceptionFns,
  );
  return DisassociatePhoneNumbersFromVoiceConnectorResponse.fromJson(
      response);
}