templates
Creates, updates, deletes, gets or lists a templates resource.
Overview
| Name | templates |
| Type | Resource |
| Id | aws.ses.templates |
Fields
The following fields are returned by SELECT queries:
- get_template
- list_templates
| Name | Datatype | Description |
|---|---|---|
html_part | string | The HTML body of the email. |
subject_part | string | The subject line of the email. |
template_name | string | The name of the template. You use this name when you send email using the SendTemplatedEmail or SendBulkTemplatedEmail operations. |
text_part | string | The email body that is visible to recipients whose email clients do not display HTML content. |
| Name | Datatype | Description |
|---|---|---|
created_timestamp | string | The time and date the template was created. |
name | string | The name of the template. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_template | select | TemplateName, region | Displays the template object (which includes the Subject line, HTML part and text part) for the template you specify. You can execute this operation no more than once per second. | |
list_templates | select | region | NextToken, MaxItems | Lists the email templates present in your Amazon SES account in the current Amazon Web Services Region. You can execute this operation no more than once per second. |
create_template | insert | Template, region | Creates an email template. Email templates enable you to send personalized email to one or more destinations in a single operation. For more information, see the Amazon SES Developer Guide. You can execute this operation no more than once per second. | |
update_template | update | Template, region | Updates an email template. Email templates enable you to send personalized email to one or more destinations in a single operation. For more information, see the Amazon SES Developer Guide. You can execute this operation no more than once per second. | |
delete_template | delete | TemplateName, region | Deletes an email template. You can execute this operation no more than once per second. | |
send_custom_verification_email | exec | EmailAddress, TemplateName, region | ConfigurationSetName | Adds an email address to the list of identities for your Amazon SES account in the current Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a customized verification email is sent to the specified address. To use this operation, you must first create a custom verification email template. For more information about creating and using custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide. You can execute this operation no more than once per second. |
test_render_template | exec | TemplateName, TemplateData, region | Creates a preview of the MIME content of an email when provided with a template and a set of replacement data. You can execute this operation no more than once per second. |
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 |
|---|---|---|
EmailAddress | string | The email address to verify. |
Template | object | |
TemplateData | string | A list of replacement values to apply to the template. This parameter is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template. |
TemplateName | string | The name of the template to render. |
region | string | AWS region (default: us-east-1) |
ConfigurationSetName | string | Name of a configuration set to use when sending the verification email. |
MaxItems | integer | The maximum number of templates to return. This value must be at least 1 and less than or equal to 100. If more than 100 items are requested, the page size will automatically set to 100. If you do not specify a value, 10 is the default page size. |
NextToken | string | A token returned from a previous call to ListTemplates to indicate the position in the list of email templates. |
SELECT examples
- get_template
- list_templates
Displays the template object (which includes the Subject line, HTML part and text part) for the template you specify. You can execute this operation no more than once per second.
SELECT
html_part,
subject_part,
template_name,
text_part
FROM aws.ses.templates
WHERE TemplateName = '{{ TemplateName }}' -- required
AND region = '{{ region }}' -- required
;
Lists the email templates present in your Amazon SES account in the current Amazon Web Services Region. You can execute this operation no more than once per second.
SELECT
created_timestamp,
name
FROM aws.ses.templates
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxItems = '{{ MaxItems }}'
;
INSERT examples
- create_template
- Manifest
Creates an email template. Email templates enable you to send personalized email to one or more destinations in a single operation. For more information, see the Amazon SES Developer Guide. You can execute this operation no more than once per second.
INSERT INTO aws.ses.templates (
Template,
region
)
SELECT
'{{ Template }}',
'{{ region }}'
;
# Description fields are for documentation purposes
- name: templates
props:
- name: Template
value: "{{ Template }}"
description: Required parameter for the templates resource.
- name: region
value: "{{ region }}"
description: Required parameter for the templates resource.
UPDATE examples
- update_template
Updates an email template. Email templates enable you to send personalized email to one or more destinations in a single operation. For more information, see the Amazon SES Developer Guide. You can execute this operation no more than once per second.
UPDATE aws.ses.templates
SET
-- No updatable properties
WHERE
Template = '{{ Template }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_template
Deletes an email template. You can execute this operation no more than once per second.
DELETE FROM aws.ses.templates
WHERE TemplateName = '{{ TemplateName }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- send_custom_verification_email
- test_render_template
Adds an email address to the list of identities for your Amazon SES account in the current Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a customized verification email is sent to the specified address. To use this operation, you must first create a custom verification email template. For more information about creating and using custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide. You can execute this operation no more than once per second.
EXEC aws.ses.templates.send_custom_verification_email
@EmailAddress='{{ EmailAddress }}' --required,
@TemplateName='{{ TemplateName }}' --required,
@region='{{ region }}' --required,
@ConfigurationSetName='{{ ConfigurationSetName }}'
;
Creates a preview of the MIME content of an email when provided with a template and a set of replacement data. You can execute this operation no more than once per second.
EXEC aws.ses.templates.test_render_template
@TemplateName='{{ TemplateName }}' --required,
@TemplateData='{{ TemplateData }}' --required,
@region='{{ region }}' --required
;