Chime / Client / update_phone_number

update_phone_number#

Chime.Client.update_phone_number(**kwargs)#

Updates phone number details, such as product type or calling name, for the specified phone number ID. You can update one phone number detail at a time. For example, you can update either the product type or the calling name in one action.

For toll-free numbers, you cannot use the Amazon Chime Business Calling product type. For numbers outside the U.S., you must use the Amazon Chime SIP Media Application Dial-In product type.

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

See also: AWS API Documentation

Request Syntax

response = client.update_phone_number(
    PhoneNumberId='string',
    ProductType='BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
    CallingName='string'
)
Parameters:
  • PhoneNumberId (string) –

    [REQUIRED]

    The phone number ID.

  • ProductType (string) – The product type.

  • CallingName (string) – The outbound calling name associated with the phone number.

Return type:

dict

Returns:

Response Syntax

{
    'PhoneNumber': {
        'PhoneNumberId': 'string',
        'E164PhoneNumber': 'string',
        'Country': 'string',
        'Type': 'Local'|'TollFree',
        'ProductType': 'BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
        'Status': 'AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
        'Capabilities': {
            'InboundCall': True|False,
            'OutboundCall': True|False,
            'InboundSMS': True|False,
            'OutboundSMS': True|False,
            'InboundMMS': True|False,
            'OutboundMMS': True|False
        },
        'Associations': [
            {
                'Value': 'string',
                'Name': 'AccountId'|'UserId'|'VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
                'AssociatedTimestamp': datetime(2015, 1, 1)
            },
        ],
        'CallingName': 'string',
        'CallingNameStatus': 'Unassigned'|'UpdateInProgress'|'UpdateSucceeded'|'UpdateFailed',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1),
        'DeletionTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • PhoneNumber (dict) –

      The updated phone number details.

      • PhoneNumberId (string) –

        The phone number ID.

      • E164PhoneNumber (string) –

        The phone number, in E.164 format.

      • Country (string) –

        The phone number country. Format: ISO 3166-1 alpha-2.

      • Type (string) –

        The phone number type.

      • ProductType (string) –

        The phone number product type.

      • Status (string) –

        The phone number status.

      • Capabilities (dict) –

        The phone number capabilities.

        • InboundCall (boolean) –

          Allows or denies inbound calling for the specified phone number.

        • OutboundCall (boolean) –

          Allows or denies outbound calling for the specified phone number.

        • InboundSMS (boolean) –

          Allows or denies inbound SMS messaging for the specified phone number.

        • OutboundSMS (boolean) –

          Allows or denies outbound SMS messaging for the specified phone number.

        • InboundMMS (boolean) –

          Allows or denies inbound MMS messaging for the specified phone number.

        • OutboundMMS (boolean) –

          Allows or denies outbound MMS messaging for the specified phone number.

      • Associations (list) –

        The phone number associations.

        • (dict) –

          The phone number associations, such as Amazon Chime account ID, Amazon Chime user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

          • Value (string) –

            Contains the ID for the entity specified in Name.

          • Name (string) –

            Defines the association with an Amazon Chime account ID, user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

          • AssociatedTimestamp (datetime) –

            The timestamp of the phone number association, in ISO 8601 format.

      • CallingName (string) –

        The outbound calling name associated with the phone number.

      • CallingNameStatus (string) –

        The outbound calling name status.

      • CreatedTimestamp (datetime) –

        The phone number creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) –

        The updated phone number timestamp, in ISO 8601 format.

      • DeletionTimestamp (datetime) –

        The deleted phone number timestamp, in ISO 8601 format.

Exceptions

  • Chime.Client.exceptions.UnauthorizedClientException

  • Chime.Client.exceptions.NotFoundException

  • Chime.Client.exceptions.ForbiddenException

  • Chime.Client.exceptions.BadRequestException

  • Chime.Client.exceptions.ThrottledClientException

  • Chime.Client.exceptions.ConflictException

  • Chime.Client.exceptions.ServiceUnavailableException

  • Chime.Client.exceptions.ServiceFailureException