verified_destination_numbers
Creates, updates, deletes, gets or lists a verified_destination_numbers resource.
Overview
| Name | verified_destination_numbers |
| Type | Resource |
| Id | aws.pinpoint_sms_voice_v2.verified_destination_numbers |
Fields
The following fields are returned by SELECT queries:
- describe_verified_destination_numbers
| Name | Datatype | Description |
|---|---|---|
created_timestamp | string (date-time) | The time when the destination phone number was created, in UNIX epoch time format. |
destination_phone_number | string | The verified destination phone number, in E.164 format. (pattern: <code>+?[1-9][0-9]{1,18}</code>) |
rcs_agent_id | string | The unique identifier of the RCS agent associated with the verified destination number. |
status | string | The status of the verified destination phone number. PENDING: The phone number hasn't been verified yet. VERIFIED: The phone number is verified and can receive messages. (PENDING, VERIFIED, UNSUPPORTED) |
verified_destination_number_arn | string | The Amazon Resource Name (ARN) for the verified destination phone number. |
verified_destination_number_id | string | The unique identifier for the verified destination phone number. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_verified_destination_numbers | select | region | Retrieves the specified verified destination numbers. | |
create_verified_destination_number | insert | region, DestinationPhoneNumber | You can only send messages to verified destination numbers when your account is in the sandbox. You can add up to 10 verified destination numbers. | |
delete_verified_destination_number | delete | region | Delete a verified destination phone number. | |
send_destination_number_verification_code | exec | region, VerifiedDestinationNumberId, VerificationChannel | Before you can send test messages to a verified destination phone number you need to opt-in the verified destination phone number. Creates a new text message with a verification code and send it to a verified destination phone number. Once you have the verification code use VerifyDestinationNumber to opt-in the verified destination phone number to receive messages. | |
verify_destination_number | exec | region, VerifiedDestinationNumberId, VerificationCode | Use the verification code that was received by the verified destination phone number to opt-in the verified destination phone number to receive more messages. |
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) |
SELECT examples
- describe_verified_destination_numbers
Retrieves the specified verified destination numbers.
SELECT
created_timestamp,
destination_phone_number,
rcs_agent_id,
status,
verified_destination_number_arn,
verified_destination_number_id
FROM aws.pinpoint_sms_voice_v2.verified_destination_numbers
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_verified_destination_number
- Manifest
You can only send messages to verified destination numbers when your account is in the sandbox. You can add up to 10 verified destination numbers.
INSERT INTO aws.pinpoint_sms_voice_v2.verified_destination_numbers (
DestinationPhoneNumber,
RcsAgentId,
Tags,
ClientToken,
region
)
SELECT
'{{ DestinationPhoneNumber }}' /* required */,
'{{ RcsAgentId }}',
'{{ Tags }}',
'{{ ClientToken }}',
'{{ region }}'
RETURNING
created_timestamp,
destination_phone_number,
rcs_agent_id,
status,
tags,
verified_destination_number_arn,
verified_destination_number_id
;
# Description fields are for documentation purposes
- name: verified_destination_numbers
props:
- name: region
value: "{{ region }}"
description: Required parameter for the verified_destination_numbers resource.
- name: DestinationPhoneNumber
value: "{{ DestinationPhoneNumber }}"
description: |
The verified destination phone number, in E.164 format.
- name: RcsAgentId
value: "{{ RcsAgentId }}"
description: |
The unique identifier of the RCS agent to associate with the verified destination number. You can use either the RcsAgentId or RcsAgentArn.
- name: Tags
description: |
An array of tags (key and value pairs) to associate with the destination number.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: ClientToken
value: "{{ ClientToken }}"
description: |
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
DELETE examples
- delete_verified_destination_number
Delete a verified destination phone number.
DELETE FROM aws.pinpoint_sms_voice_v2.verified_destination_numbers
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- send_destination_number_verification_code
- verify_destination_number
Before you can send test messages to a verified destination phone number you need to opt-in the verified destination phone number. Creates a new text message with a verification code and send it to a verified destination phone number. Once you have the verification code use VerifyDestinationNumber to opt-in the verified destination phone number to receive messages.
EXEC aws.pinpoint_sms_voice_v2.verified_destination_numbers.send_destination_number_verification_code
@region='{{ region }}' --required
@@json=
'{
"VerifiedDestinationNumberId": "{{ VerifiedDestinationNumberId }}",
"VerificationChannel": "{{ VerificationChannel }}",
"LanguageCode": "{{ LanguageCode }}",
"OriginationIdentity": "{{ OriginationIdentity }}",
"ConfigurationSetName": "{{ ConfigurationSetName }}",
"Context": "{{ Context }}",
"DestinationCountryParameters": "{{ DestinationCountryParameters }}"
}'
;
Use the verification code that was received by the verified destination phone number to opt-in the verified destination phone number to receive more messages.
EXEC aws.pinpoint_sms_voice_v2.verified_destination_numbers.verify_destination_number
@region='{{ region }}' --required
@@json=
'{
"VerifiedDestinationNumberId": "{{ VerifiedDestinationNumberId }}",
"VerificationCode": "{{ VerificationCode }}"
}'
;