ChimeSDKVoice / Client / batch_update_phone_number

batch_update_phone_number#

ChimeSDKVoice.Client.batch_update_phone_number(**kwargs)#

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

Note

You cannot have a duplicate phoneNumberId in a request.

See also: AWS API Documentation

Request Syntax

response = client.batch_update_phone_number(
    UpdatePhoneNumberRequestItems=[
        {
            'PhoneNumberId': 'string',
            'ProductType': 'VoiceConnector'|'SipMediaApplicationDialIn',
            'CallingName': 'string',
            'Name': 'string'
        },
    ]
)
Parameters:

UpdatePhoneNumberRequestItems (list) –

[REQUIRED]

Lists the phone numbers in the update request.

  • (dict) –

    The phone number ID, product type, or calling name fields to update, used with the BatchUpdatePhoneNumber and UpdatePhoneNumber actions.

    • PhoneNumberId (string) – [REQUIRED]

      The phone number ID to update.

    • ProductType (string) –

      The product type to update.

    • CallingName (string) –

      The outbound calling name to update.

    • Name (string) –

      The name of the phone number.

Return type:

dict

Returns:

Response Syntax

{
    'PhoneNumberErrors': [
        {
            'PhoneNumberId': 'string',
            'ErrorCode': 'BadRequest'|'Conflict'|'Forbidden'|'NotFound'|'PreconditionFailed'|'ResourceLimitExceeded'|'ServiceFailure'|'AccessDenied'|'ServiceUnavailable'|'Throttled'|'Throttling'|'Unauthorized'|'Unprocessable'|'VoiceConnectorGroupAssociationsExist'|'PhoneNumberAssociationsExist'|'Gone',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • PhoneNumberErrors (list) –

      A list of failed phone numbers and their error messages.

      • (dict) –

        If a phone number action fails for one or more of the phone numbers in a request, a list of the failed phone numbers is returned, along with error codes and error messages.

        • PhoneNumberId (string) –

          The phone number ID for which the action failed.

        • ErrorCode (string) –

          The error code.

        • ErrorMessage (string) –

          The error message.

Exceptions

  • ChimeSDKVoice.Client.exceptions.UnauthorizedClientException

  • ChimeSDKVoice.Client.exceptions.NotFoundException

  • ChimeSDKVoice.Client.exceptions.ForbiddenException

  • ChimeSDKVoice.Client.exceptions.BadRequestException

  • ChimeSDKVoice.Client.exceptions.ThrottledClientException

  • ChimeSDKVoice.Client.exceptions.ServiceUnavailableException

  • ChimeSDKVoice.Client.exceptions.ServiceFailureException