available_phone_numbers
Creates, updates, deletes, gets or lists an available_phone_numbers resource.
Overview
| Name | available_phone_numbers |
| Type | Resource |
| Id | aws.chime.available_phone_numbers |
Fields
The following fields are returned by SELECT queries:
- search_available_phone_numbers
| Name | Datatype | Description |
|---|---|---|
e164_phone_number | string | List of phone numbers, in E.164 format. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
search_available_phone_numbers | select | region | area-code, city, country, state, toll-free-prefix, phone-number-type, max-results, next-token | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
area-code | string | The area code used to filter results. Only applies to the US. |
city | string | The city used to filter results. Only applies to the US. |
country | string | The country used to filter results. Defaults to the US Format: ISO 3166-1 alpha-2. |
max-results | integer | The maximum number of results to return in a single call. |
next-token | string | The token used to retrieve the next page of results. |
phone-number-type | string | The phone number type used to filter results. Required for non-US numbers. |
state | string | The state used to filter results. Required only if you provide City. Only applies to the US. |
toll-free-prefix | string | The toll-free prefix that you use to filter results. Only applies to the US. |
SELECT examples
- search_available_phone_numbers
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 }}'
;