2019/11/25 - Amazon Simple Email Service - 6 new3 updated api methods
Changes Update sesv2 client to latest version
Puts (overwrites) an email destination in your suppression list.
See also: AWS API Documentation
Request Syntax
client.put_suppressed_destination( EmailAddress='string', Reason='BOUNCE'|'COMPLAINT' )
string
[REQUIRED]
Email destination to be suppressed.
string
[REQUIRED]
Reason for which the email destination is suppressed.
dict
Response Syntax
{}
Response Structure
(dict) --
An HTTP 200 response if the request succeeds, or an error message if the request fails.
Used to delete a suppressed email destination from your suppression list.
See also: AWS API Documentation
Request Syntax
client.delete_suppressed_destination( EmailAddress='string' )
string
[REQUIRED]
The suppressed email destination to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
An HTTP 200 response if the request succeeds, or an error message if the request fails.
Specify your account's suppression preferences for a configuration set.
See also: AWS API Documentation
Request Syntax
client.put_configuration_set_suppression_options( ConfigurationSetName='string', SuppressedReasons=[ 'BOUNCE'|'COMPLAINT', ] )
string
[REQUIRED]
The name of the configuration set that you want to enable or disable email sending for.
list
A list of reasons to suppress email addresses. The only valid reasons are:
COMPLAINT – Amazon SES will suppress an email address that receives a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
(string) --
A string representing the cause for suppression for an email destination. It can be one of the following:
COMPLAINT – Amazon SES will suppress an email address that receive a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
dict
Response Syntax
{}
Response Structure
(dict) --
An HTTP 200 response if the request succeeds, or an error message if the request fails.
Used to fetch a list suppressed email destinations from your suppression list.
See also: AWS API Documentation
Request Syntax
client.list_suppressed_destinations( Reasons=[ 'BOUNCE'|'COMPLAINT', ], StartDate=datetime(2015, 1, 1), EndDate=datetime(2015, 1, 1), NextToken='string', PageSize=123 )
list
Filters email destinations suppressed by the given reasons.
(string) --
A string representing the cause for suppression for an email destination. It can be one of the following:
COMPLAINT – Amazon SES will suppress an email address that receive a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
datetime
Filters email destinations suppressed before the given time.
datetime
Filters email destinations suppressed after the given time.
string
A token returned from a previous call to ListSuppressedDestinations to indicate the position in the list of suppressed email destinations.
integer
The number of results to show in a single call to ListSuppressedDestinations. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.
dict
Response Syntax
{ 'SuppressedDestinationSummaries': [ { 'EmailAddress': 'string', 'Reason': 'BOUNCE'|'COMPLAINT', 'LastUpdateTime': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
A list of suppressed email destinations.
SuppressedDestinationSummaries (list) --
A list of summaries, each containing a summary for a suppressed email destination.
(dict) --
A summary for the suppressed email destination.
EmailAddress (string) --
The suppressed email destination.
Reason (string) --
The reason for which the email destination is suppressed.
LastUpdateTime (datetime) --
The last time the suppressed destination was updated.
NextToken (string) --
A token that indicates that there are additional suppressed destinations to list. To view additional suppressed destinations, issue another request to ListSuppressedDestinations, and pass this token in the NextToken parameter.
Used to fetch a single suppressed email destination from your suppression list.
See also: AWS API Documentation
Request Syntax
client.get_suppressed_destination( EmailAddress='string' )
string
[REQUIRED]
Email destination to fetch from the suppression list.
dict
Response Syntax
{ 'SuppressedDestination': { 'EmailAddress': 'string', 'Reason': 'BOUNCE'|'COMPLAINT', 'LastUpdateTime': datetime(2015, 1, 1), 'Attributes': { 'MessageId': 'string', 'FeedbackId': 'string' } } }
Response Structure
(dict) --
Information about the suppressed email destination.
SuppressedDestination (dict) --
An object containing information about the suppressed email destination.
EmailAddress (string) --
The suppressed email destination.
Reason (string) --
The reason for which the email destination is suppressed.
LastUpdateTime (datetime) --
The last time the suppressed destination was updated.
Attributes (dict) --
Optional value with information about the sources of the suppression.
MessageId (string) --
A unique identifier of the message that caused the suppression of the email destination.
FeedbackId (string) --
A unique identifier of the suppression cause.
Change your account's suppression preferences for your account.
See also: AWS API Documentation
Request Syntax
client.put_account_suppression_attributes( SuppressedReasons=[ 'BOUNCE'|'COMPLAINT', ] )
list
A list of reasons to suppress email addresses. The only valid reasons are:
COMPLAINT – Amazon SES will suppress an email address that receives a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
(string) --
A string representing the cause for suppression for an email destination. It can be one of the following:
COMPLAINT – Amazon SES will suppress an email address that receive a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
dict
Response Syntax
{}
Response Structure
(dict) --
An HTTP 200 response if the request succeeds, or an error message if the request fails.
{'SuppressionOptions': {'SuppressedReasons': ['BOUNCE | COMPLAINT']}}
Create a configuration set. Configuration sets are groups of rules that you can apply to the emails that you send. You apply a configuration set to an email by specifying the name of the configuration set when you call the Amazon SES API v2. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.
See also: AWS API Documentation
Request Syntax
client.create_configuration_set( ConfigurationSetName='string', TrackingOptions={ 'CustomRedirectDomain': 'string' }, DeliveryOptions={ 'TlsPolicy': 'REQUIRE'|'OPTIONAL', 'SendingPoolName': 'string' }, ReputationOptions={ 'ReputationMetricsEnabled': True|False, 'LastFreshStart': datetime(2015, 1, 1) }, SendingOptions={ 'SendingEnabled': True|False }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ], SuppressionOptions={ 'SuppressedReasons': [ 'BOUNCE'|'COMPLAINT', ] } )
string
[REQUIRED]
The name of the configuration set.
dict
An object that defines the open and click tracking options for emails that you send using the configuration set.
CustomRedirectDomain (string) -- [REQUIRED]
The domain that you want to use for tracking open and click events.
dict
An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.
TlsPolicy (string) --
Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is Require, messages are only delivered if a TLS connection can be established. If the value is Optional, messages can be delivered in plain text if a TLS connection can't be established.
SendingPoolName (string) --
The name of the dedicated IP pool that you want to associate with the configuration set.
dict
An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.
ReputationMetricsEnabled (boolean) --
If true, tracking of reputation metrics is enabled for the configuration set. If false, tracking of reputation metrics is disabled for the configuration set.
LastFreshStart (datetime) --
The date and time (in Unix time) when the reputation metrics were last given a fresh start. When your account is given a fresh start, your reputation metrics are calculated starting from the date of the fresh start.
dict
An object that defines whether or not Amazon SES can send email that you send using the configuration set.
SendingEnabled (boolean) --
If true, email sending is enabled for the configuration set. If false, email sending is disabled for the configuration set.
list
An array of objects that define the tags (keys and values) that you want to associate with the configuration set.
(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.
dict
An object that contains information about your account's suppression preferences.
SuppressedReasons (list) --
A list of reasons to suppress email addresses. The only valid reasons are:
COMPLAINT – Amazon SES will suppress an email address that receives a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
(string) --
A string representing the cause for suppression for an email destination. It can be one of the following:
COMPLAINT – Amazon SES will suppress an email address that receive a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
dict
Response Syntax
{}
Response Structure
(dict) --
An HTTP 200 response if the request succeeds, or an error message if the request fails.
{'SuppressionAttributes': {'SuppressedReasons': ['BOUNCE | COMPLAINT']}}
Obtain information about the email-sending status and capabilities of your Amazon SES account in the current AWS Region.
See also: AWS API Documentation
Request Syntax
client.get_account()
dict
Response Syntax
{ 'DedicatedIpAutoWarmupEnabled': True|False, 'EnforcementStatus': 'string', 'ProductionAccessEnabled': True|False, 'SendQuota': { 'Max24HourSend': 123.0, 'MaxSendRate': 123.0, 'SentLast24Hours': 123.0 }, 'SendingEnabled': True|False, 'SuppressionAttributes': { 'SuppressedReasons': [ 'BOUNCE'|'COMPLAINT', ] } }
Response Structure
(dict) --
A list of details about the email-sending capabilities of your Amazon SES account in the current AWS Region.
DedicatedIpAutoWarmupEnabled (boolean) --
Indicates whether or not the automatic warm-up feature is enabled for dedicated IP addresses that are associated with your account.
EnforcementStatus (string) --
The reputation status of your Amazon SES account. The status can be one of the following:
HEALTHY – There are no reputation-related issues that currently impact your account.
PROBATION – We've identified potential issues with your Amazon SES account. We're placing your account under review while you work on correcting these issues.
SHUTDOWN – Your account's ability to send email is currently paused because of an issue with the email sent from your account. When you correct the issue, you can contact us and request that your account's ability to send email is resumed.
ProductionAccessEnabled (boolean) --
Indicates whether or not your account has production access in the current AWS Region.
If the value is false, then your account is in the sandbox. When your account is in the sandbox, you can only send email to verified identities. Additionally, the maximum number of emails you can send in a 24-hour period (your sending quota) is 200, and the maximum number of emails you can send per second (your maximum sending rate) is 1.
If the value is true, then your account has production access. When your account has production access, you can send email to any address. The sending quota and maximum sending rate for your account vary based on your specific use case.
SendQuota (dict) --
An object that contains information about the per-day and per-second sending limits for your Amazon SES account in the current AWS Region.
Max24HourSend (float) --
The maximum number of emails that you can send in the current AWS Region over a 24-hour period. This value is also called your sending quota.
MaxSendRate (float) --
The maximum number of emails that you can send per second in the current AWS Region. This value is also called your maximum sending rate or your maximum TPS (transactions per second) rate.
SentLast24Hours (float) --
The number of emails sent from your Amazon SES account in the current AWS Region over the past 24 hours.
SendingEnabled (boolean) --
Indicates whether or not email sending is enabled for your Amazon SES account in the current AWS Region.
SuppressionAttributes (dict) --
An object that contains information about your account's suppression preferences.
SuppressedReasons (list) --
A list of reasons to suppress email addresses. The only valid reasons are:
COMPLAINT – Amazon SES will suppress an email address that receives a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
(string) --
A string representing the cause for suppression for an email destination. It can be one of the following:
COMPLAINT – Amazon SES will suppress an email address that receive a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
{'SuppressionOptions': {'SuppressedReasons': ['BOUNCE | COMPLAINT']}}
Get information about an existing configuration set, including the dedicated IP pool that it's associated with, whether or not it's enabled for sending email, and more.
Configuration sets are groups of rules that you can apply to the emails you send. You apply a configuration set to an email by including a reference to the configuration set in the headers of the email. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.
See also: AWS API Documentation
Request Syntax
client.get_configuration_set( ConfigurationSetName='string' )
string
[REQUIRED]
The name of the configuration set that you want to obtain more information about.
dict
Response Syntax
{ 'ConfigurationSetName': 'string', 'TrackingOptions': { 'CustomRedirectDomain': 'string' }, 'DeliveryOptions': { 'TlsPolicy': 'REQUIRE'|'OPTIONAL', 'SendingPoolName': 'string' }, 'ReputationOptions': { 'ReputationMetricsEnabled': True|False, 'LastFreshStart': datetime(2015, 1, 1) }, 'SendingOptions': { 'SendingEnabled': True|False }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'SuppressionOptions': { 'SuppressedReasons': [ 'BOUNCE'|'COMPLAINT', ] } }
Response Structure
(dict) --
Information about a configuration set.
ConfigurationSetName (string) --
The name of the configuration set.
TrackingOptions (dict) --
An object that defines the open and click tracking options for emails that you send using the configuration set.
CustomRedirectDomain (string) --
The domain that you want to use for tracking open and click events.
DeliveryOptions (dict) --
An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.
TlsPolicy (string) --
Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is Require, messages are only delivered if a TLS connection can be established. If the value is Optional, messages can be delivered in plain text if a TLS connection can't be established.
SendingPoolName (string) --
The name of the dedicated IP pool that you want to associate with the configuration set.
ReputationOptions (dict) --
An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.
ReputationMetricsEnabled (boolean) --
If true, tracking of reputation metrics is enabled for the configuration set. If false, tracking of reputation metrics is disabled for the configuration set.
LastFreshStart (datetime) --
The date and time (in Unix time) when the reputation metrics were last given a fresh start. When your account is given a fresh start, your reputation metrics are calculated starting from the date of the fresh start.
SendingOptions (dict) --
An object that defines whether or not Amazon SES can send email that you send using the configuration set.
SendingEnabled (boolean) --
If true, email sending is enabled for the configuration set. If false, email sending is disabled for the configuration set.
Tags (list) --
An array of objects that define the tags (keys and values) that are associated with the configuration set.
(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.
SuppressionOptions (dict) --
An object that contains information about your account's suppression preferences.
SuppressedReasons (list) --
A list of reasons to suppress email addresses. The only valid reasons are:
COMPLAINT – Amazon SES will suppress an email address that receives a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.
(string) --
A string representing the cause for suppression for an email destination. It can be one of the following:
COMPLAINT – Amazon SES will suppress an email address that receive a complaint.
BOUNCE – Amazon SES will suppress an email address that hard bounces.