Amazon Simple Email Service

2017/10/11 - Amazon Simple Email Service - 8 new 3 updated api methods

Changes  Added content related to email template management and templated email sending operations.

UpdateTemplate (new) Link ¶

Updates an email template. Email templates enable you to send personalized email to one or more destinations in a single API operation. For more information, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.update_template(
    Template={
        'TemplateName': 'string',
        'SubjectPart': 'string',
        'TextPart': 'string',
        'HtmlPart': 'string'
    }
)
type Template

dict

param Template

[REQUIRED]

The content of the email, composed of a subject line, an HTML part, and a text-only part.

  • TemplateName (string) -- [REQUIRED]

    The name of the template. You will refer to this name when you send email using the SendTemplatedEmail or SendBulkTemplatedEmail operations.

  • SubjectPart (string) --

    The subject line of the email.

  • TextPart (string) --

    The email body that will be visible to recipients whose email clients do not display HTML.

  • HtmlPart (string) --

    The HTML body of the email.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateTemplate (new) Link ¶

Creates an email template. Email templates enable you to send personalized email to one or more destinations in a single API operation. For more information, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.create_template(
    Template={
        'TemplateName': 'string',
        'SubjectPart': 'string',
        'TextPart': 'string',
        'HtmlPart': 'string'
    }
)
type Template

dict

param Template

[REQUIRED]

The content of the email, composed of a subject line, an HTML part, and a text-only part.

  • TemplateName (string) -- [REQUIRED]

    The name of the template. You will refer to this name when you send email using the SendTemplatedEmail or SendBulkTemplatedEmail operations.

  • SubjectPart (string) --

    The subject line of the email.

  • TextPart (string) --

    The email body that will be visible to recipients whose email clients do not display HTML.

  • HtmlPart (string) --

    The HTML body of the email.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

