2022/10/18 - Amazon Simple Email Service - 1 new4 updated api methods
Changes This release allows subscribers to enable Dedicated IPs (managed) to send email via a fully managed dedicated IP experience. It also adds identities' VerificationStatus in the response of GetEmailIdentity and ListEmailIdentities APIs, and ImportJobs counts in the response of ListImportJobs API.
Retrieve information about the dedicated pool.
See also: AWS API Documentation
Request Syntax
client.get_dedicated_ip_pool( PoolName='string' )
string
[REQUIRED]
The name of the dedicated IP pool to retrieve.
dict
Response Syntax
{ 'DedicatedIpPool': { 'PoolName': 'string', 'ScalingMode': 'STANDARD'|'MANAGED' } }
Response Structure
(dict) --
The following element is returned by the service.
DedicatedIpPool (dict) --
An object that contains information about a dedicated IP pool.
PoolName (string) --
The name of the dedicated IP pool.
ScalingMode (string) --
The type of the dedicated IP pool.
STANDARD – A dedicated IP pool where the customer can control which IPs are part of the pool.
MANAGED – A dedicated IP pool where the reputation and number of IPs is automatically managed by Amazon SES.
{'ScalingMode': 'STANDARD | MANAGED'}
Create a new pool of dedicated IP addresses. A pool can include one or more dedicated IP addresses that are associated with your Amazon Web Services account. You can associate a pool with a configuration set. When you send an email that uses that configuration set, the message is sent from one of the addresses in the associated pool.
See also: AWS API Documentation
Request Syntax
client.create_dedicated_ip_pool( PoolName='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], ScalingMode='STANDARD'|'MANAGED' )
string
[REQUIRED]
The name of the dedicated IP pool.
list
An object that defines the tags (keys and values) that you want to associate with the pool.
(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 Amazon Web Services; 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 Amazon Web Services account, not any other accounts that share the resource. In addition, the tags are available only for resources that are located in the specified Amazon Web Services Region for your Amazon Web Services 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.
string
The type of scaling mode.
dict
Response Syntax
{}
Response Structure
(dict) --
An HTTP 200 response if the request succeeds, or an error message if the request fails.
{'VerificationStatus': 'PENDING | SUCCESS | FAILED | TEMPORARY_FAILURE | ' 'NOT_STARTED'}
Provides information about a specific identity, including the identity's verification status, sending authorization policies, its DKIM authentication status, and its custom Mail-From settings.
See also: AWS API Documentation
Request Syntax
client.get_email_identity( EmailIdentity='string' )
string
[REQUIRED]
The email identity.
dict
Response Syntax
{ 'IdentityType': 'EMAIL_ADDRESS'|'DOMAIN'|'MANAGED_DOMAIN', 'FeedbackForwardingStatus': True|False, 'VerifiedForSendingStatus': True|False, 'DkimAttributes': { 'SigningEnabled': True|False, 'Status': 'PENDING'|'SUCCESS'|'FAILED'|'TEMPORARY_FAILURE'|'NOT_STARTED', 'Tokens': [ 'string', ], 'SigningAttributesOrigin': 'AWS_SES'|'EXTERNAL', 'NextSigningKeyLength': 'RSA_1024_BIT'|'RSA_2048_BIT', 'CurrentSigningKeyLength': 'RSA_1024_BIT'|'RSA_2048_BIT', 'LastKeyGenerationTimestamp': datetime(2015, 1, 1) }, 'MailFromAttributes': { 'MailFromDomain': 'string', 'MailFromDomainStatus': 'PENDING'|'SUCCESS'|'FAILED'|'TEMPORARY_FAILURE', 'BehaviorOnMxFailure': 'USE_DEFAULT_VALUE'|'REJECT_MESSAGE' }, 'Policies': { 'string': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'ConfigurationSetName': 'string', 'VerificationStatus': 'PENDING'|'SUCCESS'|'FAILED'|'TEMPORARY_FAILURE'|'NOT_STARTED' }
Response Structure
(dict) --
Details about an email identity.
IdentityType (string) --
The email identity type. Note: the MANAGED_DOMAIN identity type is not supported.
FeedbackForwardingStatus (boolean) --
The feedback forwarding configuration for the identity.
If the value is true, you receive email notifications when bounce or complaint events occur. These notifications are sent to the address that you specified in the Return-Path header of the original email.
You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).
VerifiedForSendingStatus (boolean) --
Specifies whether or not the identity is verified. You can only send email from verified email addresses or domains. For more information about verifying identities, see the Amazon Pinpoint User Guide.
DkimAttributes (dict) --
An object that contains information about the DKIM attributes for the identity.
SigningEnabled (boolean) --
If the value is true, then the messages that you send from the identity are signed using DKIM. If the value is false, then the messages that you send from the identity aren't DKIM-signed.
Status (string) --
Describes whether or not Amazon SES has successfully located the DKIM records in the DNS records for the domain. The status can be one of the following:
PENDING – The verification process was initiated, but Amazon SES hasn't yet detected the DKIM records in the DNS configuration for the domain.
SUCCESS – The verification process completed successfully.
FAILED – The verification process failed. This typically occurs when Amazon SES fails to find the DKIM records in the DNS configuration of the domain.
TEMPORARY_FAILURE – A temporary issue is preventing Amazon SES from determining the DKIM authentication status of the domain.
NOT_STARTED – The DKIM verification process hasn't been initiated for the domain.
Tokens (list) --
If you used Easy DKIM to configure DKIM authentication for the domain, then this object contains a set of unique strings that you use to create a set of CNAME records that you add to the DNS configuration for your domain. When Amazon SES detects these records in the DNS configuration for your domain, the DKIM authentication process is complete.
If you configured DKIM authentication for the domain by providing your own public-private key pair, then this object contains the selector for the public key.
Regardless of the DKIM authentication method you use, Amazon SES searches for the appropriate records in the DNS configuration of the domain for up to 72 hours.
(string) --
SigningAttributesOrigin (string) --
A string that indicates how DKIM was configured for the identity. These are the possible values:
AWS_SES – Indicates that DKIM was configured for the identity by using Easy DKIM.
EXTERNAL – Indicates that DKIM was configured for the identity by using Bring Your Own DKIM (BYODKIM).
NextSigningKeyLength (string) --
[Easy DKIM] The key length of the future DKIM key pair to be generated. This can be changed at most once per day.
CurrentSigningKeyLength (string) --
[Easy DKIM] The key length of the DKIM key pair in use.
LastKeyGenerationTimestamp (datetime) --
[Easy DKIM] The last time a key pair was generated for this identity.
MailFromAttributes (dict) --
An object that contains information about the Mail-From attributes for the email identity.
MailFromDomain (string) --
The name of a domain that an email identity uses as a custom MAIL FROM domain.
MailFromDomainStatus (string) --
The status of the MAIL FROM domain. This status can have the following values:
PENDING – Amazon SES hasn't started searching for the MX record yet.
SUCCESS – Amazon SES detected the required MX record for the MAIL FROM domain.
FAILED – Amazon SES can't find the required MX record, or the record no longer exists.
TEMPORARY_FAILURE – A temporary issue occurred, which prevented Amazon SES from determining the status of the MAIL FROM domain.
BehaviorOnMxFailure (string) --
The action to take if the required MX record can't be found when you send an email. When you set this value to USE_DEFAULT_VALUE, the mail is sent using amazonses.com as the MAIL FROM domain. When you set this value to REJECT_MESSAGE, the Amazon SES API v2 returns a MailFromDomainNotVerified error, and doesn't attempt to deliver the email.
These behaviors are taken when the custom MAIL FROM domain configuration is in the Pending, Failed, and TemporaryFailure states.
Policies (dict) --
A map of policy names to policies.
(string) --
The name of the policy.
The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.
(string) --
The text of the policy in JSON format. The policy cannot exceed 4 KB.
For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide.
Tags (list) --
An array of objects that define the tags (keys and values) that are associated with the email identity.
(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 Amazon Web Services; 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 Amazon Web Services account, not any other accounts that share the resource. In addition, the tags are available only for resources that are located in the specified Amazon Web Services Region for your Amazon Web Services 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.
ConfigurationSetName (string) --
The configuration set used by default when sending from this identity.
VerificationStatus (string) --
The verification status of the identity. The status can be one of the following:
PENDING – The verification process was initiated, but Amazon SES hasn't yet been able to verify the identity.
SUCCESS – The verification process completed successfully.
FAILED – The verification process failed.
TEMPORARY_FAILURE – A temporary issue is preventing Amazon SES from determining the verification status of the identity.
NOT_STARTED – The verification process hasn't been initiated for the identity.
{'EmailIdentities': {'VerificationStatus': 'PENDING | SUCCESS | FAILED | ' 'TEMPORARY_FAILURE | NOT_STARTED'}}
Returns a list of all of the email identities that are associated with your Amazon Web Services account. An identity can be either an email address or a domain. This operation returns identities that are verified as well as those that aren't. This operation returns identities that are associated with Amazon SES and Amazon Pinpoint.
See also: AWS API Documentation
Request Syntax
client.list_email_identities( NextToken='string', PageSize=123 )
string
A token returned from a previous call to ListEmailIdentities to indicate the position in the list of identities.
integer
The number of results to show in a single call to ListEmailIdentities. 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.
The value you specify has to be at least 0, and can be no more than 1000.
dict
Response Syntax
{ 'EmailIdentities': [ { 'IdentityType': 'EMAIL_ADDRESS'|'DOMAIN'|'MANAGED_DOMAIN', 'IdentityName': 'string', 'SendingEnabled': True|False, 'VerificationStatus': 'PENDING'|'SUCCESS'|'FAILED'|'TEMPORARY_FAILURE'|'NOT_STARTED' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
A list of all of the identities that you've attempted to verify, regardless of whether or not those identities were successfully verified.
EmailIdentities (list) --
An array that includes all of the email identities associated with your Amazon Web Services account.
(dict) --
Information about an email identity.
IdentityType (string) --
The email identity type. Note: the MANAGED_DOMAIN type is not supported for email identity types.
IdentityName (string) --
The address or domain of the identity.
SendingEnabled (boolean) --
Indicates whether or not you can send email from the identity.
An identity is an email address or domain that you send email from. Before you can send email from an identity, you have to demostrate that you own the identity, and that you authorize Amazon SES to send email from that identity.
VerificationStatus (string) --
The verification status of the identity. The status can be one of the following:
PENDING – The verification process was initiated, but Amazon SES hasn't yet been able to verify the identity.
SUCCESS – The verification process completed successfully.
FAILED – The verification process failed.
TEMPORARY_FAILURE – A temporary issue is preventing Amazon SES from determining the verification status of the identity.
NOT_STARTED – The verification process hasn't been initiated for the identity.
NextToken (string) --
A token that indicates that there are additional configuration sets to list. To view additional configuration sets, issue another request to ListEmailIdentities, and pass this token in the NextToken parameter.
{'ImportJobs': {'FailedRecordsCount': 'integer', 'ProcessedRecordsCount': 'integer'}}
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 )
string
The destination of the import job, which can be used to list import jobs that have a certain ImportDestinationType.
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.
integer
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.
dict
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), 'ProcessedRecordsCount': 123, 'FailedRecordsCount': 123 }, ], '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 to perform on the address. The following are possible 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 to perform on the addresses. The following are the possible 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.
ProcessedRecordsCount (integer) --
The current number of records processed.
FailedRecordsCount (integer) --
The number of records that failed processing because of invalid input or other reasons.
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.