Amazon Connect Service

2023/07/28 - Amazon Connect Service - 4 updated api methods

Changes  This release adds support for new number types.

DescribePhoneNumber (updated) Link ¶
Changes (response)
{'ClaimedPhoneNumberSummary': {'PhoneNumberType': {'SHARED',
                                                   'THIRD_PARTY_DID',
                                                   'THIRD_PARTY_TF',
                                                   'UIFN'}}}

Gets details and status of a phone number that’s claimed to your Amazon Connect instance or traffic distribution group.

Warning

If the number is claimed to a traffic distribution group, and you are calling in the Amazon Web Services Region where the traffic distribution group was created, you can use either a phone number ARN or UUID value for the PhoneNumberId URI request parameter. However, if the number is claimed to a traffic distribution group and you are calling this API in the alternate Amazon Web Services Region associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will receive a ResourceNotFoundException .

See also: AWS API Documentation

Request Syntax

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

string

param PhoneNumberId

[REQUIRED]

A unique identifier for the phone number.

rtype

dict

returns

Response Syntax

{
    'ClaimedPhoneNumberSummary': {
        'PhoneNumberId': 'string',
        'PhoneNumberArn': 'string',
        'PhoneNumber': 'string',
        'PhoneNumberCountryCode': 'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
        'PhoneNumberType': 'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID',
        'PhoneNumberDescription': 'string',
        'TargetArn': 'string',
        'Tags': {
            'string': 'string'
        },
        'PhoneNumberStatus': {
            'Status': 'CLAIMED'|'IN_PROGRESS'|'FAILED',
            'Message': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • ClaimedPhoneNumberSummary (dict) --

      Information about a phone number that's been claimed to your Amazon Connect instance or traffic distribution group.

      • PhoneNumberId (string) --

        A unique identifier for the phone number.

      • PhoneNumberArn (string) --

        The Amazon Resource Name (ARN) of the phone number.

      • PhoneNumber (string) --

        The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code] .

      • PhoneNumberCountryCode (string) --

        The ISO country code.

      • PhoneNumberType (string) --

        The type of phone number.

      • PhoneNumberDescription (string) --

        The description of the phone number.

      • TargetArn (string) --

        The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.

      • Tags (dict) --

        The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

        • (string) --

          • (string) --

      • PhoneNumberStatus (dict) --

        The status of the phone number.

        • CLAIMED means the previous ClaimedPhoneNumber or UpdatePhoneNumber operation succeeded.

        • IN_PROGRESS means a ClaimedPhoneNumber or UpdatePhoneNumber operation is still in progress and has not yet completed. You can call DescribePhoneNumber at a later time to verify if the previous operation has completed.

        • FAILED indicates that the previous ClaimedPhoneNumber or UpdatePhoneNumber operation has failed. It will include a message indicating the failure reason. A common reason for a failure may be that the TargetArn value you are claiming or updating a phone number to has reached its limit of total claimed numbers. If you received a FAILED status from a ClaimPhoneNumber API call, you have one day to retry claiming the phone number before the number is released back to the inventory for other customers to claim.

        Note

        You will not be billed for the phone number during the 1-day period if number claiming fails.

        • Status (string) --

          The status.

        • Message (string) --

          The status message.

ListPhoneNumbers (updated) Link ¶
Changes (request, response)
Request
{'PhoneNumberTypes': {'UIFN', 'THIRD_PARTY_TF', 'THIRD_PARTY_DID', 'SHARED'}}
Response
{'PhoneNumberSummaryList': {'PhoneNumberType': {'SHARED',
                                                'THIRD_PARTY_DID',
                                                'THIRD_PARTY_TF',
                                                'UIFN'}}}

Provides information about the phone numbers for the specified Amazon Connect instance.

For more information about phone numbers, see Set Up Phone Numbers for Your Contact Center in the Amazon Connect Administrator Guide .

Warning

The phone number Arn value that is returned from each of the items in the PhoneNumberSummaryList cannot be used to tag phone number resources. It will fail with a ResourceNotFoundException . Instead, use the ListPhoneNumbersV2 API. It returns the new phone number ARN that can be used to tag phone number resources.

See also: AWS API Documentation

Request Syntax

client.list_phone_numbers(
    InstanceId='string',
    PhoneNumberTypes=[
        'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID',
    ],
    PhoneNumberCountryCodes=[
        'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
    ],
    NextToken='string',
    MaxResults=123
)
type InstanceId

string

param InstanceId

[REQUIRED]

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

type PhoneNumberTypes

list

param PhoneNumberTypes

The type of phone number.

  • (string) --

type PhoneNumberCountryCodes

list

param PhoneNumberCountryCodes

The ISO country code.

  • (string) --

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page. The default MaxResult size is 100.

rtype

dict

returns

Response Syntax

{
    'PhoneNumberSummaryList': [
        {
            'Id': 'string',
            'Arn': 'string',
            'PhoneNumber': 'string',
            'PhoneNumberType': 'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID',
            'PhoneNumberCountryCode': 'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'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berSummaryList (list) --

      Information about the phone numbers.

      • (dict) --

        Contains summary information about a phone number for a contact center.

        • Id (string) --

          The identifier of the phone number.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the phone number.

        • PhoneNumber (string) --

          The phone number.

        • PhoneNumberType (string) --

          The type of phone number.

        • PhoneNumberCountryCode (string) --

          The ISO country code.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

ListPhoneNumbersV2 (updated) Link ¶
Changes (request, response)
Request
{'PhoneNumberTypes': {'UIFN', 'THIRD_PARTY_TF', 'THIRD_PARTY_DID', 'SHARED'}}
Response
{'ListPhoneNumbersSummaryList': {'PhoneNumberType': {'SHARED',
                                                     'THIRD_PARTY_DID',
                                                     'THIRD_PARTY_TF',
                                                     'UIFN'}}}

Lists phone numbers claimed to your Amazon Connect instance or traffic distribution group. If the provided TargetArn is a traffic distribution group, you can call this API in both Amazon Web Services Regions associated with traffic distribution group.

For more information about phone numbers, see Set Up Phone Numbers for Your Contact Center in the Amazon Connect Administrator Guide .

See also: AWS API Documentation

Request Syntax

client.list_phone_numbers_v2(
    TargetArn='string',
    MaxResults=123,
    NextToken='string',
    PhoneNumberCountryCodes=[
        'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
    ],
    PhoneNumberTypes=[
        'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID',
    ],
    PhoneNumberPrefix='string'
)
type TargetArn

string

param TargetArn

The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to. If TargetArn input is not provided, this API lists numbers claimed to all the Amazon Connect instances belonging to your account in the same Amazon Web Services Region as the request.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page.

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type PhoneNumberCountryCodes

list

param PhoneNumberCountryCodes

The ISO country code.

  • (string) --

type PhoneNumberTypes

list

param PhoneNumberTypes

The type of phone number.

  • (string) --

type PhoneNumberPrefix

string

param PhoneNumberPrefix

The prefix of the phone number. If provided, it must contain + as part of the country code.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'ListPhoneNumbersSummaryList': [
        {
            'PhoneNumberId': 'string',
            'PhoneNumberArn': 'string',
            'PhoneNumber': 'string',
            'PhoneNumberCountryCode': 'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
            'PhoneNumberType': 'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID',
            'TargetArn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

    • ListPhoneNumbersSummaryList (list) --

      Information about phone numbers that have been claimed to your Amazon Connect instances or traffic distribution groups.

      • (dict) --

        Information about phone numbers that have been claimed to your Amazon Connect instance or traffic distribution group.

        • PhoneNumberId (string) --

          A unique identifier for the phone number.

        • PhoneNumberArn (string) --

          The Amazon Resource Name (ARN) of the phone number.

        • PhoneNumber (string) --

          The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code] .

        • PhoneNumberCountryCode (string) --

          The ISO country code.

        • PhoneNumberType (string) --

          The type of phone number.

        • TargetArn (string) --

          The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.

SearchAvailablePhoneNumbers (updated) Link ¶
Changes (request, response)
Request
{'PhoneNumberType': {'UIFN', 'THIRD_PARTY_TF', 'THIRD_PARTY_DID', 'SHARED'}}
Response
{'AvailableNumbersList': {'PhoneNumberType': {'SHARED',
                                              'THIRD_PARTY_DID',
                                              'THIRD_PARTY_TF',
                                              'UIFN'}}}

Searches for available phone numbers that you can claim to your Amazon Connect instance or traffic distribution group. If the provided TargetArn is a traffic distribution group, you can call this API in both Amazon Web Services Regions associated with the traffic distribution group.

See also: AWS API Documentation

Request Syntax

client.search_available_phone_numbers(
    TargetArn='string',
    PhoneNumberCountryCode='AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'BB'|'BY'|'BE'|'BZ'|'BJ'|'BM'|'BT'|'BO'|'BA'|'BW'|'BR'|'IO'|'VG'|'BN'|'BG'|'BF'|'BI'|'KH'|'CM'|'CA'|'CV'|'KY'|'CF'|'TD'|'CL'|'CN'|'CX'|'CC'|'CO'|'KM'|'CK'|'CR'|'HR'|'CU'|'CW'|'CY'|'CZ'|'CD'|'DK'|'DJ'|'DM'|'DO'|'TL'|'EC'|'EG'|'SV'|'GQ'|'ER'|'EE'|'ET'|'FK'|'FO'|'FJ'|'FI'|'FR'|'PF'|'GA'|'GM'|'GE'|'DE'|'GH'|'GI'|'GR'|'GL'|'GD'|'GU'|'GT'|'GG'|'GN'|'GW'|'GY'|'HT'|'HN'|'HK'|'HU'|'IS'|'IN'|'ID'|'IR'|'IQ'|'IE'|'IM'|'IL'|'IT'|'CI'|'JM'|'JP'|'JE'|'JO'|'KZ'|'KE'|'KI'|'KW'|'KG'|'LA'|'LV'|'LB'|'LS'|'LR'|'LY'|'LI'|'LT'|'LU'|'MO'|'MK'|'MG'|'MW'|'MY'|'MV'|'ML'|'MT'|'MH'|'MR'|'MU'|'YT'|'MX'|'FM'|'MD'|'MC'|'MN'|'ME'|'MS'|'MA'|'MZ'|'MM'|'NA'|'NR'|'NP'|'NL'|'AN'|'NC'|'NZ'|'NI'|'NE'|'NG'|'NU'|'KP'|'MP'|'NO'|'OM'|'PK'|'PW'|'PA'|'PG'|'PY'|'PE'|'PH'|'PN'|'PL'|'PT'|'PR'|'QA'|'CG'|'RE'|'RO'|'RU'|'RW'|'BL'|'SH'|'KN'|'LC'|'MF'|'PM'|'VC'|'WS'|'SM'|'ST'|'SA'|'SN'|'RS'|'SC'|'SL'|'SG'|'SX'|'SK'|'SI'|'SB'|'SO'|'ZA'|'KR'|'ES'|'LK'|'SD'|'SR'|'SJ'|'SZ'|'SE'|'CH'|'SY'|'TW'|'TJ'|'TZ'|'TH'|'TG'|'TK'|'TO'|'TT'|'TN'|'TR'|'TM'|'TC'|'TV'|'VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
    PhoneNumberType='TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID',
    PhoneNumberPrefix='string',
    MaxResults=123,
    NextToken='string'
)
type TargetArn

string

param TargetArn

[REQUIRED]

The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.

type PhoneNumberCountryCode

string

param PhoneNumberCountryCode

[REQUIRED]

The ISO country code.

type PhoneNumberType

string

param PhoneNumberType

[REQUIRED]

The type of phone number.

type PhoneNumberPrefix

string

param PhoneNumberPrefix

The prefix of the phone number. If provided, it must contain + as part of the country code.

type MaxResults

integer

param MaxResults

The maximum number of results to return per page.

type NextToken

string

param NextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'AvailableNumbersList': [
        {
            'PhoneNumber': 'string',
            'PhoneNumberCountryCode': 'AF'|'AL'|'DZ'|'AS'|'AD'|'AO'|'AI'|'AQ'|'AG'|'AR'|'AM'|'AW'|'AU'|'AT'|'AZ'|'BS'|'BH'|'BD'|'B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VI'|'UG'|'UA'|'AE'|'GB'|'US'|'UY'|'UZ'|'VU'|'VA'|'VE'|'VN'|'WF'|'EH'|'YE'|'ZM'|'ZW',
            'PhoneNumberType': 'TOLL_FREE'|'DID'|'UIFN'|'SHARED'|'THIRD_PARTY_TF'|'THIRD_PARTY_DID'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.

    • AvailableNumbersList (list) --

      A list of available phone numbers that you can claim to your Amazon Connect instance or traffic distribution group.

      • (dict) --

        Information about available phone numbers.

        • PhoneNumber (string) --

          The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code] .

        • PhoneNumberCountryCode (string) --

          The ISO country code.

        • PhoneNumberType (string) --

          The type of phone number.