TestRenderTemplate (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.test_render_template(
    TemplateName='string',
    TemplateData='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the template that you want to render.

type TemplateData

string

param TemplateData

[REQUIRED]

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.

rtype

dict

returns

Response Syntax

{
    'RenderedTemplate': 'string'
}

Response Structure

  • (dict) --

    • RenderedTemplate (string) --

      The complete MIME message rendered by applying the data in the TemplateData parameter to the template specified in the TemplateName parameter.

SendTemplatedEmail (new) Link ¶

Composes an email message using an email template and immediately queues it for sending.

In order to send email using the SendTemplatedEmail operation, your call to the API must meet the following requirements:

  • The call must refer to an existing email template. You can create email templates using the CreateTemplate operation.

  • The message must be sent from a verified email address or domain.

  • If your account is still in the Amazon SES sandbox, you may only send to verified addresses or domains, or to email addresses associated with the Amazon SES Mailbox Simulator. For more information, see Verifying Email Addresses and Domains in the Amazon SES Developer Guide.

  • The total size of the message, including attachments, must be less than 10 MB.

  • Calls to the SendTemplatedEmail operation may only include one Destination parameter. A destination is a set of recipients who will receive the same version of the email. The Destination parameter can include up to 50 recipients, across the To:, CC: and BCC: fields.

  • The Destination parameter must include at least one recipient email address. The recipient address can be a To: address, a CC: address, or a BCC: address. If a recipient email address is invalid (that is, it is not in the format UserName@[SubDomain.]Domain.TopLevelDomain ), the entire message will be rejected, even if the message contains other recipients that are valid.

See also: AWS API Documentation

Request Syntax

client.send_templated_email(
    Source='string',
    Destination={
        'ToAddresses': [
            'string',
        ],
        'CcAddresses': [
            'string',
        ],
        'BccAddresses': [
            'string',
        ]
    },
    ReplyToAddresses=[
        'string',
    ],
    ReturnPath='string',
    SourceArn='string',
    ReturnPathArn='string',
    Tags=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    ConfigurationSetName='string',
    Template='string',
    TemplateArn='string',
    TemplateData='string'
)
type Source

string

param Source

[REQUIRED]

The email address that is sending the email. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. For information about verifying identities, see the Amazon SES Developer Guide.

If you are sending on behalf of another user and have been permitted to do so by a sending authorization policy, then you must also specify the SourceArn parameter. For more information about sending authorization, see the Amazon SES Developer Guide.

In all cases, the email address must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?= . For more information, see RFC 2047.

type Destination

dict

param Destination

[REQUIRED]

The destination for this email, composed of To:, CC:, and BCC: fields. A Destination can include up to 50 recipients across these three fields.

  • ToAddresses (list) --

    The To: field(s) of the message.

    • (string) --

  • CcAddresses (list) --

    The CC: field(s) of the message.

    • (string) --

  • BccAddresses (list) --

    The BCC: field(s) of the message.

    • (string) --

type ReplyToAddresses

list

param ReplyToAddresses

The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.

  • (string) --

type ReturnPath

string

param ReturnPath

The email address that bounces and complaints will be forwarded to when feedback forwarding is enabled. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter. The ReturnPath parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.

type SourceArn

string

param SourceArn

This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in the Source parameter.

For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to it that authorizes you to send from user@example.com , then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com , and the Source to be user@example.com .

For more information about sending authorization, see the Amazon SES Developer Guide.

type ReturnPathArn

string

param ReturnPathArn

This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the ReturnPath parameter.

For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to it that authorizes you to use feedback@example.com , then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com , and the ReturnPath to be feedback@example.com .

For more information about sending authorization, see the Amazon SES Developer Guide.

type Tags

list

param Tags

A list of tags, in the form of name/value pairs, to apply to an email that you send using SendTemplatedEmail . Tags correspond to characteristics of the email that you define, so that you can publish email sending events.

  • (dict) --

    Contains the name and value of a tag that you can provide to SendEmail or SendRawEmail to apply to an email.

    Message tags, which you use with configuration sets, enable you to publish email sending events. For information about using configuration sets, see the Amazon SES Developer Guide.

    • Name (string) -- [REQUIRED]

      The name of the tag. The name must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

      • Contain less than 256 characters.

    • Value (string) -- [REQUIRED]

      The value of the tag. The value must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

      • Contain less than 256 characters.

type ConfigurationSetName

string

param ConfigurationSetName

The name of the configuration set to use when you send an email using SendTemplatedEmail .

type Template

string

param Template

[REQUIRED]

The template to use when sending this email.

type TemplateArn

string

param TemplateArn

The ARN of the template to use when sending this email.

type TemplateData

string

param TemplateData

[REQUIRED]

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.

rtype

dict

returns

Response Syntax

{
    'MessageId': 'string'
}

Response Structure

  • (dict) --

    • MessageId (string) --

      The unique message identifier returned from the SendTemplatedEmail action.

GetTemplate (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.get_template(
    TemplateName='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the template you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'Template': {
        'TemplateName': 'string',
        'SubjectPart': 'string',
        'TextPart': 'string',
        'HtmlPart': 'string'
    }
}

Response Structure

  • (dict) --

    • Template (dict) --

      The content of the email, composed of a subject line, an HTML part, and a text-only part.

      • TemplateName (string) --

        The name of the template. You will refer to this name when you send email using the SendTemplatedEmail or SendBulkTemplatedEmail operations.

      • SubjectPart (string) --

        The subject line of the email.

      • TextPart (string) --

        The email body that will be visible to recipients whose email clients do not display HTML.

      • HtmlPart (string) --

        The HTML body of the email.

ListTemplates (new) Link ¶

Lists the email templates present in your Amazon SES account.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.list_templates(
    NextToken='string',
    MaxItems=123
)
type NextToken

string

param NextToken

The token to use for pagination.

type MaxItems

integer

param MaxItems

The maximum number of templates to return. This value must be at least 1 and less than or equal to 10. If you do not specify a value, or if you specify a value less than 1 or greater than 10, the operation will return up to 10 results.

rtype

dict

returns

Response Syntax

{
    'TemplatesMetadata': [
        {
            'Name': 'string',
            'CreatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TemplatesMetadata (list) --

      An array the contains the name of creation time stamp for each template in your Amazon SES account.

      • (dict) --

        Information about an email template.

        • Name (string) --

          The name of the template.

        • CreatedTimestamp (datetime) --

          The time and date the template was created.

    • NextToken (string) --

      The token to use for pagination.

DeleteTemplate (new) Link ¶

Deletes an email template.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.delete_template(
    TemplateName='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the template to be deleted.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

SendBulkTemplatedEmail (new) Link ¶

Composes an email message to multiple destinations. The message body is created using an email template.

In order to send email using the SendBulkTemplatedEmail operation, your call to the API must meet the following requirements:

  • The call must refer to an existing email template. You can create email templates using the CreateTemplate operation.

  • The message must be sent from a verified email address or domain.

  • If your account is still in the Amazon SES sandbox, you may only send to verified addresses or domains, or to email addresses associated with the Amazon SES Mailbox Simulator. For more information, see Verifying Email Addresses and Domains in the Amazon SES Developer Guide.

  • The total size of the message, including attachments, must be less than 10 MB.

  • Each Destination parameter must include at least one recipient email address. The recipient address can be a To: address, a CC: address, or a BCC: address. If a recipient email address is invalid (that is, it is not in the format UserName@[SubDomain.]Domain.TopLevelDomain ), the entire message will be rejected, even if the message contains other recipients that are valid.

See also: AWS API Documentation

Request Syntax

client.send_bulk_templated_email(
    Source='string',
    SourceArn='string',
    ReplyToAddresses=[
        'string',
    ],
    ReturnPath='string',
    ReturnPathArn='string',
    ConfigurationSetName='string',
    DefaultTags=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    Template='string',
    TemplateArn='string',
    DefaultTemplateData='string',
    Destinations=[
        {
            'Destination': {
                'ToAddresses': [
                    'string',
                ],
                'CcAddresses': [
                    'string',
                ],
                'BccAddresses': [
                    'string',
                ]
            },
            'ReplacementTags': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'ReplacementTemplateData': 'string'
        },
    ]
)
type Source

string

param Source

[REQUIRED]

The email address that is sending the email. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. For information about verifying identities, see the Amazon SES Developer Guide.

If you are sending on behalf of another user and have been permitted to do so by a sending authorization policy, then you must also specify the SourceArn parameter. For more information about sending authorization, see the Amazon SES Developer Guide.

In all cases, the email address must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?= . For more information, see RFC 2047.

type SourceArn

string

param SourceArn

This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in the Source parameter.

For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to it that authorizes you to send from user@example.com , then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com , and the Source to be user@example.com .

For more information about sending authorization, see the Amazon SES Developer Guide.

type ReplyToAddresses

list

param ReplyToAddresses

The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.

  • (string) --

type ReturnPath

string

param ReturnPath

The email address that bounces and complaints will be forwarded to when feedback forwarding is enabled. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter. The ReturnPath parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.

type ReturnPathArn

string

param ReturnPathArn

This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the ReturnPath parameter.

For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to it that authorizes you to use feedback@example.com , then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com , and the ReturnPath to be feedback@example.com .

For more information about sending authorization, see the Amazon SES Developer Guide.

type ConfigurationSetName

string

param ConfigurationSetName

The name of the configuration set to use when you send an email using SendBulkTemplatedEmail .

type DefaultTags

list

param DefaultTags

A list of tags, in the form of name/value pairs, to apply to an email that you send to a destination using SendBulkTemplatedEmail .

  • (dict) --

    Contains the name and value of a tag that you can provide to SendEmail or SendRawEmail to apply to an email.

    Message tags, which you use with configuration sets, enable you to publish email sending events. For information about using configuration sets, see the Amazon SES Developer Guide.

    • Name (string) -- [REQUIRED]

      The name of the tag. The name must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

      • Contain less than 256 characters.

    • Value (string) -- [REQUIRED]

      The value of the tag. The value must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

      • Contain less than 256 characters.

type Template

string

param Template

[REQUIRED]

The template to use when sending this email.

type TemplateArn

string

param TemplateArn

The ARN of the template to use when sending this email.

type DefaultTemplateData

string

param DefaultTemplateData

A list of replacement values to apply to the template when replacement data is not specified in a Destination object. These values act as a default or fallback option when no other data is available.

The template data is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.

type Destinations

list

param Destinations

[REQUIRED]

One or more Destination objects. All of the recipients in a Destination will receive the same version of the email. You can specify up to 50 Destination objects within a Destinations array.

  • (dict) --

    An array that contains one or more Destinations, as well as the tags and replacement data associated with each of those Destinations.

    • Destination (dict) -- [REQUIRED]

      Represents the destination of the message, consisting of To:, CC:, and BCC: fields.

      By default, the string must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?= . For more information, see RFC 2047.

      • ToAddresses (list) --

        The To: field(s) of the message.

        • (string) --

      • CcAddresses (list) --

        The CC: field(s) of the message.

        • (string) --

      • BccAddresses (list) --

        The BCC: field(s) of the message.

        • (string) --

    • ReplacementTags (list) --

      A list of tags, in the form of name/value pairs, to apply to an email that you send using SendBulkTemplatedEmail . Tags correspond to characteristics of the email that you define, so that you can publish email sending events.

      • (dict) --

        Contains the name and value of a tag that you can provide to SendEmail or SendRawEmail to apply to an email.

        Message tags, which you use with configuration sets, enable you to publish email sending events. For information about using configuration sets, see the Amazon SES Developer Guide.

        • Name (string) -- [REQUIRED]

          The name of the tag. The name must:

          • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

          • Contain less than 256 characters.

        • Value (string) -- [REQUIRED]

          The value of the tag. The value must:

          • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

          • Contain less than 256 characters.

    • ReplacementTemplateData (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.

rtype

dict

returns

Response Syntax

{
    'Status': [
        {
            'Status': 'Success'|'MessageRejected'|'MailFromDomainNotVerified'|'ConfigurationSetDoesNotExist'|'TemplateDoesNotExist'|'AccountSuspended'|'AccountThrottled'|'AccountDailyQuotaExceeded'|'InvalidSendingPoolName'|'InvalidParameterValue'|'TransientFailure'|'Failed',
            'Error': 'string',
            'MessageId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Status (list) --

      The unique message identifier returned from the SendBulkTemplatedEmail action.

      • (dict) --

        An object that contains the response from the SendBulkTemplatedEmail operation.

        • Status (string) --

          The status of a message sent using the SendBulkTemplatedEmail operation.

          Possible values for this parameter include:

          • Success : Amazon SES accepted the message, and will attempt to deliver it to the recipients.

          • MessageRejected : The message was rejected because it contained a virus.

          • MailFromDomainNotVerified : The sender's email address or domain was not verified.

          • ConfigurationSetDoesNotExist : The configuration set you specified does not exist.

          • TemplateDoesNotExist : The template you specified does not exist.

          • AccountSuspended : Your account has been shut down because of issues related to your email sending practices.

          • AccountThrottled : The number of emails you can send has been reduced because your account has exceeded its allocated sending limit.

          • AccountDailyQuotaExceeded : You have reached or exceeded the maximum number of emails you can send from your account in a 24-hour period.

          • InvalidSendingPoolName : The configuration set you specified refers to an IP pool that does not exist.

          • InvalidParameterValue : One or more of the parameters you specified when calling this operation was invalid. See the error message for additional information.

          • TransientFailure : Amazon SES was unable to process your request because of a temporary issue.

          • Failed : Amazon SES was unable to process your request. See the error message for additional information.

        • Error (string) --

          A description of an error that prevented a message being sent using the SendBulkTemplatedEmail operation.

        • MessageId (string) --

          The unique message identifier returned from the SendBulkTemplatedEmail operation.

CreateConfigurationSetEventDestination (updated) Link ¶
Changes (request)
{'EventDestination': {'MatchingEventTypes': {'renderingFailure'}}}

Creates a configuration set event destination.

Note

When you create or update an event destination, you must provide one, and only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS).

An event destination is the AWS service to which Amazon SES publishes the email sending events associated with a configuration set. For information about using configuration sets, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.create_configuration_set_event_destination(
    ConfigurationSetName='string',
    EventDestination={
        'Name': 'string',
        'Enabled': True|False,
        'MatchingEventTypes': [
            'send'|'reject'|'bounce'|'complaint'|'delivery'|'open'|'click'|'renderingFailure',
        ],
        'KinesisFirehoseDestination': {
            'IAMRoleARN': 'string',
            'DeliveryStreamARN': 'string'
        },
        'CloudWatchDestination': {
            'DimensionConfigurations': [
                {
                    'DimensionName': 'string',
                    'DimensionValueSource': 'messageTag'|'emailHeader'|'linkTag',
                    'DefaultDimensionValue': 'string'
                },
            ]
        },
        'SNSDestination': {
            'TopicARN': 'string'
        }
    }
)
type ConfigurationSetName

string

param ConfigurationSetName

[REQUIRED]

The name of the configuration set that the event destination should be associated with.

type EventDestination

dict

param EventDestination

[REQUIRED]

An object that describes the AWS service that email sending event information will be published to.

  • Name (string) -- [REQUIRED]

    The name of the event destination. The name must:

    • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

    • Contain less than 64 characters.

  • Enabled (boolean) --

    Sets whether Amazon SES publishes events to this destination when you send an email with the associated configuration set. Set to true to enable publishing to this destination; set to false to prevent publishing to this destination. The default value is false .

  • MatchingEventTypes (list) -- [REQUIRED]

    The type of email sending events to publish to the event destination.

    • (string) --

  • KinesisFirehoseDestination (dict) --

    An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.

    • IAMRoleARN (string) -- [REQUIRED]

      The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.

    • DeliveryStreamARN (string) -- [REQUIRED]

      The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.

  • CloudWatchDestination (dict) --

    An object that contains the names, default values, and sources of the dimensions associated with an Amazon CloudWatch event destination.

    • DimensionConfigurations (list) -- [REQUIRED]

      A list of dimensions upon which to categorize your emails when you publish email sending events to Amazon CloudWatch.

      • (dict) --

        Contains the dimension configuration to use when you publish email sending events to Amazon CloudWatch.

        For information about publishing email sending events to Amazon CloudWatch, see the Amazon SES Developer Guide.

        • DimensionName (string) -- [REQUIRED]

          The name of an Amazon CloudWatch dimension associated with an email sending metric. The name must:

          • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

          • Contain less than 256 characters.

        • DimensionValueSource (string) -- [REQUIRED]

          The place where Amazon SES finds the value of a dimension to publish to Amazon CloudWatch. If you want Amazon SES to use the message tags that you specify using an X-SES-MESSAGE-TAGS header or a parameter to the SendEmail / SendRawEmail API, choose messageTag . If you want Amazon SES to use your own email headers, choose emailHeader .

        • DefaultDimensionValue (string) -- [REQUIRED]

          The default value of the dimension that is published to Amazon CloudWatch if you do not provide the value of the dimension when you send an email. The default value must:

          • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

          • Contain less than 256 characters.

  • SNSDestination (dict) --

    An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.

    • TopicARN (string) -- [REQUIRED]

      The ARN of the Amazon SNS topic that email sending events will be published to. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    An empty element returned on a successful request.

DescribeConfigurationSet (updated) Link ¶
Changes (response)
{'EventDestinations': {'MatchingEventTypes': {'renderingFailure'}}}

Returns the details of the specified configuration set. For information about using configuration sets, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.describe_configuration_set(
    ConfigurationSetName='string',
    ConfigurationSetAttributeNames=[
        'eventDestinations'|'trackingOptions',
    ]
)
type ConfigurationSetName

string

param ConfigurationSetName

[REQUIRED]

The name of the configuration set to describe.

type ConfigurationSetAttributeNames

list

param ConfigurationSetAttributeNames

A list of configuration set attributes to return.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'ConfigurationSet': {
        'Name': 'string'
    },
    'EventDestinations': [
        {
            'Name': 'string',
            'Enabled': True|False,
            'MatchingEventTypes': [
                'send'|'reject'|'bounce'|'complaint'|'delivery'|'open'|'click'|'renderingFailure',
            ],
            'KinesisFirehoseDestination': {
                'IAMRoleARN': 'string',
                'DeliveryStreamARN': 'string'
            },
            'CloudWatchDestination': {
                'DimensionConfigurations': [
                    {
                        'DimensionName': 'string',
                        'DimensionValueSource': 'messageTag'|'emailHeader'|'linkTag',
                        'DefaultDimensionValue': 'string'
                    },
                ]
            },
            'SNSDestination': {
                'TopicARN': 'string'
            }
        },
    ],
    'TrackingOptions': {
        'CustomRedirectDomain': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the details of a configuration set. Configuration sets enable you to publish email sending events. For information about using configuration sets, see the Amazon SES Developer Guide.

    • ConfigurationSet (dict) --

      The configuration set object associated with the specified configuration set.

      • Name (string) --

        The name of the configuration set. The name must meet the following requirements:

        • Contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

        • Contain 64 characters or fewer.

    • EventDestinations (list) --

      A list of event destinations associated with the configuration set.

      • (dict) --

        Contains information about the event destination that the specified email sending events will be published to.

        Note

        When you create or update an event destination, you must provide one, and only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis Firehose or Amazon Simple Notification Service (Amazon SNS).

        Event destinations are associated with configuration sets, which enable you to publish email sending events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS). For information about using configuration sets, see the Amazon SES Developer Guide.

        • Name (string) --

          The name of the event destination. The name must:

          • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

          • Contain less than 64 characters.

        • Enabled (boolean) --

          Sets whether Amazon SES publishes events to this destination when you send an email with the associated configuration set. Set to true to enable publishing to this destination; set to false to prevent publishing to this destination. The default value is false .

        • MatchingEventTypes (list) --

          The type of email sending events to publish to the event destination.

          • (string) --

        • KinesisFirehoseDestination (dict) --

          An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.

          • IAMRoleARN (string) --

            The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.

          • DeliveryStreamARN (string) --

            The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.

        • CloudWatchDestination (dict) --

          An object that contains the names, default values, and sources of the dimensions associated with an Amazon CloudWatch event destination.

          • DimensionConfigurations (list) --

            A list of dimensions upon which to categorize your emails when you publish email sending events to Amazon CloudWatch.

            • (dict) --

              Contains the dimension configuration to use when you publish email sending events to Amazon CloudWatch.

              For information about publishing email sending events to Amazon CloudWatch, see the Amazon SES Developer Guide.

              • DimensionName (string) --

                The name of an Amazon CloudWatch dimension associated with an email sending metric. The name must:

                • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

                • Contain less than 256 characters.

              • DimensionValueSource (string) --

                The place where Amazon SES finds the value of a dimension to publish to Amazon CloudWatch. If you want Amazon SES to use the message tags that you specify using an X-SES-MESSAGE-TAGS header or a parameter to the SendEmail / SendRawEmail API, choose messageTag . If you want Amazon SES to use your own email headers, choose emailHeader .

              • DefaultDimensionValue (string) --

                The default value of the dimension that is published to Amazon CloudWatch if you do not provide the value of the dimension when you send an email. The default value must:

                • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

                • Contain less than 256 characters.

        • SNSDestination (dict) --

          An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.

          • TopicARN (string) --

            The ARN of the Amazon SNS topic that email sending events will be published to. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

    • TrackingOptions (dict) --

      The name of the custom open and click tracking domain associated with the configuration set.

      • CustomRedirectDomain (string) --

        The custom subdomain that will be used to redirect email recipients to the Amazon SES event tracking domain.

UpdateConfigurationSetEventDestination (updated) Link ¶
Changes (request)
{'EventDestination': {'MatchingEventTypes': {'renderingFailure'}}}

Updates the event destination of a configuration set. Event destinations are associated with configuration sets, which enable you to publish email sending events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS). For information about using configuration sets, see Monitoring Your Amazon SES Sending Activity in the Amazon SES Developer Guide.

Note

When you create or update an event destination, you must provide one, and only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS).

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.update_configuration_set_event_destination(
    ConfigurationSetName='string',
    EventDestination={
        'Name': 'string',
        'Enabled': True|False,
        'MatchingEventTypes': [
            'send'|'reject'|'bounce'|'complaint'|'delivery'|'open'|'click'|'renderingFailure',
        ],
        'KinesisFirehoseDestination': {
            'IAMRoleARN': 'string',
            'DeliveryStreamARN': 'string'
        },
        'CloudWatchDestination': {
            'DimensionConfigurations': [
                {
                    'DimensionName': 'string',
                    'DimensionValueSource': 'messageTag'|'emailHeader'|'linkTag',
                    'DefaultDimensionValue': 'string'
                },
            ]
        },
        'SNSDestination': {
            'TopicARN': 'string'
        }
    }
)
type ConfigurationSetName

string

param ConfigurationSetName

[REQUIRED]

The name of the configuration set that contains the event destination that you want to update.

type EventDestination

dict

param EventDestination

[REQUIRED]

The event destination object that you want to apply to the specified configuration set.

  • Name (string) -- [REQUIRED]

    The name of the event destination. The name must:

    • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

    • Contain less than 64 characters.

  • Enabled (boolean) --

    Sets whether Amazon SES publishes events to this destination when you send an email with the associated configuration set. Set to true to enable publishing to this destination; set to false to prevent publishing to this destination. The default value is false .

  • MatchingEventTypes (list) -- [REQUIRED]

    The type of email sending events to publish to the event destination.

    • (string) --

  • KinesisFirehoseDestination (dict) --

    An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.

    • IAMRoleARN (string) -- [REQUIRED]

      The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.

    • DeliveryStreamARN (string) -- [REQUIRED]

      The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.

  • CloudWatchDestination (dict) --

    An object that contains the names, default values, and sources of the dimensions associated with an Amazon CloudWatch event destination.

    • DimensionConfigurations (list) -- [REQUIRED]

      A list of dimensions upon which to categorize your emails when you publish email sending events to Amazon CloudWatch.

      • (dict) --

        Contains the dimension configuration to use when you publish email sending events to Amazon CloudWatch.

        For information about publishing email sending events to Amazon CloudWatch, see the Amazon SES Developer Guide.

        • DimensionName (string) -- [REQUIRED]

          The name of an Amazon CloudWatch dimension associated with an email sending metric. The name must:

          • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

          • Contain less than 256 characters.

        • DimensionValueSource (string) -- [REQUIRED]

          The place where Amazon SES finds the value of a dimension to publish to Amazon CloudWatch. If you want Amazon SES to use the message tags that you specify using an X-SES-MESSAGE-TAGS header or a parameter to the SendEmail / SendRawEmail API, choose messageTag . If you want Amazon SES to use your own email headers, choose emailHeader .

        • DefaultDimensionValue (string) -- [REQUIRED]

          The default value of the dimension that is published to Amazon CloudWatch if you do not provide the value of the dimension when you send an email. The default value must:

          • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).

          • Contain less than 256 characters.

  • SNSDestination (dict) --

    An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.

    • TopicARN (string) -- [REQUIRED]

      The ARN of the Amazon SNS topic that email sending events will be published to. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    An empty element returned on a successful request.