Amazon Chime

2021/05/04 - Amazon Chime - 1 new 9 updated api methods

Changes  This release adds the ability to search for and order international phone numbers for Amazon Chime SIP media applications.

ListSupportedPhoneNumberCountries (new) Link ¶

Lists supported phone number countries.

See also: AWS API Documentation

Request Syntax

client.list_supported_phone_number_countries(
    ProductType='BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn'
)
type ProductType

string

param ProductType

[REQUIRED]

The phone number product type.

rtype

dict

returns

Response Syntax

{
    'PhoneNumberCountries': [
        {
            'CountryCode': 'string',
            'SupportedPhoneNumberTypes': [
                'Local'|'TollFree',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • PhoneNumberCountries (list) --

      The supported phone number countries.

      • (dict) --

        The phone number country.

        • CountryCode (string) --

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

        • SupportedPhoneNumberTypes (list) --

          The supported phone number types.

          • (string) --

BatchUpdatePhoneNumber (updated) Link ¶
Changes (request)
{'UpdatePhoneNumberRequestItems': {'ProductType': {'SipMediaApplicationDialIn'}}}

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

For toll-free numbers, you cannot use the Amazon Chime Business Calling product type. For numbers outside the US, 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

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

list

param UpdatePhoneNumberRequestItems

[REQUIRED]

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

  • (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.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • PhoneNumberErrors (list) --

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

      • (dict) --

        If the phone number action fails for one or more of the phone numbers in the request, a list of the 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.

CreatePhoneNumberOrder (updated) Link ¶
Changes (request, response)
Request
{'ProductType': {'SipMediaApplicationDialIn'}}
Response
{'PhoneNumberOrder': {'ProductType': {'SipMediaApplicationDialIn'}}}

Creates an order for phone numbers to be provisioned. For toll-free numbers, you cannot use the Amazon Chime Business Calling product type. For numbers outside the US, you must use the Amazon Chime SIP Media Application Dial-In product type.

See also: AWS API Documentation

Request Syntax

client.create_phone_number_order(
    ProductType='BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
    E164PhoneNumbers=[
        'string',
    ]
)
type ProductType

string

param ProductType

[REQUIRED]

The phone number product type.

type E164PhoneNumbers

list

param E164PhoneNumbers

[REQUIRED]

List of phone numbers, in E.164 format.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'PhoneNumberOrder': {
        'PhoneNumberOrderId': 'string',
        'ProductType': 'BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
        'Status': 'Processing'|'Successful'|'Failed'|'Partial',
        'OrderedPhoneNumbers': [
            {
                'E164PhoneNumber': 'string',
                'Status': 'Processing'|'Acquired'|'Failed'
            },
        ],
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • PhoneNumberOrder (dict) --

      The phone number order details.

      • PhoneNumberOrderId (string) --

        The phone number order ID.

      • ProductType (string) --

        The phone number order product type.

      • Status (string) --

        The status of the phone number order.

      • OrderedPhoneNumbers (list) --

        The ordered phone number details, such as the phone number in E.164 format and the phone number status.

        • (dict) --

          A phone number for which an order has been placed.

          • E164PhoneNumber (string) --

            The phone number, in E.164 format.

          • Status (string) --

            The phone number status.

      • CreatedTimestamp (datetime) --

        The phone number order creation time stamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The updated phone number order time stamp, in ISO 8601 format.

GetPhoneNumber (updated) Link ¶
Changes (response)
{'PhoneNumber': {'Country': 'string',
                 'ProductType': {'SipMediaApplicationDialIn'}}}

Retrieves details for the specified phone number ID, such as associations, capabilities, and product type.

See also: AWS API Documentation

Request Syntax

client.get_phone_number(
    PhoneNumberId='string'
)
type PhoneNumberId

string

param PhoneNumberId

[REQUIRED]

The phone number ID.

rtype

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 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.

GetPhoneNumberOrder (updated) Link ¶
Changes (response)
{'PhoneNumberOrder': {'ProductType': {'SipMediaApplicationDialIn'}}}

Retrieves details for the specified phone number order, such as the order creation timestamp, phone numbers in E.164 format, product type, and order status.

See also: AWS API Documentation

Request Syntax

client.get_phone_number_order(
    PhoneNumberOrderId='string'
)
type PhoneNumberOrderId

string

param PhoneNumberOrderId

[REQUIRED]

The ID for the phone number order.

rtype

dict

returns

Response Syntax

{
    'PhoneNumberOrder': {
        'PhoneNumberOrderId': 'string',
        'ProductType': 'BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
        'Status': 'Processing'|'Successful'|'Failed'|'Partial',
        'OrderedPhoneNumbers': [
            {
                'E164PhoneNumber': 'string',
                'Status': 'Processing'|'Acquired'|'Failed'
            },
        ],
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • PhoneNumberOrder (dict) --

      The phone number order details.

      • PhoneNumberOrderId (string) --

        The phone number order ID.

      • ProductType (string) --

        The phone number order product type.

      • Status (string) --

        The status of the phone number order.

      • OrderedPhoneNumbers (list) --

        The ordered phone number details, such as the phone number in E.164 format and the phone number status.

        • (dict) --

          A phone number for which an order has been placed.

          • E164PhoneNumber (string) --

            The phone number, in E.164 format.

          • Status (string) --

            The phone number status.

      • CreatedTimestamp (datetime) --

        The phone number order creation time stamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The updated phone number order time stamp, in ISO 8601 format.

ListPhoneNumberOrders (updated) Link ¶
Changes (response)
{'PhoneNumberOrders': {'ProductType': {'SipMediaApplicationDialIn'}}}

Lists the phone number orders for the administrator's Amazon Chime account.

See also: AWS API Documentation

Request Syntax

client.list_phone_number_orders(
    NextToken='string',
    MaxResults=123
)
type NextToken

string

param NextToken

The token to use to retrieve the next page of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call.

rtype

dict

returns

Response Syntax

{
    'PhoneNumberOrders': [
        {
            'PhoneNumberOrderId': 'string',
            'ProductType': 'BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
            'Status': 'Processing'|'Successful'|'Failed'|'Partial',
            'OrderedPhoneNumbers': [
                {
                    'E164PhoneNumber': 'string',
                    'Status': 'Processing'|'Acquired'|'Failed'
                },
            ],
            'CreatedTimestamp': datetime(2015, 1, 1),
            'UpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PhoneNumberOrders (list) --

      The phone number order details.

      • (dict) --

        The details of a phone number order created for Amazon Chime.

        • PhoneNumberOrderId (string) --

          The phone number order ID.

        • ProductType (string) --

          The phone number order product type.

        • Status (string) --

          The status of the phone number order.

        • OrderedPhoneNumbers (list) --

          The ordered phone number details, such as the phone number in E.164 format and the phone number status.

          • (dict) --

            A phone number for which an order has been placed.

            • E164PhoneNumber (string) --

              The phone number, in E.164 format.

            • Status (string) --

              The phone number status.

        • CreatedTimestamp (datetime) --

          The phone number order creation time stamp, in ISO 8601 format.

        • UpdatedTimestamp (datetime) --

          The updated phone number order time stamp, in ISO 8601 format.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

ListPhoneNumbers (updated) Link ¶
Changes (request, response)
Request
{'ProductType': {'SipMediaApplicationDialIn'}}
Response
{'PhoneNumbers': {'Country': 'string',
                  'ProductType': {'SipMediaApplicationDialIn'}}}

Lists the phone numbers for the specified Amazon Chime account, Amazon Chime user, Amazon Chime Voice Connector, or Amazon Chime Voice Connector group.

See also: AWS API Documentation

Request Syntax

client.list_phone_numbers(
    Status='AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
    ProductType='BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
    FilterName='AccountId'|'UserId'|'VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
    FilterValue='string',
    MaxResults=123,
    NextToken='string'
)
type Status

string

param Status

The phone number status.

type ProductType

string

param ProductType

The phone number product type.

type FilterName

string

param FilterName

The filter to use to limit the number of results.

type FilterValue

string

param FilterValue

The value to use for the filter.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call.

type NextToken

string

param NextToken

The token to use to retrieve the next page of results.

rtype

dict

returns

Response Syntax

{
    'PhoneNumbers': [
        {
            '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)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PhoneNumbers (list) --

      The phone number details.

      • (dict) --

        A phone number used for Amazon Chime Business Calling or an Amazon Chime Voice Connector.

        • 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.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

RestorePhoneNumber (updated) Link ¶
Changes (response)
{'PhoneNumber': {'Country': 'string',
                 'ProductType': {'SipMediaApplicationDialIn'}}}

Moves a phone number from the Deletion queue back into the phone number Inventory .

See also: AWS API Documentation

Request Syntax

client.restore_phone_number(
    PhoneNumberId='string'
)
type PhoneNumberId

string

param PhoneNumberId

[REQUIRED]

The phone number.

rtype

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 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.

SearchAvailablePhoneNumbers (updated) Link ¶
Changes (request, response)
Request
{'PhoneNumberType': 'Local | TollFree'}
Response
{'NextToken': 'string'}

Searches for phone numbers that can be ordered. For US numbers, provide at least one of the following search filters: AreaCode , City , State , or TollFreePrefix . If you provide City , you must also provide State . Numbers outside the US only support the PhoneNumberType filter, which you must use.

See also: AWS API Documentation

Request Syntax

client.search_available_phone_numbers(
    AreaCode='string',
    City='string',
    Country='string',
    State='string',
    TollFreePrefix='string',
    PhoneNumberType='Local'|'TollFree',
    MaxResults=123,
    NextToken='string'
)
type AreaCode

string

param AreaCode

The area code used to filter results. Only applies to the US.

type City

string

param City

The city used to filter results. Only applies to the US.

type Country

string

param Country

The country used to filter results. Defaults to the US Format: ISO 3166-1 alpha-2.

type State

string

param State

The state used to filter results. Required only if you provide City . Only applies to the US.

type TollFreePrefix

string

param TollFreePrefix

The toll-free prefix that you use to filter results. Only applies to the US.

type PhoneNumberType

string

param PhoneNumberType

The phone number type used to filter results. Required for non-US numbers.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call.

type NextToken

string

param NextToken

The token used to retrieve the next page of results.

rtype

dict

returns

Response Syntax

{
    'E164PhoneNumbers': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • E164PhoneNumbers (list) --

      List of phone numbers, in E.164 format.

      • (string) --

    • NextToken (string) --

      The token used to retrieve the next page of search results.

UpdatePhoneNumber (updated) Link ¶
Changes (request, response)
Request
{'ProductType': {'SipMediaApplicationDialIn'}}
Response
{'PhoneNumber': {'Country': 'string',
                 'ProductType': {'SipMediaApplicationDialIn'}}}

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

client.update_phone_number(
    PhoneNumberId='string',
    ProductType='BusinessCalling'|'VoiceConnector'|'SipMediaApplicationDialIn',
    CallingName='string'
)
type PhoneNumberId

string

param PhoneNumberId

[REQUIRED]

The phone number ID.

type ProductType

string

param ProductType

The product type.

type CallingName

string

param CallingName

The outbound calling name associated with the phone number.

rtype

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.