contact_lists
Creates, updates, deletes, gets or lists a contact_lists resource.
Overview
| Name | contact_lists |
| Type | Resource |
| Id | aws.sesv2.contact_lists |
Fields
The following fields are returned by SELECT queries:
- get_contact_list
- list_contact_lists
| Name | Datatype | Description |
|---|---|---|
contact_list_name | string | The name of the contact list. |
created_timestamp | string (date-time) | A timestamp noting when the contact list was created. |
description | string | A description of what the contact list is about. |
last_updated_timestamp | string (date-time) | A timestamp noting the last time the contact list was updated. |
tags | array | The tags associated with a contact list. |
topics | array | An interest group, theme, or label within a list. A contact list can have multiple topics. |
| Name | Datatype | Description |
|---|---|---|
contact_lists | array | The available contact lists. |
next_token | string | A string token indicating that there might be additional contact lists available to be listed. Copy this token to a subsequent call to ListContactLists with the same parameters to retrieve the next page of contact lists. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_contact_list | select | contact_list_name, region | Returns contact list metadata. It does not return any information about the contacts present in the list. | |
list_contact_lists | select | region | PageSize, NextToken | Lists all of the contact lists available. If your output includes a "NextToken" field with a string value, this indicates there may be additional contacts on the filtered list - regardless of the number of contacts returned. |
create_contact_list | insert | region, ContactListName | Creates a contact list. | |
update_contact_list | update | contact_list_name, region | Updates contact list metadata. This operation does a complete replacement. | |
delete_contact_list | delete | contact_list_name, region | Deletes a contact list and all of the contacts on that list. |
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 |
|---|---|---|
contact_list_name | string | The name of the contact list. |
region | string | AWS region (default: us-east-1) |
NextToken | string | A string token indicating that there might be additional contact lists available to be listed. Use the token provided in the Response to use in the subsequent call to ListContactLists with the same parameters to retrieve the next page of contact lists. |
PageSize | integer | Maximum number of contact lists to return at once. Use this parameter to paginate results. If additional contact lists exist beyond the specified limit, the NextToken element is sent in the response. Use the NextToken value in subsequent requests to retrieve additional lists. |
SELECT examples
- get_contact_list
- list_contact_lists
Returns contact list metadata. It does not return any information about the contacts present in the list.
SELECT
contact_list_name,
created_timestamp,
description,
last_updated_timestamp,
tags,
topics
FROM aws.sesv2.contact_lists
WHERE contact_list_name = '{{ contact_list_name }}' -- required
AND region = '{{ region }}' -- required
;
Lists all of the contact lists available. If your output includes a "NextToken" field with a string value, this indicates there may be additional contacts on the filtered list - regardless of the number of contacts returned.
SELECT
contact_lists,
next_token
FROM aws.sesv2.contact_lists
WHERE region = '{{ region }}' -- required
AND PageSize = '{{ PageSize }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_contact_list
- Manifest
Creates a contact list.
INSERT INTO aws.sesv2.contact_lists (
ContactListName,
Topics,
Description,
Tags,
region
)
SELECT
'{{ ContactListName }}' /* required */,
'{{ Topics }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}'
;
# Description fields are for documentation purposes
- name: contact_lists
props:
- name: region
value: "{{ region }}"
description: Required parameter for the contact_lists resource.
- name: ContactListName
value: "{{ ContactListName }}"
- name: Topics
value:
- TopicName: "{{ TopicName }}"
DisplayName: "{{ DisplayName }}"
Description: "{{ Description }}"
DefaultSubscriptionStatus: "{{ DefaultSubscriptionStatus }}"
- name: Description
value: "{{ Description }}"
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_contact_list
Updates contact list metadata. This operation does a complete replacement.
UPDATE aws.sesv2.contact_lists
SET
Topics = '{{ Topics }}',
Description = '{{ Description }}'
WHERE
contact_list_name = '{{ contact_list_name }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_contact_list
Deletes a contact list and all of the contacts on that list.
DELETE FROM aws.sesv2.contact_lists
WHERE contact_list_name = '{{ contact_list_name }}' --required
AND region = '{{ region }}' --required
;