opted_out_numbers
Creates, updates, deletes, gets or lists an opted_out_numbers resource.
Overview
| Name | opted_out_numbers |
| Type | Resource |
| Id | aws.pinpoint_sms_voice_v2.opted_out_numbers |
Fields
The following fields are returned by SELECT queries:
- describe_opted_out_numbers
| Name | Datatype | Description |
|---|---|---|
end_user_opted_out | boolean | This is set to true if it was the end recipient that opted out. |
opted_out_number | string | The phone number that is opted out. (pattern: <code>+?[1-9][0-9]{1,18}</code>) |
opted_out_timestamp | string (date-time) | The time that the op tout occurred, in UNIX epoch time format. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_opted_out_numbers | select | region | Describes the specified opted out destination numbers or all opted out destination numbers in an opt-out list. If you specify opted out numbers, the output includes information for only the specified opted out numbers. If you specify filters, the output includes information for only those opted out numbers that meet the filter criteria. If you don't specify opted out numbers or filters, the output includes information for all opted out destination numbers in your opt-out list. If you specify an opted out number that isn't valid, an exception is returned. | |
put_opted_out_number | replace | region, OptOutListName, OptedOutNumber | Creates an opted out destination phone number in the opt-out list. If the destination phone number isn't valid or if the specified opt-out list doesn't exist, an error is returned. | |
delete_opted_out_number | delete | region | Deletes an existing opted out destination phone number from the specified opt-out list. Each destination phone number can only be deleted once every 30 days. If the specified destination phone number doesn't exist or if the opt-out list doesn't exist, an error is returned. |
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_opted_out_numbers
Describes the specified opted out destination numbers or all opted out destination numbers in an opt-out list. If you specify opted out numbers, the output includes information for only the specified opted out numbers. If you specify filters, the output includes information for only those opted out numbers that meet the filter criteria. If you don't specify opted out numbers or filters, the output includes information for all opted out destination numbers in your opt-out list. If you specify an opted out number that isn't valid, an exception is returned.
SELECT
end_user_opted_out,
opted_out_number,
opted_out_timestamp
FROM aws.pinpoint_sms_voice_v2.opted_out_numbers
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_opted_out_number
Creates an opted out destination phone number in the opt-out list. If the destination phone number isn't valid or if the specified opt-out list doesn't exist, an error is returned.
REPLACE aws.pinpoint_sms_voice_v2.opted_out_numbers
SET
OptOutListName = '{{ OptOutListName }}',
OptedOutNumber = '{{ OptedOutNumber }}'
WHERE
region = '{{ region }}' --required
AND OptOutListName = '{{ OptOutListName }}' --required
AND OptedOutNumber = '{{ OptedOutNumber }}' --required
RETURNING
end_user_opted_out,
opt_out_list_arn,
opt_out_list_name,
opted_out_number,
opted_out_timestamp;
DELETE examples
- delete_opted_out_number
Deletes an existing opted out destination phone number from the specified opt-out list. Each destination phone number can only be deleted once every 30 days. If the specified destination phone number doesn't exist or if the opt-out list doesn't exist, an error is returned.
DELETE FROM aws.pinpoint_sms_voice_v2.opted_out_numbers
WHERE region = '{{ region }}' --required
;