opt_out_lists
Creates, updates, deletes, gets or lists an opt_out_lists resource.
Overview
| Name | opt_out_lists |
| Type | Resource |
| Id | aws.pinpoint_sms_voice_v2.opt_out_lists |
Fields
The following fields are returned by SELECT queries:
- describe_opt_out_lists
| Name | Datatype | Description |
|---|---|---|
created_timestamp | string (date-time) | The time when the OutOutList was created, in UNIX epoch time format. |
opt_out_list_arn | string | The Amazon Resource Name (ARN) of the OptOutList. |
opt_out_list_name | string | The name of the OptOutList. (pattern: <code>[A-Za-z0-9_-]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_opt_out_lists | select | region | Describes the specified opt-out list or all opt-out lists in your account. If you specify opt-out list names, the output includes information for only the specified opt-out lists. Opt-out lists include only those that meet the filter criteria. If you don't specify opt-out list names or filters, the output includes information for all opt-out lists. If you specify an opt-out list name that isn't valid, an error is returned. | |
create_opt_out_list | insert | region, OptOutListName | Creates a new opt-out list. If the opt-out list name already exists, an error is returned. An opt-out list is a list of phone numbers that are opted out, meaning you can't send SMS or voice messages to them. If end user replies with the keyword "STOP," an entry for the phone number is added to the opt-out list. In addition to STOP, your recipients can use any supported opt-out keyword, such as CANCEL or OPTOUT. For a list of supported opt-out keywords, see SMS opt out in the End User Messaging SMS User Guide. | |
delete_opt_out_list | delete | region | Deletes an existing opt-out list. All opted out phone numbers in the opt-out list are deleted. If the specified opt-out list name doesn't exist or is in-use by an origination phone number or pool, 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_opt_out_lists
Describes the specified opt-out list or all opt-out lists in your account. If you specify opt-out list names, the output includes information for only the specified opt-out lists. Opt-out lists include only those that meet the filter criteria. If you don't specify opt-out list names or filters, the output includes information for all opt-out lists. If you specify an opt-out list name that isn't valid, an error is returned.
SELECT
created_timestamp,
opt_out_list_arn,
opt_out_list_name
FROM aws.pinpoint_sms_voice_v2.opt_out_lists
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_opt_out_list
- Manifest
Creates a new opt-out list. If the opt-out list name already exists, an error is returned. An opt-out list is a list of phone numbers that are opted out, meaning you can't send SMS or voice messages to them. If end user replies with the keyword "STOP," an entry for the phone number is added to the opt-out list. In addition to STOP, your recipients can use any supported opt-out keyword, such as CANCEL or OPTOUT. For a list of supported opt-out keywords, see SMS opt out in the End User Messaging SMS User Guide.
INSERT INTO aws.pinpoint_sms_voice_v2.opt_out_lists (
OptOutListName,
Tags,
ClientToken,
region
)
SELECT
'{{ OptOutListName }}' /* required */,
'{{ Tags }}',
'{{ ClientToken }}',
'{{ region }}'
RETURNING
created_timestamp,
opt_out_list_arn,
opt_out_list_name,
tags
;
# Description fields are for documentation purposes
- name: opt_out_lists
props:
- name: region
value: "{{ region }}"
description: Required parameter for the opt_out_lists resource.
- name: OptOutListName
value: "{{ OptOutListName }}"
description: |
The name of the new OptOutList.
- name: Tags
description: |
An array of tags (key and value pairs) to associate with the new OptOutList.
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_opt_out_list
Deletes an existing opt-out list. All opted out phone numbers in the opt-out list are deleted. If the specified opt-out list name doesn't exist or is in-use by an origination phone number or pool, an error is returned.
DELETE FROM aws.pinpoint_sms_voice_v2.opt_out_lists
WHERE region = '{{ region }}' --required
;