Amazon Chime

2019/05/28 - Amazon Chime - 5 updated api methods

Changes  Update chime client to latest version

GetPhoneNumber (updated) Link ¶
Changes (response)
{'PhoneNumber': {'Type': 'Local | TollFree'}}

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',
        'Type': 'Local'|'TollFree',
        'ProductType': 'BusinessCalling'|'VoiceConnector',
        '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',
                'AssociatedTimestamp': datetime(2015, 1, 1)
            },
        ],
        '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.

      • 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, or Amazon Chime Voice Connector 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, or Amazon Chime Voice Connector ID.

          • AssociatedTimestamp (datetime) --

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

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

ListPhoneNumbers (updated) Link ¶
Changes (response)
{'PhoneNumbers': {'Type': 'Local | TollFree'}}

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

See also: AWS API Documentation

Request Syntax

client.list_phone_numbers(
    Status='AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
    ProductType='BusinessCalling'|'VoiceConnector',
    FilterName='AccountId'|'UserId'|'VoiceConnectorId',
    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',
            'Type': 'Local'|'TollFree',
            'ProductType': 'BusinessCalling'|'VoiceConnector',
            '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',
                    'AssociatedTimestamp': datetime(2015, 1, 1)
                },
            ],
            '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.

        • 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, or Amazon Chime Voice Connector 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, or Amazon Chime Voice Connector ID.

            • AssociatedTimestamp (datetime) --

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

        • 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': {'Type': 'Local | TollFree'}}

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',
        'Type': 'Local'|'TollFree',
        'ProductType': 'BusinessCalling'|'VoiceConnector',
        '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',
                'AssociatedTimestamp': datetime(2015, 1, 1)
            },
        ],
        '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.

      • 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, or Amazon Chime Voice Connector 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, or Amazon Chime Voice Connector ID.

          • AssociatedTimestamp (datetime) --

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

      • 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)
{'TollFreePrefix': 'string'}

Searches phone numbers that can be ordered.

See also: AWS API Documentation

Request Syntax

client.search_available_phone_numbers(
    AreaCode='string',
    City='string',
    Country='string',
    State='string',
    TollFreePrefix='string',
    MaxResults=123,
    NextToken='string'
)
type AreaCode:

string

param AreaCode:

The area code used to filter results.

type City:

string

param City:

The city used to filter results.

type Country:

string

param Country:

The country used to filter results.

type State:

string

param State:

The state used to filter results.

type TollFreePrefix:

string

param TollFreePrefix:

The toll-free prefix that you use to filter results.

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

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

Response Structure

  • (dict) --

    • E164PhoneNumbers (list) --

      List of phone numbers, in E.164 format.

      • (string) --

UpdatePhoneNumber (updated) Link ¶
Changes (response)
{'PhoneNumber': {'Type': 'Local | TollFree'}}

Updates phone number details, such as product type, for the specified phone number ID. For toll-free numbers, you can use only the Amazon Chime Voice Connector product type.

See also: AWS API Documentation

Request Syntax

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

string

param PhoneNumberId:

[REQUIRED]

The phone number ID.

type ProductType:

string

param ProductType:

The product type.

rtype:

dict

returns:

Response Syntax

{
    'PhoneNumber': {
        'PhoneNumberId': 'string',
        'E164PhoneNumber': 'string',
        'Type': 'Local'|'TollFree',
        'ProductType': 'BusinessCalling'|'VoiceConnector',
        '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',
                'AssociatedTimestamp': datetime(2015, 1, 1)
            },
        ],
        '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.

      • 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, or Amazon Chime Voice Connector 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, or Amazon Chime Voice Connector ID.

          • AssociatedTimestamp (datetime) --

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

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