Retrieves a list of phone numbers that are available to request, based on the country, capabilities, and number type that you specify¶
Description¶
Retrieves a list of phone numbers that are available to request, based on the country, capabilities, and number type that you specify. You can optionally provide a number preference to return only numbers that match a specific digit pattern.
If no numbers match your search, this operation returns an empty list rather than an error. This operation currently supports only TEN_DLC number types in the US.
Usage¶
pinpointsmsvoicev2_list_available_phone_numbers(IsoCountryCode,
NumberCapabilities, NumberType, RegistrationId, NumberPreference,
NextToken, MaxResults)
Arguments¶
IsoCountryCode
[required] The two-character code, in ISO 3166-1 alpha-2 format, for the country or region in which to search for available phone numbers. This operation currently supports only US.
NumberCapabilities
[required] The capabilities to filter by, such as SMS. Only phone numbers that support all of the specified capabilities are returned.
NumberType
[required] The type of phone number to search for.
RegistrationId
The registration associated with the request. A registration is required for regulated number types. You can specify either:
- The unique identifier of the registration.
-
The Amazon Resource Name (ARN) of the registration.
-
NumberPreference
An optional selection preference used to return only phone numbers that match a specific digit pattern, such as numbers that start with, end with, or contain a particular sequence. You can specify at most one preference. Number preferences apply only to TEN_DLC numbers in the US.
NextToken
The token returned from a previous request to retrieve the next page of results.
MaxResults
The maximum number of results to return per page. If you don't specify a value, the default is 10.
Value¶
A list with the following syntax:
Request syntax¶
svc$list_available_phone_numbers(
IsoCountryCode = "string",
NumberCapabilities = list(
"SMS"|"VOICE"|"MMS"|"RCS"
),
NumberType = "TEN_DLC",
RegistrationId = "string",
NumberPreference = list(
list(
PreferenceType = list(
"StartsWith"|"EndsWith"|"Contains"|"ExactMatch"
),
Filter = list(
"string"
)
)
),
NextToken = "string",
MaxResults = 123
)