Amazon Simple Email Service

2020/10/29 - Amazon Simple Email Service - 10 new 7 updated api methods

Changes  This release enables customers to manage their own contact lists and end-user subscription preferences.

GetContact (new) Link ¶

Returns a contact from a contact list.

See also: AWS API Documentation

Request Syntax

client.get_contact(
    ContactListName='string',
    EmailAddress='string'
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list to which the contact belongs.

type EmailAddress

string

param EmailAddress

[REQUIRED]

The contact's email addres.

rtype

dict

returns

Response Syntax

{
    'ContactListName': 'string',
    'EmailAddress': 'string',
    'TopicPreferences': [
        {
            'TopicName': 'string',
            'SubscriptionStatus': 'OPT_IN'|'OPT_OUT'
        },
    ],
    'TopicDefaultPreferences': [
        {
            'TopicName': 'string',
            'SubscriptionStatus': 'OPT_IN'|'OPT_OUT'
        },
    ],
    'UnsubscribeAll': True|False,
    'AttributesData': 'string',
    'CreatedTimestamp': datetime(2015, 1, 1),
    'LastUpdatedTimestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ContactListName (string) --

      The name of the contact list to which the contact belongs.

    • EmailAddress (string) --

      The contact's email addres.

    • TopicPreferences (list) --

      The contact's preference for being opted-in to or opted-out of a topic.>

      • (dict) --

        The contact's preference for being opted-in to or opted-out of a topic.

        • TopicName (string) --

          The name of the topic.

        • SubscriptionStatus (string) --

          The contact's subscription status to a topic which is either OPT_IN or OPT_OUT .

    • TopicDefaultPreferences (list) --

      The default topic preferences applied to the contact.

      • (dict) --

        The contact's preference for being opted-in to or opted-out of a topic.

        • TopicName (string) --

          The name of the topic.

        • SubscriptionStatus (string) --

          The contact's subscription status to a topic which is either OPT_IN or OPT_OUT .

    • UnsubscribeAll (boolean) --

      A boolean value status noting if the contact is unsubscribed from all contact list topics.

    • AttributesData (string) --

      The attribute data attached to a contact.

    • CreatedTimestamp (datetime) --

      A timestamp noting when the contact was created.

    • LastUpdatedTimestamp (datetime) --

      A timestamp noting the last time the contact's information was updated.

DeleteContactList (new) Link ¶

Deletes a contact list and all of the contacts on that list.

See also: AWS API Documentation

Request Syntax

client.delete_contact_list(
    ContactListName='string'
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListContactLists (new) Link ¶

Lists all of the contact lists available.

See also: AWS API Documentation

Request Syntax

client.list_contact_lists(
    PageSize=123,
    NextToken='string'
)
type PageSize

integer

param PageSize

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.

type NextToken

string

param NextToken

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.

rtype

dict

returns

Response Syntax

{
    'ContactLists': [
        {
            'ContactListName': 'string',
            'LastUpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ContactLists (list) --

      The available contact lists.

      • (dict) --

        A list that contains contacts that have subscribed to a particular topic or topics.

        • ContactListName (string) --

          The name of the contact list.

        • LastUpdatedTimestamp (datetime) --

          A timestamp noting the last time the contact list was updated.

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

CreateContact (new) Link ¶

Creates a contact, which is an end-user who is receiving the email, and adds them to a contact list.

See also: AWS API Documentation

Request Syntax

client.create_contact(
    ContactListName='string',
    EmailAddress='string',
    TopicPreferences=[
        {
            'TopicName': 'string',
            'SubscriptionStatus': 'OPT_IN'|'OPT_OUT'
        },
    ],
    UnsubscribeAll=True|False,
    AttributesData='string'
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list to which the contact should be added.

type EmailAddress

string

param EmailAddress

[REQUIRED]

The contact's email address.

type TopicPreferences

list

param TopicPreferences

The contact's preferences for being opted-in to or opted-out of topics.

  • (dict) --

    The contact's preference for being opted-in to or opted-out of a topic.

    • TopicName (string) -- [REQUIRED]

      The name of the topic.

    • SubscriptionStatus (string) -- [REQUIRED]

      The contact's subscription status to a topic which is either OPT_IN or OPT_OUT .

type UnsubscribeAll

boolean

param UnsubscribeAll

A boolean value status noting if the contact is unsubscribed from all contact list topics.

type AttributesData

string

param AttributesData

The attribute data attached to a contact.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteContact (new) Link ¶

Removes a contact from a contact list.

See also: AWS API Documentation

Request Syntax

client.delete_contact(
    ContactListName='string',
    EmailAddress='string'
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list from which the contact should be removed.

type EmailAddress

string

param EmailAddress

[REQUIRED]

The contact's email address.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateContact (new) Link ¶

Updates a contact's preferences for a list. It is not necessary to specify all existing topic preferences in the TopicPreferences object, just the ones that need updating.

See also: AWS API Documentation

Request Syntax

client.update_contact(
    ContactListName='string',
    EmailAddress='string',
    TopicPreferences=[
        {
            'TopicName': 'string',
            'SubscriptionStatus': 'OPT_IN'|'OPT_OUT'
        },
    ],
    UnsubscribeAll=True|False,
    AttributesData='string'
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list.

type EmailAddress

string

param EmailAddress

[REQUIRED]

The contact's email addres.

type TopicPreferences

list

param TopicPreferences

The contact's preference for being opted-in to or opted-out of a topic.

  • (dict) --

    The contact's preference for being opted-in to or opted-out of a topic.

    • TopicName (string) -- [REQUIRED]

      The name of the topic.

    • SubscriptionStatus (string) -- [REQUIRED]

      The contact's subscription status to a topic which is either OPT_IN or OPT_OUT .

type UnsubscribeAll

boolean

param UnsubscribeAll

A boolean value status noting if the contact is unsubscribed from all contact list topics.

type AttributesData

string

param AttributesData

The attribute data attached to a contact.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetContactList (new) Link ¶

Returns contact list metadata. It does not return any information about the contacts present in the list.

See also: AWS API Documentation

Request Syntax

client.get_contact_list(
    ContactListName='string'
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list.

rtype

dict

returns

Response Syntax

{
    'ContactListName': 'string',
    'Topics': [
        {
            'TopicName': 'string',
            'DisplayName': 'string',
            'Description': 'string',
            'DefaultSubscriptionStatus': 'OPT_IN'|'OPT_OUT'
        },
    ],
    'Description': 'string',
    'CreatedTimestamp': datetime(2015, 1, 1),
    'LastUpdatedTimestamp': datetime(2015, 1, 1),
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • ContactListName (string) --

      The name of the contact list.

    • Topics (list) --

      An interest group, theme, or label within a list. A contact list can have multiple topics.

      • (dict) --

        An interest group, theme, or label within a list. Lists can have multiple topics.

        • TopicName (string) --

          The name of the topic.

        • DisplayName (string) --

          The name of the topic the contact will see.

        • Description (string) --

          A description of what the topic is about, which the contact will see.

        • DefaultSubscriptionStatus (string) --

          The default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.

    • Description (string) --

      A description of what the contact list is about.

    • CreatedTimestamp (datetime) --

      A timestamp noting when the contact list was created.

    • LastUpdatedTimestamp (datetime) --

      A timestamp noting the last time the contact list was updated.

    • Tags (list) --

      The tags associated with a contact list.

      • (dict) --

        An object that defines the tags that are associated with a resource. A tag is a label that you optionally define and associate with a resource. Tags can help you categorize and manage resources in different ways, such as by purpose, owner, environment, or other criteria. A resource can have as many as 50 tags.

        Each tag consists of a required tag key and an associated tag value , both of which you define. A tag key is a general label that acts as a category for a more specific tag value. A tag value acts as a descriptor within a tag key. A tag key can contain as many as 128 characters. A tag value can contain as many as 256 characters. The characters can be Unicode letters, digits, white space, or one of the following symbols: _ . : / = + -. The following additional restrictions apply to tags:

        • Tag keys and values are case sensitive.

        • For each associated resource, each tag key must be unique and it can have only one value.

        • The aws: prefix is reserved for use by AWS; you can’t use it in any tag keys or values that you define. In addition, you can't edit or remove tag keys or values that use this prefix. Tags that use this prefix don’t count against the limit of 50 tags per resource.

        • You can associate tags with public or shared resources, but the tags are available only for your AWS account, not any other accounts that share the resource. In addition, the tags are available only for resources that are located in the specified AWS Region for your AWS account.

        • Key (string) --

          One part of a key-value pair that defines a tag. The maximum length of a tag key is 128 characters. The minimum length is 1 character.

        • Value (string) --

          The optional part of a key-value pair that defines a tag. The maximum length of a tag value is 256 characters. The minimum length is 0 characters. If you don't want a resource to have a specific tag value, don't specify a value for this parameter. If you don't specify a value, Amazon SES sets the value to an empty string.

UpdateContactList (new) Link ¶

Updates contact list metadata. This operation does a complete replacement.

See also: AWS API Documentation

Request Syntax

client.update_contact_list(
    ContactListName='string',
    Topics=[
        {
            'TopicName': 'string',
            'DisplayName': 'string',
            'Description': 'string',
            'DefaultSubscriptionStatus': 'OPT_IN'|'OPT_OUT'
        },
    ],
    Description='string'
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list.

type Topics

list

param Topics

An interest group, theme, or label within a list. A contact list can have multiple topics.

  • (dict) --

    An interest group, theme, or label within a list. Lists can have multiple topics.

    • TopicName (string) -- [REQUIRED]

      The name of the topic.

    • DisplayName (string) -- [REQUIRED]

      The name of the topic the contact will see.

    • Description (string) --

      A description of what the topic is about, which the contact will see.

    • DefaultSubscriptionStatus (string) -- [REQUIRED]

      The default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.

type Description

string

param Description

A description of what the contact list is about.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListContacts (new) Link ¶

Lists the contacts present in a specific contact list.

See also: AWS API Documentation

Request Syntax

client.list_contacts(
    ContactListName='string',
    Filter={
        'FilteredStatus': 'OPT_IN'|'OPT_OUT',
        'TopicFilter': {
            'TopicName': 'string',
            'UseDefaultIfPreferenceUnavailable': True|False
        }
    },
    PageSize=123,
    NextToken='string'
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list.

type Filter

dict

param Filter

A filter that can be applied to a list of contacts.

  • FilteredStatus (string) --

    The status by which you are filtering: OPT_IN or OPT_OUT .

  • TopicFilter (dict) --

    Used for filtering by a specific topic preference.

    • TopicName (string) --

      The name of a topic on which you wish to apply the filter.

    • UseDefaultIfPreferenceUnavailable (boolean) --

      Notes that the default subscription status should be applied to a contact because the contact has not noted their preference for subscribing to a topic.

type PageSize

integer

param PageSize

The number of contacts that may be returned at once, which is dependent on if there are more or less contacts than the value of the PageSize. Use this parameter to paginate results. If additional contacts exist beyond the specified limit, the NextToken element is sent in the response. Use the NextToken value in subsequent requests to retrieve additional contacts.

type NextToken

string

param NextToken

A string token indicating that there might be additional contacts available to be listed. Use the token provided in the Response to use in the subsequent call to ListContacts with the same parameters to retrieve the next page of contacts.

rtype

dict

returns

Response Syntax

{
    'Contacts': [
        {
            'EmailAddress': 'string',
            'TopicPreferences': [
                {
                    'TopicName': 'string',
                    'SubscriptionStatus': 'OPT_IN'|'OPT_OUT'
                },
            ],
            'TopicDefaultPreferences': [
                {
                    'TopicName': 'string',
                    'SubscriptionStatus': 'OPT_IN'|'OPT_OUT'
                },
            ],
            'UnsubscribeAll': True|False,
            'LastUpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Contacts (list) --

      The contacts present in a specific contact list.

      • (dict) --

        A contact is the end-user who is receiving the email.

        • EmailAddress (string) --

          The contact's email address.

        • TopicPreferences (list) --

          The contact's preference for being opted-in to or opted-out of a topic.

          • (dict) --

            The contact's preference for being opted-in to or opted-out of a topic.

            • TopicName (string) --

              The name of the topic.

            • SubscriptionStatus (string) --

              The contact's subscription status to a topic which is either OPT_IN or OPT_OUT .

        • TopicDefaultPreferences (list) --

          The default topic preferences applied to the contact.

          • (dict) --

            The contact's preference for being opted-in to or opted-out of a topic.

            • TopicName (string) --

              The name of the topic.

            • SubscriptionStatus (string) --

              The contact's subscription status to a topic which is either OPT_IN or OPT_OUT .

        • UnsubscribeAll (boolean) --

          A boolean value status noting if the contact is unsubscribed from all contact list topics.

        • LastUpdatedTimestamp (datetime) --

          A timestamp noting the last time the contact's information was updated.

    • NextToken (string) --

      A string token indicating that there might be additional contacts available to be listed. Copy this token to a subsequent call to ListContacts with the same parameters to retrieve the next page of contacts.

CreateContactList (new) Link ¶

Creates a contact list.

See also: AWS API Documentation

Request Syntax

client.create_contact_list(
    ContactListName='string',
    Topics=[
        {
            'TopicName': 'string',
            'DisplayName': 'string',
            'Description': 'string',
            'DefaultSubscriptionStatus': 'OPT_IN'|'OPT_OUT'
        },
    ],
    Description='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ContactListName

string

param ContactListName

[REQUIRED]

The name of the contact list.

type Topics

list

param Topics

An interest group, theme, or label within a list. A contact list can have multiple topics.

  • (dict) --

    An interest group, theme, or label within a list. Lists can have multiple topics.

    • TopicName (string) -- [REQUIRED]

      The name of the topic.

    • DisplayName (string) -- [REQUIRED]

      The name of the topic the contact will see.

    • Description (string) --

      A description of what the topic is about, which the contact will see.

    • DefaultSubscriptionStatus (string) -- [REQUIRED]

      The default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.

type Description

string

param Description

A description of what the contact list is about.

type Tags

list

param Tags

The tags associated with a contact list.

  • (dict) --

    An object that defines the tags that are associated with a resource. A tag is a label that you optionally define and associate with a resource. Tags can help you categorize and manage resources in different ways, such as by purpose, owner, environment, or other criteria. A resource can have as many as 50 tags.

    Each tag consists of a required tag key and an associated tag value , both of which you define. A tag key is a general label that acts as a category for a more specific tag value. A tag value acts as a descriptor within a tag key. A tag key can contain as many as 128 characters. A tag value can contain as many as 256 characters. The characters can be Unicode letters, digits, white space, or one of the following symbols: _ . : / = + -. The following additional restrictions apply to tags:

    • Tag keys and values are case sensitive.

    • For each associated resource, each tag key must be unique and it can have only one value.

    • The aws: prefix is reserved for use by AWS; you can’t use it in any tag keys or values that you define. In addition, you can't edit or remove tag keys or values that use this prefix. Tags that use this prefix don’t count against the limit of 50 tags per resource.

    • You can associate tags with public or shared resources, but the tags are available only for your AWS account, not any other accounts that share the resource. In addition, the tags are available only for resources that are located in the specified AWS Region for your AWS account.

    • Key (string) -- [REQUIRED]

      One part of a key-value pair that defines a tag. The maximum length of a tag key is 128 characters. The minimum length is 1 character.

    • Value (string) -- [REQUIRED]

      The optional part of a key-value pair that defines a tag. The maximum length of a tag value is 256 characters. The minimum length is 0 characters. If you don't want a resource to have a specific tag value, don't specify a value for this parameter. If you don't specify a value, Amazon SES sets the value to an empty string.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

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

Create an event destination. Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

A single configuration set can include more than one event destination.

See also: AWS API Documentation

Request Syntax

client.create_configuration_set_event_destination(
    ConfigurationSetName='string',
    EventDestinationName='string',
    EventDestination={
        'Enabled': True|False,
        'MatchingEventTypes': [
            'SEND'|'REJECT'|'BOUNCE'|'COMPLAINT'|'DELIVERY'|'OPEN'|'CLICK'|'RENDERING_FAILURE'|'DELIVERY_DELAY'|'SUBSCRIPTION',
        ],
        'KinesisFirehoseDestination': {
            'IamRoleArn': 'string',
            'DeliveryStreamArn': 'string'
        },
        'CloudWatchDestination': {
            'DimensionConfigurations': [
                {
                    'DimensionName': 'string',
                    'DimensionValueSource': 'MESSAGE_TAG'|'EMAIL_HEADER'|'LINK_TAG',
                    'DefaultDimensionValue': 'string'
                },
            ]
        },
        'SnsDestination': {
            'TopicArn': 'string'
        },
        'PinpointDestination': {
            'ApplicationArn': 'string'
        }
    }
)
type ConfigurationSetName

string

param ConfigurationSetName

[REQUIRED]

The name of the configuration set that you want to add an event destination to.

type EventDestinationName

string

param EventDestinationName

[REQUIRED]

A name that identifies the event destination within the configuration set.

type EventDestination

dict

param EventDestination

[REQUIRED]

An object that defines the event destination.

  • Enabled (boolean) --

    If true , the event destination is enabled. When the event destination is enabled, the specified event types are sent to the destinations in this EventDestinationDefinition .

    If false , the event destination is disabled. When the event destination is disabled, events aren't sent to the specified destinations.

  • MatchingEventTypes (list) --

    An array that specifies which events the Amazon SES API v2 should send to the destinations in this EventDestinationDefinition .

    • (string) --

      An email sending event type. For example, email sends, opens, and bounces are all email events.

  • KinesisFirehoseDestination (dict) --

    An object that defines an Amazon Kinesis Data Firehose destination for email events. You can use Amazon Kinesis Data Firehose to stream data to other services, such as Amazon S3 and Amazon Redshift.

    • IamRoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the IAM role that the Amazon SES API v2 uses to send email events to the Amazon Kinesis Data Firehose stream.

    • DeliveryStreamArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose stream that the Amazon SES API v2 sends email events to.

  • CloudWatchDestination (dict) --

    An object that defines an Amazon CloudWatch destination for email events. You can use Amazon CloudWatch to monitor and gain insights on your email sending metrics.

    • DimensionConfigurations (list) -- [REQUIRED]

      An array of objects that define the dimensions to use when you send email events to Amazon CloudWatch.

      • (dict) --

        An object that defines the dimension configuration to use when you send email events to Amazon CloudWatch.

        • DimensionName (string) -- [REQUIRED]

          The name of an Amazon CloudWatch dimension associated with an email sending metric. The name has to meet the following criteria:

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

          • It can contain no more than 256 characters.

        • DimensionValueSource (string) -- [REQUIRED]

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

        • DefaultDimensionValue (string) -- [REQUIRED]

          The default value of the dimension that is published to Amazon CloudWatch if you don't provide the value of the dimension when you send an email. This value has to meet the following criteria:

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

          • It can contain no more than 256 characters.

  • SnsDestination (dict) --

    An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to send notification when certain email events occur.

    • TopicArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish email events to. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

  • PinpointDestination (dict) --

    An object that defines an Amazon Pinpoint project destination for email events. You can send email event data to a Amazon Pinpoint project to view metrics using the Transactional Messaging dashboards that are built in to Amazon Pinpoint. For more information, see Transactional Messaging Charts in the Amazon Pinpoint User Guide .

    • ApplicationArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Pinpoint project that you want to send email events to.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

CreateImportJob (updated) Link ¶
Changes (request)
{'ImportDestination': {'ContactListDestination': {'ContactListImportAction': 'DELETE '
                                                                             '| '
                                                                             'PUT',
                                                  'ContactListName': 'string'}}}

Creates an import job for a data destination.

See also: AWS API Documentation

Request Syntax

client.create_import_job(
    ImportDestination={
        'SuppressionListDestination': {
            'SuppressionListImportAction': 'DELETE'|'PUT'
        },
        'ContactListDestination': {
            'ContactListName': 'string',
            'ContactListImportAction': 'DELETE'|'PUT'
        }
    },
    ImportDataSource={
        'S3Url': 'string',
        'DataFormat': 'CSV'|'JSON'
    }
)
type ImportDestination

dict

param ImportDestination

[REQUIRED]

The destination for the import job.

  • SuppressionListDestination (dict) --

    An object that contains the action of the import job towards suppression list.

    • SuppressionListImportAction (string) -- [REQUIRED]

      The type of action that you want to perform on the address. Acceptable values:

      • PUT: add the addresses to the suppression list. If the record already exists, it will override it with the new value.

      • DELETE: remove the addresses from the suppression list.

  • ContactListDestination (dict) --

    An object that contains the action of the import job towards a contact list.

    • ContactListName (string) -- [REQUIRED]

      The name of the contact list.

    • ContactListImportAction (string) -- [REQUIRED]

      >The type of action that you want to perform on the addresses. Acceptable values:

      • PUT: add the addresses to the contact list. If the record already exists, it will override it with the new value.

      • DELETE: remove the addresses from the contact list.

type ImportDataSource

dict

param ImportDataSource

[REQUIRED]

The data source for the import job.

  • S3Url (string) -- [REQUIRED]

    An Amazon S3 URL in the format s3://<bucket_name> /<object> .

  • DataFormat (string) -- [REQUIRED]

    The data format of the import job's data source.

rtype

dict

returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

    • JobId (string) --

      A string that represents the import job ID.

GetConfigurationSetEventDestinations (updated) Link ¶
Changes (response)
{'EventDestinations': {'MatchingEventTypes': {'SUBSCRIPTION'}}}

Retrieve a list of event destinations that are associated with a configuration set.

Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

See also: AWS API Documentation

Request Syntax

client.get_configuration_set_event_destinations(
    ConfigurationSetName='string'
)
type ConfigurationSetName

string

param ConfigurationSetName

[REQUIRED]

The name of the configuration set that contains the event destination.

rtype

dict

returns

Response Syntax

{
    'EventDestinations': [
        {
            'Name': 'string',
            'Enabled': True|False,
            'MatchingEventTypes': [
                'SEND'|'REJECT'|'BOUNCE'|'COMPLAINT'|'DELIVERY'|'OPEN'|'CLICK'|'RENDERING_FAILURE'|'DELIVERY_DELAY'|'SUBSCRIPTION',
            ],
            'KinesisFirehoseDestination': {
                'IamRoleArn': 'string',
                'DeliveryStreamArn': 'string'
            },
            'CloudWatchDestination': {
                'DimensionConfigurations': [
                    {
                        'DimensionName': 'string',
                        'DimensionValueSource': 'MESSAGE_TAG'|'EMAIL_HEADER'|'LINK_TAG',
                        'DefaultDimensionValue': 'string'
                    },
                ]
            },
            'SnsDestination': {
                'TopicArn': 'string'
            },
            'PinpointDestination': {
                'ApplicationArn': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    Information about an event destination for a configuration set.

    • EventDestinations (list) --

      An array that includes all of the events destinations that have been configured for the configuration set.

      • (dict) --

        In the Amazon SES API v2, events include message sends, deliveries, opens, clicks, bounces, complaints and delivery delays. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

        • Name (string) --

          A name that identifies the event destination.

        • Enabled (boolean) --

          If true , the event destination is enabled. When the event destination is enabled, the specified event types are sent to the destinations in this EventDestinationDefinition .

          If false , the event destination is disabled. When the event destination is disabled, events aren't sent to the specified destinations.

        • MatchingEventTypes (list) --

          The types of events that Amazon SES sends to the specified event destinations.

          • (string) --

            An email sending event type. For example, email sends, opens, and bounces are all email events.

        • KinesisFirehoseDestination (dict) --

          An object that defines an Amazon Kinesis Data Firehose destination for email events. You can use Amazon Kinesis Data Firehose to stream data to other services, such as Amazon S3 and Amazon Redshift.

          • IamRoleArn (string) --

            The Amazon Resource Name (ARN) of the IAM role that the Amazon SES API v2 uses to send email events to the Amazon Kinesis Data Firehose stream.

          • DeliveryStreamArn (string) --

            The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose stream that the Amazon SES API v2 sends email events to.

        • CloudWatchDestination (dict) --

          An object that defines an Amazon CloudWatch destination for email events. You can use Amazon CloudWatch to monitor and gain insights on your email sending metrics.

          • DimensionConfigurations (list) --

            An array of objects that define the dimensions to use when you send email events to Amazon CloudWatch.

            • (dict) --

              An object that defines the dimension configuration to use when you send email events to Amazon CloudWatch.

              • DimensionName (string) --

                The name of an Amazon CloudWatch dimension associated with an email sending metric. The name has to meet the following criteria:

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

                • It can contain no more than 256 characters.

              • DimensionValueSource (string) --

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

              • DefaultDimensionValue (string) --

                The default value of the dimension that is published to Amazon CloudWatch if you don't provide the value of the dimension when you send an email. This value has to meet the following criteria:

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

                • It can contain no more than 256 characters.

        • SnsDestination (dict) --

          An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to send notification when certain email events occur.

          • TopicArn (string) --

            The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish email events to. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • PinpointDestination (dict) --

          An object that defines an Amazon Pinpoint project destination for email events. You can send email event data to a Amazon Pinpoint project to view metrics using the Transactional Messaging dashboards that are built in to Amazon Pinpoint. For more information, see Transactional Messaging Charts in the Amazon Pinpoint User Guide .

          • ApplicationArn (string) --

            The Amazon Resource Name (ARN) of the Amazon Pinpoint project that you want to send email events to.

GetImportJob (updated) Link ¶
Changes (response)
{'ImportDestination': {'ContactListDestination': {'ContactListImportAction': 'DELETE '
                                                                             '| '
                                                                             'PUT',
                                                  'ContactListName': 'string'}}}

Provides information about an import job.

See also: AWS API Documentation

Request Syntax

client.get_import_job(
    JobId='string'
)
type JobId

string

param JobId

[REQUIRED]

The ID of the import job.

rtype

dict

returns

Response Syntax

{
    'JobId': 'string',
    'ImportDestination': {
        'SuppressionListDestination': {
            'SuppressionListImportAction': 'DELETE'|'PUT'
        },
        'ContactListDestination': {
            'ContactListName': 'string',
            'ContactListImportAction': 'DELETE'|'PUT'
        }
    },
    'ImportDataSource': {
        'S3Url': 'string',
        'DataFormat': 'CSV'|'JSON'
    },
    'FailureInfo': {
        'FailedRecordsS3Url': 'string',
        'ErrorMessage': 'string'
    },
    'JobStatus': 'CREATED'|'PROCESSING'|'COMPLETED'|'FAILED',
    'CreatedTimestamp': datetime(2015, 1, 1),
    'CompletedTimestamp': datetime(2015, 1, 1),
    'ProcessedRecordsCount': 123,
    'FailedRecordsCount': 123
}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

    • JobId (string) --

      A string that represents the import job ID.

    • ImportDestination (dict) --

      The destination of the import job.

      • SuppressionListDestination (dict) --

        An object that contains the action of the import job towards suppression list.

        • SuppressionListImportAction (string) --

          The type of action that you want to perform on the address. Acceptable values:

          • PUT: add the addresses to the suppression list. If the record already exists, it will override it with the new value.

          • DELETE: remove the addresses from the suppression list.

      • ContactListDestination (dict) --

        An object that contains the action of the import job towards a contact list.

        • ContactListName (string) --

          The name of the contact list.

        • ContactListImportAction (string) --

          >The type of action that you want to perform on the addresses. Acceptable values:

          • PUT: add the addresses to the contact list. If the record already exists, it will override it with the new value.

          • DELETE: remove the addresses from the contact list.

    • ImportDataSource (dict) --

      The data source of the import job.

      • S3Url (string) --

        An Amazon S3 URL in the format s3://<bucket_name> /<object> .

      • DataFormat (string) --

        The data format of the import job's data source.

    • FailureInfo (dict) --

      The failure details about an import job.

      • FailedRecordsS3Url (string) --

        An Amazon S3 presigned URL that contains all the failed records and related information.

      • ErrorMessage (string) --

        A message about why the import job failed.

    • JobStatus (string) --

      The status of the import job.

    • CreatedTimestamp (datetime) --

      The time stamp of when the import job was created.

    • CompletedTimestamp (datetime) --

      The time stamp of when the import job was completed.

    • ProcessedRecordsCount (integer) --

      The current number of records processed.

    • FailedRecordsCount (integer) --

      The number of records that failed processing because of invalid input or other reasons.

ListImportJobs (updated) Link ¶
Changes (request, response)
Request
{'ImportDestinationType': {'CONTACT_LIST'}}
Response
{'ImportJobs': {'ImportDestination': {'ContactListDestination': {'ContactListImportAction': 'DELETE '
                                                                                            '| '
                                                                                            'PUT',
                                                                 'ContactListName': 'string'}}}}

Lists all of the import jobs.

See also: AWS API Documentation

Request Syntax

client.list_import_jobs(
    ImportDestinationType='SUPPRESSION_LIST'|'CONTACT_LIST',
    NextToken='string',
    PageSize=123
)
type ImportDestinationType

string

param ImportDestinationType

The destination of the import job, which can be used to list import jobs that have a certain ImportDestinationType .

type NextToken

string

param NextToken

A string token indicating that there might be additional import jobs available to be listed. Copy this token to a subsequent call to ListImportJobs with the same parameters to retrieve the next page of import jobs.

type PageSize

integer

param PageSize

Maximum number of import jobs to return at once. Use this parameter to paginate results. If additional import jobs exist beyond the specified limit, the NextToken element is sent in the response. Use the NextToken value in subsequent requests to retrieve additional addresses.

rtype

dict

returns

Response Syntax

{
    'ImportJobs': [
        {
            'JobId': 'string',
            'ImportDestination': {
                'SuppressionListDestination': {
                    'SuppressionListImportAction': 'DELETE'|'PUT'
                },
                'ContactListDestination': {
                    'ContactListName': 'string',
                    'ContactListImportAction': 'DELETE'|'PUT'
                }
            },
            'JobStatus': 'CREATED'|'PROCESSING'|'COMPLETED'|'FAILED',
            'CreatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

    • ImportJobs (list) --

      A list of the import job summaries.

      • (dict) --

        A summary of the import job.

        • JobId (string) --

          A string that represents the import job ID.

        • ImportDestination (dict) --

          An object that contains details about the resource destination the import job is going to target.

          • SuppressionListDestination (dict) --

            An object that contains the action of the import job towards suppression list.

            • SuppressionListImportAction (string) --

              The type of action that you want to perform on the address. Acceptable values:

              • PUT: add the addresses to the suppression list. If the record already exists, it will override it with the new value.

              • DELETE: remove the addresses from the suppression list.

          • ContactListDestination (dict) --

            An object that contains the action of the import job towards a contact list.

            • ContactListName (string) --

              The name of the contact list.

            • ContactListImportAction (string) --

              >The type of action that you want to perform on the addresses. Acceptable values:

              • PUT: add the addresses to the contact list. If the record already exists, it will override it with the new value.

              • DELETE: remove the addresses from the contact list.

        • JobStatus (string) --

          The status of the import job.

        • CreatedTimestamp (datetime) --

          The date and time when the import job was created.

    • NextToken (string) --

      A string token indicating that there might be additional import jobs available to be listed. Copy this token to a subsequent call to ListImportJobs with the same parameters to retrieve the next page of import jobs.

SendEmail (updated) Link ¶
Changes (request)
{'ListManagementOptions': {'ContactListName': 'string', 'TopicName': 'string'}}

Sends an email message. You can use the Amazon SES API v2 to send two types of messages:

  • Simple – A standard email message. When you create this type of message, you specify the sender, the recipient, and the message body, and Amazon SES assembles the message for you.

  • Raw – A raw, MIME-formatted email message. When you send this type of email, you have to specify all of the message headers, as well as the message body. You can use this message type to send messages that contain attachments. The message that you specify has to be a valid MIME message.

  • Templated – A message that contains personalization tags. When you send this type of email, Amazon SES API v2 automatically replaces the tags with values that you specify.

See also: AWS API Documentation

Request Syntax

client.send_email(
    FromEmailAddress='string',
    FromEmailAddressIdentityArn='string',
    Destination={
        'ToAddresses': [
            'string',
        ],
        'CcAddresses': [
            'string',
        ],
        'BccAddresses': [
            'string',
        ]
    },
    ReplyToAddresses=[
        'string',
    ],
    FeedbackForwardingEmailAddress='string',
    FeedbackForwardingEmailAddressIdentityArn='string',
    Content={
        'Simple': {
            'Subject': {
                'Data': 'string',
                'Charset': 'string'
            },
            'Body': {
                'Text': {
                    'Data': 'string',
                    'Charset': 'string'
                },
                'Html': {
                    'Data': 'string',
                    'Charset': 'string'
                }
            }
        },
        'Raw': {
            'Data': b'bytes'
        },
        'Template': {
            'TemplateName': 'string',
            'TemplateArn': 'string',
            'TemplateData': 'string'
        }
    },
    EmailTags=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    ConfigurationSetName='string',
    ListManagementOptions={
        'ContactListName': 'string',
        'TopicName': 'string'
    }
)
type FromEmailAddress

string

param FromEmailAddress

The email address that you want to use as the "From" address for the email. The address that you specify has to be verified.

type FromEmailAddressIdentityArn

string

param FromEmailAddressIdentityArn

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 FromEmailAddress 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 sender@example.com, then you would specify the FromEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FromEmailAddress to be sender@example.com.

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

For Raw emails, the FromEmailAddressIdentityArn value overrides the X-SES-SOURCE-ARN and X-SES-FROM-ARN headers specified in raw email message content.

type Destination

dict

param Destination

An object that contains the recipients of the email message.

  • ToAddresses (list) --

    An array that contains the email addresses of the "To" recipients for the email.

    • (string) --

  • CcAddresses (list) --

    An array that contains the email addresses of the "CC" (carbon copy) recipients for the email.

    • (string) --

  • BccAddresses (list) --

    An array that contains the email addresses of the "BCC" (blind carbon copy) recipients for the email.

    • (string) --

type ReplyToAddresses

list

param ReplyToAddresses

The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.

  • (string) --

type FeedbackForwardingEmailAddress

string

param FeedbackForwardingEmailAddress

The address that you want bounce and complaint notifications to be sent to.

type FeedbackForwardingEmailAddressIdentityArn

string

param FeedbackForwardingEmailAddressIdentityArn

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 FeedbackForwardingEmailAddress 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 FeedbackForwardingEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FeedbackForwardingEmailAddress to be feedback@example.com.

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

type Content

dict

param Content

[REQUIRED]

An object that contains the body of the message. You can send either a Simple message Raw message or a template Message.

  • Simple (dict) --

    The simple email message. The message consists of a subject and a message body.

    • Subject (dict) -- [REQUIRED]

      The subject line of the email. The subject line can only contain 7-bit ASCII characters. However, you can specify non-ASCII characters in the subject line by using encoded-word syntax, as described in RFC 2047.

      • Data (string) -- [REQUIRED]

        The content of the message itself.

      • Charset (string) --

        The character set for the content. Because of the constraints of the SMTP protocol, Amazon SES uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify UTF-8 , ISO-8859-1 , or Shift_JIS .

    • Body (dict) -- [REQUIRED]

      The body of the message. You can specify an HTML version of the message, a text-only version of the message, or both.

      • Text (dict) --

        An object that represents the version of the message that is displayed in email clients that don't support HTML, or clients where the recipient has disabled HTML rendering.

        • Data (string) -- [REQUIRED]

          The content of the message itself.

        • Charset (string) --

          The character set for the content. Because of the constraints of the SMTP protocol, Amazon SES uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify UTF-8 , ISO-8859-1 , or Shift_JIS .

      • Html (dict) --

        An object that represents the version of the message that is displayed in email clients that support HTML. HTML messages can include formatted text, hyperlinks, images, and more.

        • Data (string) -- [REQUIRED]

          The content of the message itself.

        • Charset (string) --

          The character set for the content. Because of the constraints of the SMTP protocol, Amazon SES uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify UTF-8 , ISO-8859-1 , or Shift_JIS .

  • Raw (dict) --

    The raw email message. The message has to meet the following criteria:

    • The message has to contain a header and a body, separated by one blank line.

    • All of the required header fields must be present in the message.

    • Each part of a multipart MIME message must be formatted properly.

    • If you include attachments, they must be in a file format that the Amazon SES API v2 supports.

    • The entire message must be Base64 encoded.

    • If any of the MIME parts in your message contain content that is outside of the 7-bit ASCII character range, you should encode that content to ensure that recipients' email clients render the message properly.

    • The length of any single line of text in the message can't exceed 1,000 characters. This restriction is defined in RFC 5321.

    • Data (bytes) -- [REQUIRED]

      The raw email message. The message has to meet the following criteria:

      • The message has to contain a header and a body, separated by one blank line.

      • All of the required header fields must be present in the message.

      • Each part of a multipart MIME message must be formatted properly.

      • Attachments must be in a file format that the Amazon SES supports.

      • The entire message must be Base64 encoded.

      • If any of the MIME parts in your message contain content that is outside of the 7-bit ASCII character range, you should encode that content to ensure that recipients' email clients render the message properly.

      • The length of any single line of text in the message can't exceed 1,000 characters. This restriction is defined in RFC 5321.

  • Template (dict) --

    The template to use for the email message.

    • TemplateName (string) --

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

    • TemplateArn (string) --

      The Amazon Resource Name (ARN) of the template.

    • TemplateData (string) --

      An object that defines the values to use for message variables in the template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the value to use for that variable.

type EmailTags

list

param EmailTags

A list of tags, in the form of name/value pairs, to apply to an email that you send using the SendEmail operation. 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 apply to an email. You can use message tags when you publish email sending events.

    • Name (string) -- [REQUIRED]

      The name of the message tag. The message tag name has to meet the following criteria:

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

      • It can contain no more than 256 characters.

    • Value (string) -- [REQUIRED]

      The value of the message tag. The message tag value has to meet the following criteria:

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

      • It can contain no more than 256 characters.

type ConfigurationSetName

string

param ConfigurationSetName

The name of the configuration set that you want to use when sending the email.

type ListManagementOptions

dict

param ListManagementOptions

An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to unsubscribe.

  • ContactListName (string) -- [REQUIRED]

    The name of the contact list.

  • TopicName (string) --

    The name of the topic.

rtype

dict

returns

Response Syntax

{
    'MessageId': 'string'
}

Response Structure

  • (dict) --

    A unique message ID that you receive when an email is accepted for sending.

    • MessageId (string) --

      A unique identifier for the message that is generated when the message is accepted.

      Note

      It's possible for Amazon SES to accept a message without sending it. This can happen when the message that you're trying to send has an attachment contains a virus, or when you send a templated email that contains invalid personalization content, for example.

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

Update the configuration of an event destination for a configuration set.

Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

See also: AWS API Documentation

Request Syntax

client.update_configuration_set_event_destination(
    ConfigurationSetName='string',
    EventDestinationName='string',
    EventDestination={
        'Enabled': True|False,
        'MatchingEventTypes': [
            'SEND'|'REJECT'|'BOUNCE'|'COMPLAINT'|'DELIVERY'|'OPEN'|'CLICK'|'RENDERING_FAILURE'|'DELIVERY_DELAY'|'SUBSCRIPTION',
        ],
        'KinesisFirehoseDestination': {
            'IamRoleArn': 'string',
            'DeliveryStreamArn': 'string'
        },
        'CloudWatchDestination': {
            'DimensionConfigurations': [
                {
                    'DimensionName': 'string',
                    'DimensionValueSource': 'MESSAGE_TAG'|'EMAIL_HEADER'|'LINK_TAG',
                    'DefaultDimensionValue': 'string'
                },
            ]
        },
        'SnsDestination': {
            'TopicArn': 'string'
        },
        'PinpointDestination': {
            'ApplicationArn': 'string'
        }
    }
)
type ConfigurationSetName

string

param ConfigurationSetName

[REQUIRED]

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

type EventDestinationName

string

param EventDestinationName

[REQUIRED]

The name of the event destination that you want to modify.

type EventDestination

dict

param EventDestination

[REQUIRED]

An object that defines the event destination.

  • Enabled (boolean) --

    If true , the event destination is enabled. When the event destination is enabled, the specified event types are sent to the destinations in this EventDestinationDefinition .

    If false , the event destination is disabled. When the event destination is disabled, events aren't sent to the specified destinations.

  • MatchingEventTypes (list) --

    An array that specifies which events the Amazon SES API v2 should send to the destinations in this EventDestinationDefinition .

    • (string) --

      An email sending event type. For example, email sends, opens, and bounces are all email events.

  • KinesisFirehoseDestination (dict) --

    An object that defines an Amazon Kinesis Data Firehose destination for email events. You can use Amazon Kinesis Data Firehose to stream data to other services, such as Amazon S3 and Amazon Redshift.

    • IamRoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the IAM role that the Amazon SES API v2 uses to send email events to the Amazon Kinesis Data Firehose stream.

    • DeliveryStreamArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose stream that the Amazon SES API v2 sends email events to.

  • CloudWatchDestination (dict) --

    An object that defines an Amazon CloudWatch destination for email events. You can use Amazon CloudWatch to monitor and gain insights on your email sending metrics.

    • DimensionConfigurations (list) -- [REQUIRED]

      An array of objects that define the dimensions to use when you send email events to Amazon CloudWatch.

      • (dict) --

        An object that defines the dimension configuration to use when you send email events to Amazon CloudWatch.

        • DimensionName (string) -- [REQUIRED]

          The name of an Amazon CloudWatch dimension associated with an email sending metric. The name has to meet the following criteria:

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

          • It can contain no more than 256 characters.

        • DimensionValueSource (string) -- [REQUIRED]

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

        • DefaultDimensionValue (string) -- [REQUIRED]

          The default value of the dimension that is published to Amazon CloudWatch if you don't provide the value of the dimension when you send an email. This value has to meet the following criteria:

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

          • It can contain no more than 256 characters.

  • SnsDestination (dict) --

    An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to send notification when certain email events occur.

    • TopicArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish email events to. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

  • PinpointDestination (dict) --

    An object that defines an Amazon Pinpoint project destination for email events. You can send email event data to a Amazon Pinpoint project to view metrics using the Transactional Messaging dashboards that are built in to Amazon Pinpoint. For more information, see Transactional Messaging Charts in the Amazon Pinpoint User Guide .

    • ApplicationArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Pinpoint project that you want to send email events to.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.