Skip to main content

contact_lists

Creates, updates, deletes, gets or lists a contact_lists resource.

Overview

Namecontact_lists
TypeResource
Idaws.sesv2.contact_lists

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
contact_list_namestringThe name of the contact list.
created_timestampstring (date-time)A timestamp noting when the contact list was created.
descriptionstringA description of what the contact list is about.
last_updated_timestampstring (date-time)A timestamp noting the last time the contact list was updated.
tagsarrayThe tags associated with a contact list.
topicsarrayAn interest group, theme, or label within a list. A contact list can have multiple topics.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_contact_listselectcontact_list_name, regionReturns contact list metadata. It does not return any information about the contacts present in the list.
list_contact_listsselectregionPageSize, NextTokenLists 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_listinsertregion, ContactListNameCreates a contact list.
update_contact_listupdatecontact_list_name, regionUpdates contact list metadata. This operation does a complete replacement.
delete_contact_listdeletecontact_list_name, regionDeletes 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.

NameDatatypeDescription
contact_list_namestringThe name of the contact list.
regionstringAWS region (default: us-east-1)
NextTokenstringA 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.
PageSizeintegerMaximum 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

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
;

INSERT examples

Creates a contact list.

INSERT INTO aws.sesv2.contact_lists (
ContactListName,
Topics,
Description,
Tags,
region
)
SELECT
'{{ ContactListName }}' /* required */,
'{{ Topics }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}'
;

UPDATE examples

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

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
;