deletePhoneNumber method

Future<void> deletePhoneNumber({
  1. required String phoneNumberId,
})

Moves the specified phone number into the Deletion queue. A phone number must be disassociated from any users or Amazon Chime Voice Connectors before it can be deleted.

Deleted phone numbers remain in the Deletion queue for 7 days before they are deleted permanently.

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

Parameter phoneNumberId : The phone number ID.

Implementation

Future<void> deletePhoneNumber({
  required String phoneNumberId,
}) async {
  ArgumentError.checkNotNull(phoneNumberId, 'phoneNumberId');
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/phone-numbers/${Uri.encodeComponent(phoneNumberId)}',
    exceptionFnMap: _exceptionFns,
  );
}