Skip to main content

opted_out_numbers

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

Overview

Nameopted_out_numbers
TypeResource
Idaws.pinpoint_sms_voice_v2.opted_out_numbers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
end_user_opted_outbooleanThis is set to true if it was the end recipient that opted out.
opted_out_numberstringThe phone number that is opted out. (pattern: <code>+?[1-9][0-9]{1,18}</code>)
opted_out_timestampstring (date-time)The time that the op tout occurred, in UNIX epoch time format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_opted_out_numbersselectregionDescribes 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_numberreplaceregion, OptOutListName, OptedOutNumberCreates 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_numberdeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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

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
;