ChimeSDKVoice / Client / batch_update_phone_number

batch_update_phone_number#

ChimeSDKVoice.Client.batch_update_phone_number(**kwargs)#

Updates one or more phone numbers.

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