batchUpdatePhoneNumber method

Future<BatchUpdatePhoneNumberResponse> batchUpdatePhoneNumber({
  1. required List<UpdatePhoneNumberRequestItem> updatePhoneNumberRequestItems,
})

Updates phone number product types or calling names. You can update one attribute at a time for each UpdatePhoneNumberRequestItem. For example, you can update either the product type or the calling name.

For product types, choose from Amazon Chime Business Calling and Amazon Chime Voice Connector. For toll-free numbers, you must use the Amazon Chime Voice Connector product type.

Updates to outbound calling names can take up to 72 hours to complete. Pending updates to outbound calling names must be complete before you can request another update.

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

Parameter updatePhoneNumberRequestItems : The request containing the phone number IDs and product types or calling names to update.

Implementation

Future<BatchUpdatePhoneNumberResponse> batchUpdatePhoneNumber({
  required List<UpdatePhoneNumberRequestItem> updatePhoneNumberRequestItems,
}) async {
  ArgumentError.checkNotNull(
      updatePhoneNumberRequestItems, 'updatePhoneNumberRequestItems');
  final $payload = <String, dynamic>{
    'UpdatePhoneNumberRequestItems': updatePhoneNumberRequestItems,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/phone-numbers?operation=batch-update',
    exceptionFnMap: _exceptionFns,
  );
  return BatchUpdatePhoneNumberResponse.fromJson(response);
}