Skip to content

aws.pinpoint.get_email_template

Example SQL Queries

SELECT * FROM
aws.pinpoint.get_email_template
WHERE
"template_name" = 'VALUE';

Description

Retrieves the content and settings of a message template for messages that are sent through the email channel.

Table Definition

Column NameColumn Data Type
template_name Required Input Column

The name of the message template. A template name must start with an alphanumeric character and can contain a maximum of 128 characters. The characters can be alphanumeric characters, underscores (_), or hyphens (-). Template names are case sensitive.

VARCHAR
version Input Column

The unique identifier for the version of the message template to update, retrieve information about, or delete. To retrieve identifiers and other information for all the versions of a template, use the Template Versions resource.

If specified, this value must match the identifier for an existing template version. If specified for an update operation, this value must match the identifier for the latest existing version of the template. This restriction helps ensure that race conditions don't occur.

If you don't specify a value for this parameter, Amazon Pinpoint does the following:

  • For a get operation, retrieves information about the active version of the template.

  • For an update operation, saves the updates to (overwrites) the latest existing version of the template, if the create-new-version parameter isn't used or is set to false.

  • For a delete operation, deletes the template, including all versions of the template.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
email_template_response

Provides information about the content and settings for a message template that can be used in messages that are sent through the email channel.

STRUCT(
"arn" VARCHAR,
"creation_date" VARCHAR,
"default_substitutions" VARCHAR,
"html_part" VARCHAR,
"last_modified_date" VARCHAR,
"recommender_id" VARCHAR,
"subject" VARCHAR,
"headers" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[],
"tags" MAP(VARCHAR, VARCHAR),
"template_description" VARCHAR,
"template_name" VARCHAR,
"template_type" VARCHAR,
"text_part" VARCHAR,
"version" VARCHAR
)
Show child fields
email_template_response.arn

The Amazon Resource Name (ARN) of the message template.

email_template_response.creation_date

The date, in ISO 8601 format, when the message template was created.

email_template_response.default_substitutions

The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

email_template_response.headers[]
Show child fields
email_template_response.headers[].name

The name of the message header. The header name can contain up to 126 characters.

email_template_response.headers[].value

The value of the message header. The header value can contain up to 870 characters, including the length of any rendered attributes. For example if you add the {CreationDate} attribute, it renders as YYYY-MM-DDTHH:MM:SS.SSSZ and is 24 characters in length.

email_template_response.html_part

The message body, in HTML format, that's used in email messages that are based on the message template.

email_template_response.last_modified_date

The date, in ISO 8601 format, when the message template was last modified.

email_template_response.recommender_id

The unique identifier for the recommender model that's used by the message template.

email_template_response.subject

The subject line, or title, that's used in email messages that are based on the message template.

email_template_response.tags

A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.

email_template_response.template_description

The custom description of the message template.

email_template_response.template_name

The name of the message template.

email_template_response.template_type

The type of channel that the message template is designed for. For an email template, this value is EMAIL.

email_template_response.text_part

The message body, in plain text format, that's used in email messages that are based on the message template.

email_template_response.version

The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.