list_origination_numbers

SNS.Client.list_origination_numbers(**kwargs)

Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata. For more information about origination numbers, see Origination numbers in the Amazon SNS Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.list_origination_numbers(
    NextToken='string',
    MaxResults=123
)
Parameters
  • NextToken (string) -- Token that the previous ListOriginationNumbers request returns.
  • MaxResults (integer) -- The maximum number of origination numbers to return.
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'PhoneNumbers': [
        {
            'CreatedAt': datetime(2015, 1, 1),
            'PhoneNumber': 'string',
            'Status': 'string',
            'Iso2CountryCode': 'string',
            'RouteType': 'Transactional'|'Promotional'|'Premium',
            'NumberCapabilities': [
                'SMS'|'MMS'|'VOICE',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      A NextToken string is returned when you call the ListOriginationNumbers operation if additional pages of records are available.

    • PhoneNumbers (list) --

      A list of the calling account's verified and pending origination numbers.

      • (dict) --

        A list of phone numbers and their metadata.

        • CreatedAt (datetime) --

          The date and time when the phone number was created.

        • PhoneNumber (string) --

          The phone number.

        • Status (string) --

          The status of the phone number.

        • Iso2CountryCode (string) --

          The two-character code for the country or region, in ISO 3166-1 alpha-2 format.

        • RouteType (string) --

          The list of supported routes.

        • NumberCapabilities (list) --

          The capabilities of each phone number.

          • (string) -- Enum listing out all supported number capabilities.

Exceptions

  • SNS.Client.exceptions.InternalErrorException
  • SNS.Client.exceptions.AuthorizationErrorException
  • SNS.Client.exceptions.ThrottledException
  • SNS.Client.exceptions.InvalidParameterException
  • SNS.Client.exceptions.ValidationException