Skip to main content

available_phone_numbers

Creates, updates, deletes, gets or lists an available_phone_numbers resource.

Overview

Nameavailable_phone_numbers
TypeResource
Idaws.chime.available_phone_numbers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
e164_phone_numberstringList of phone numbers, in E.164 format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
search_available_phone_numbersselectregionarea-code, city, country, state, toll-free-prefix, phone-number-type, max-results, next-tokenSearches 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
area-codestringThe area code used to filter results. Only applies to the US.
citystringThe city used to filter results. Only applies to the US.
countrystringThe country used to filter results. Defaults to the US Format: ISO 3166-1 alpha-2.
max-resultsintegerThe maximum number of results to return in a single call.
next-tokenstringThe token used to retrieve the next page of results.
phone-number-typestringThe phone number type used to filter results. Required for non-US numbers.
statestringThe state used to filter results. Required only if you provide City. Only applies to the US.
toll-free-prefixstringThe toll-free prefix that you use to filter results. Only applies to the US.

SELECT examples

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.

SELECT
e164_phone_number
FROM aws.chime.available_phone_numbers
WHERE region = '{{ region }}' -- required
AND `area-code` = '{{ area-code }}'
AND city = '{{ city }}'
AND country = '{{ country }}'
AND state = '{{ state }}'
AND `toll-free-prefix` = '{{ toll-free-prefix }}'
AND `phone-number-type` = '{{ phone-number-type }}'
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
;