Amazon Simple Email Service

2015/09/29 - Amazon Simple Email Service - 17 new api methods

CloneReceiptRuleSet (new) Link ¶

Creates a receipt rule set by cloning an existing one. All receipt rules and configurations are copied to the new receipt rule set and are completely independent of the source rule set.

For information about setting up rule sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.clone_receipt_rule_set(
    RuleSetName='string',
    OriginalRuleSetName='string'
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the rule set to create. The name must:

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

  • Start and end with a letter or number.

  • Contain less than 64 characters.

type OriginalRuleSetName

string

param OriginalRuleSetName

[REQUIRED]

The name of the rule set to clone.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeReceiptRule (new) Link ¶

Returns the details of the specified receipt rule.

For information about setting up receipt rules, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.describe_receipt_rule(
    RuleSetName='string',
    RuleName='string'
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the receipt rule set to which the receipt rule belongs.

type RuleName

string

param RuleName

[REQUIRED]

The name of the receipt rule.

rtype

dict

returns

Response Syntax

{
    'Rule': {
        'Name': 'string',
        'Enabled': True|False,
        'TlsPolicy': 'Require'|'Optional',
        'Recipients': [
            'string',
        ],
        'Actions': [
            {
                'S3Action': {
                    'TopicArn': 'string',
                    'BucketName': 'string',
                    'ObjectKeyPrefix': 'string',
                    'KmsKeyArn': 'string'
                },
                'BounceAction': {
                    'TopicArn': 'string',
                    'SmtpReplyCode': 'string',
                    'StatusCode': 'string',
                    'Message': 'string',
                    'Sender': 'string'
                },
                'WorkmailAction': {
                    'TopicArn': 'string',
                    'OrganizationArn': 'string'
                },
                'LambdaAction': {
                    'TopicArn': 'string',
                    'FunctionArn': 'string',
                    'InvocationType': 'Event'|'RequestResponse'
                },
                'StopAction': {
                    'Scope': 'RuleSet',
                    'TopicArn': 'string'
                },
                'AddHeaderAction': {
                    'HeaderName': 'string',
                    'HeaderValue': 'string'
                },
                'SNSAction': {
                    'TopicArn': 'string'
                }
            },
        ],
        'ScanEnabled': True|False
    }
}

Response Structure

  • (dict) --

    • Rule (dict) --

      A data structure that contains the specified receipt rule's name, actions, recipients, domains, enabled status, scan status, and Transport Layer Security (TLS) policy.

      • Name (string) --

        The name of the receipt rule. The name must:

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

        • Start and end with a letter or number.

        • Contain less than 64 characters.

      • Enabled (boolean) --

        If true , the receipt rule is active. The default value is true.

      • TlsPolicy (string) --

        Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to Require , Amazon SES will bounce emails that are not received over TLS. The default is Optional .

      • Recipients (list) --

        The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.

        • (string) --

      • Actions (list) --

        An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.

        • (dict) --

          An action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own. An instance of this data type can represent only one action.

          For information about setting up receipt rules, see the Amazon SES Developer Guide.

          • S3Action (dict) --

            Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.

            • TopicArn (string) --

              The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

            • BucketName (string) --

              The name of the Amazon S3 bucket to which to save the received email.

            • ObjectKeyPrefix (string) --

              The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.

            • KmsKeyArn (string) --

              The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:

              • To use the default master key, provide an ARN in the form of arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses . For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be arn:aws:kms:us-west-2:123456789012:alias/aws/ses . If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.

              • To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the Amazon SES Developer Guide.

              For more information about key policies, see the AWS KMS Developer Guide. If you do not specify a master key, Amazon SES will not encrypt your emails.

              Warning

              Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the AWS Java SDK and AWS Ruby SDK only. For more information about client-side encryption using AWS KMS master keys, see the Amazon S3 Developer Guide.

          • BounceAction (dict) --

            Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).

            • TopicArn (string) --

              The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

            • SmtpReplyCode (string) --

              The SMTP reply code, as defined by RFC 5321.

            • StatusCode (string) --

              The SMTP enhanced status code, as defined by RFC 3463.

            • Message (string) --

              Human-readable text to include in the bounce message.

            • Sender (string) --

              The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.

          • WorkmailAction (dict) --

            Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.

            • TopicArn (string) --

              The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

            • OrganizationArn (string) --

              The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7 . For information about Amazon WorkMail organizations, see the Amazon WorkMail Administrator Guide.

          • LambdaAction (dict) --

            Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.

            • TopicArn (string) --

              The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

            • FunctionArn (string) --

              The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is arn:aws:lambda:us-west-2:account-id:function:MyFunction . For more information about AWS Lambda, see the AWS Lambda Developer Guide.

            • InvocationType (string) --

              The invocation type of the AWS Lambda function. An invocation type of RequestResponse means that the execution of the function will immediately result in a response, and a value of Event means that the function will be invoked asynchronously. The default value is Event . For information about AWS Lambda invocation types, see the AWS Lambda Developer Guide.

              Warning

              There is a 30-second timeout on RequestResponse invocations. You should use Event invocation in most cases. Use RequestResponse only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.

          • StopAction (dict) --

            Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.

            • Scope (string) --

              The scope to which the Stop action applies. That is, what is being stopped.

            • TopicArn (string) --

              The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

          • AddHeaderAction (dict) --

            Adds a header to the received email.

            • HeaderName (string) --

              The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.

            • HeaderValue (string) --

              Must be less than 2048 characters, and must not contain newline characters ("r" or "n").

          • SNSAction (dict) --

            Publishes the email content within a notification to Amazon SNS.

            • TopicArn (string) --

              The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

      • ScanEnabled (boolean) --

        If true , then messages to which this receipt rule applies are scanned for spam and viruses. The default value is true .

SetReceiptRulePosition (new) Link ¶

Sets the position of the specified receipt rule in the receipt rule set.

For information about managing receipt rules, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.set_receipt_rule_position(
    RuleSetName='string',
    RuleName='string',
    After='string'
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the receipt rule set that contains the receipt rule to reposition.

type RuleName

string

param RuleName

[REQUIRED]

The name of the receipt rule to reposition.

type After

string

param After

The name of the receipt rule after which to place the specified receipt rule.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateReceiptRule (new) Link ¶

Creates a receipt rule.

For information about setting up receipt rules, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.create_receipt_rule(
    RuleSetName='string',
    After='string',
    Rule={
        'Name': 'string',
        'Enabled': True|False,
        'TlsPolicy': 'Require'|'Optional',
        'Recipients': [
            'string',
        ],
        'Actions': [
            {
                'S3Action': {
                    'TopicArn': 'string',
                    'BucketName': 'string',
                    'ObjectKeyPrefix': 'string',
                    'KmsKeyArn': 'string'
                },
                'BounceAction': {
                    'TopicArn': 'string',
                    'SmtpReplyCode': 'string',
                    'StatusCode': 'string',
                    'Message': 'string',
                    'Sender': 'string'
                },
                'WorkmailAction': {
                    'TopicArn': 'string',
                    'OrganizationArn': 'string'
                },
                'LambdaAction': {
                    'TopicArn': 'string',
                    'FunctionArn': 'string',
                    'InvocationType': 'Event'|'RequestResponse'
                },
                'StopAction': {
                    'Scope': 'RuleSet',
                    'TopicArn': 'string'
                },
                'AddHeaderAction': {
                    'HeaderName': 'string',
                    'HeaderValue': 'string'
                },
                'SNSAction': {
                    'TopicArn': 'string'
                }
            },
        ],
        'ScanEnabled': True|False
    }
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the rule set to which to add the rule.

type After

string

param After

The name of an existing rule after which the new rule will be placed. If this parameter is null, the new rule will be inserted at the beginning of the rule list.

type Rule

dict

param Rule

[REQUIRED]

A data structure that contains the specified rule's name, actions, recipients, domains, enabled status, scan status, and TLS policy.

  • Name (string) -- [REQUIRED]

    The name of the receipt rule. The name must:

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

    • Start and end with a letter or number.

    • Contain less than 64 characters.

  • Enabled (boolean) --

    If true , the receipt rule is active. The default value is true.

  • TlsPolicy (string) --

    Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to Require , Amazon SES will bounce emails that are not received over TLS. The default is Optional .

  • Recipients (list) --

    The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.

    • (string) --

  • Actions (list) --

    An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.

    • (dict) --

      An action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own. An instance of this data type can represent only one action.

      For information about setting up receipt rules, see the Amazon SES Developer Guide.

      • S3Action (dict) --

        Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.

        • TopicArn (string) --

          The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • BucketName (string) -- [REQUIRED]

          The name of the Amazon S3 bucket to which to save the received email.

        • ObjectKeyPrefix (string) --

          The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.

        • KmsKeyArn (string) --

          The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:

          • To use the default master key, provide an ARN in the form of arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses . For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be arn:aws:kms:us-west-2:123456789012:alias/aws/ses . If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.

          • To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the Amazon SES Developer Guide.

          For more information about key policies, see the AWS KMS Developer Guide. If you do not specify a master key, Amazon SES will not encrypt your emails.

          Warning

          Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the AWS Java SDK and AWS Ruby SDK only. For more information about client-side encryption using AWS KMS master keys, see the Amazon S3 Developer Guide.

      • BounceAction (dict) --

        Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).

        • TopicArn (string) --

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • SmtpReplyCode (string) -- [REQUIRED]

          The SMTP reply code, as defined by RFC 5321.

        • StatusCode (string) --

          The SMTP enhanced status code, as defined by RFC 3463.

        • Message (string) -- [REQUIRED]

          Human-readable text to include in the bounce message.

        • Sender (string) -- [REQUIRED]

          The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.

      • WorkmailAction (dict) --

        Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.

        • TopicArn (string) --

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • OrganizationArn (string) -- [REQUIRED]

          The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7 . For information about Amazon WorkMail organizations, see the Amazon WorkMail Administrator Guide.

      • LambdaAction (dict) --

        Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.

        • TopicArn (string) --

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • FunctionArn (string) -- [REQUIRED]

          The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is arn:aws:lambda:us-west-2:account-id:function:MyFunction . For more information about AWS Lambda, see the AWS Lambda Developer Guide.

        • InvocationType (string) --

          The invocation type of the AWS Lambda function. An invocation type of RequestResponse means that the execution of the function will immediately result in a response, and a value of Event means that the function will be invoked asynchronously. The default value is Event . For information about AWS Lambda invocation types, see the AWS Lambda Developer Guide.

          Warning

          There is a 30-second timeout on RequestResponse invocations. You should use Event invocation in most cases. Use RequestResponse only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.

      • StopAction (dict) --

        Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.

        • Scope (string) -- [REQUIRED]

          The scope to which the Stop action applies. That is, what is being stopped.

        • TopicArn (string) --

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

      • AddHeaderAction (dict) --

        Adds a header to the received email.

        • HeaderName (string) -- [REQUIRED]

          The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.

        • HeaderValue (string) -- [REQUIRED]

          Must be less than 2048 characters, and must not contain newline characters ("r" or "n").

      • SNSAction (dict) --

        Publishes the email content within a notification to Amazon SNS.

        • TopicArn (string) -- [REQUIRED]

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

  • ScanEnabled (boolean) --

    If true , then messages to which this receipt rule applies are scanned for spam and viruses. The default value is true .

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListReceiptRuleSets (new) Link ¶

Lists the receipt rule sets that exist under your AWS account. If there are additional receipt rule sets to be retrieved, you will receive a NextToken that you can provide to the next call to ListReceiptRuleSets to retrieve the additional entries.

For information about managing receipt rule sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.list_receipt_rule_sets(
    NextToken='string'
)
type NextToken

string

param NextToken

A token returned from a previous call to ListReceiptRuleSets to indicate the position in the receipt rule set list.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • RuleSets (list) --

      The metadata for the currently active receipt rule set. The metadata consists of the rule set name and the timestamp of when the rule set was created.

      • (dict) --

        Information about a receipt rule set.

        A receipt rule set is a collection of rules that specify what Amazon SES should do with mail it receives on behalf of your account's verified domains.

        For information about setting up receipt rule sets, see the Amazon SES Developer Guide.

        • Name (string) --

          The name of the receipt rule set. The name must:

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

          • Start and end with a letter or number.

          • Contain less than 64 characters.

        • CreatedTimestamp (datetime) --

          The date and time the receipt rule set was created.

    • NextToken (string) --

      A token indicating that there are additional receipt rule sets available to be listed. Pass this token to successive calls of ListReceiptRuleSets to retrieve up to 100 receipt rule sets at a time.

CreateReceiptFilter (new) Link ¶

Creates a new IP address filter.

For information about setting up IP address filters, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.create_receipt_filter(
    Filter={
        'Name': 'string',
        'IpFilter': {
            'Policy': 'Block'|'Allow',
            'Cidr': 'string'
        }
    }
)
type Filter

dict

param Filter

[REQUIRED]

A data structure that describes the IP address filter to create, which consists of a name, an IP address range, and whether to allow or block mail from it.

  • Name (string) -- [REQUIRED]

    The name of the IP address filter. The name must:

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

    • Start and end with a letter or number.

    • Contain less than 64 characters.

  • IpFilter (dict) -- [REQUIRED]

    A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail from them.

    • Policy (string) -- [REQUIRED]

      Indicates whether to block or allow incoming mail from the specified IP addresses.

    • Cidr (string) -- [REQUIRED]

      A single IP address or a range of IP addresses that you want to block or allow, specified in Classless Inter-Domain Routing (CIDR) notation. An example of a single email address is 10.0.0.1. An example of a range of IP addresses is 10.0.0.1/24. For more information about CIDR notation, see RFC 2317.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteReceiptRule (new) Link ¶

Deletes the specified receipt rule.

For information about managing receipt rules, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.delete_receipt_rule(
    RuleSetName='string',
    RuleName='string'
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the receipt rule set that contains the receipt rule to delete.

type RuleName

string

param RuleName

[REQUIRED]

The name of the receipt rule to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeReceiptRuleSet (new) Link ¶

Returns the details of the specified receipt rule set.

For information about managing receipt rule sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.describe_receipt_rule_set(
    RuleSetName='string'
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the receipt rule set to describe.

rtype

dict

returns

Response Syntax

{
    'Metadata': {
        'Name': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1)
    },
    'Rules': [
        {
            'Name': 'string',
            'Enabled': True|False,
            'TlsPolicy': 'Require'|'Optional',
            'Recipients': [
                'string',
            ],
            'Actions': [
                {
                    'S3Action': {
                        'TopicArn': 'string',
                        'BucketName': 'string',
                        'ObjectKeyPrefix': 'string',
                        'KmsKeyArn': 'string'
                    },
                    'BounceAction': {
                        'TopicArn': 'string',
                        'SmtpReplyCode': 'string',
                        'StatusCode': 'string',
                        'Message': 'string',
                        'Sender': 'string'
                    },
                    'WorkmailAction': {
                        'TopicArn': 'string',
                        'OrganizationArn': 'string'
                    },
                    'LambdaAction': {
                        'TopicArn': 'string',
                        'FunctionArn': 'string',
                        'InvocationType': 'Event'|'RequestResponse'
                    },
                    'StopAction': {
                        'Scope': 'RuleSet',
                        'TopicArn': 'string'
                    },
                    'AddHeaderAction': {
                        'HeaderName': 'string',
                        'HeaderValue': 'string'
                    },
                    'SNSAction': {
                        'TopicArn': 'string'
                    }
                },
            ],
            'ScanEnabled': True|False
        },
    ]
}

Response Structure

  • (dict) --

    • Metadata (dict) --

      The metadata for the receipt rule set, which consists of the rule set name and the timestamp of when the rule set was created.

      • Name (string) --

        The name of the receipt rule set. The name must:

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

        • Start and end with a letter or number.

        • Contain less than 64 characters.

      • CreatedTimestamp (datetime) --

        The date and time the receipt rule set was created.

    • Rules (list) --

      A list of the receipt rules that belong to the specified receipt rule set.

      • (dict) --

        Receipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.

        Each receipt rule defines a set of email addresses or domains to which it applies. If the email addresses or domains match at least one recipient address of the message, Amazon SES executes all of the receipt rule's actions on the message.

        For information about setting up receipt rules, see the Amazon SES Developer Guide.

        • Name (string) --

          The name of the receipt rule. The name must:

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

          • Start and end with a letter or number.

          • Contain less than 64 characters.

        • Enabled (boolean) --

          If true , the receipt rule is active. The default value is true.

        • TlsPolicy (string) --

          Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to Require , Amazon SES will bounce emails that are not received over TLS. The default is Optional .

        • Recipients (list) --

          The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.

          • (string) --

        • Actions (list) --

          An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.

          • (dict) --

            An action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own. An instance of this data type can represent only one action.

            For information about setting up receipt rules, see the Amazon SES Developer Guide.

            • S3Action (dict) --

              Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.

              • TopicArn (string) --

                The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              • BucketName (string) --

                The name of the Amazon S3 bucket to which to save the received email.

              • ObjectKeyPrefix (string) --

                The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.

              • KmsKeyArn (string) --

                The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:

                • To use the default master key, provide an ARN in the form of arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses . For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be arn:aws:kms:us-west-2:123456789012:alias/aws/ses . If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.

                • To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the Amazon SES Developer Guide.

                For more information about key policies, see the AWS KMS Developer Guide. If you do not specify a master key, Amazon SES will not encrypt your emails.

                Warning

                Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the AWS Java SDK and AWS Ruby SDK only. For more information about client-side encryption using AWS KMS master keys, see the Amazon S3 Developer Guide.

            • BounceAction (dict) --

              Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              • SmtpReplyCode (string) --

                The SMTP reply code, as defined by RFC 5321.

              • StatusCode (string) --

                The SMTP enhanced status code, as defined by RFC 3463.

              • Message (string) --

                Human-readable text to include in the bounce message.

              • Sender (string) --

                The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.

            • WorkmailAction (dict) --

              Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              • OrganizationArn (string) --

                The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7 . For information about Amazon WorkMail organizations, see the Amazon WorkMail Administrator Guide.

            • LambdaAction (dict) --

              Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              • FunctionArn (string) --

                The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is arn:aws:lambda:us-west-2:account-id:function:MyFunction . For more information about AWS Lambda, see the AWS Lambda Developer Guide.

              • InvocationType (string) --

                The invocation type of the AWS Lambda function. An invocation type of RequestResponse means that the execution of the function will immediately result in a response, and a value of Event means that the function will be invoked asynchronously. The default value is Event . For information about AWS Lambda invocation types, see the AWS Lambda Developer Guide.

                Warning

                There is a 30-second timeout on RequestResponse invocations. You should use Event invocation in most cases. Use RequestResponse only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.

            • StopAction (dict) --

              Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.

              • Scope (string) --

                The scope to which the Stop action applies. That is, what is being stopped.

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

            • AddHeaderAction (dict) --

              Adds a header to the received email.

              • HeaderName (string) --

                The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.

              • HeaderValue (string) --

                Must be less than 2048 characters, and must not contain newline characters ("r" or "n").

            • SNSAction (dict) --

              Publishes the email content within a notification to Amazon SNS.

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • ScanEnabled (boolean) --

          If true , then messages to which this receipt rule applies are scanned for spam and viruses. The default value is true .

UpdateReceiptRule (new) Link ¶

Updates a receipt rule.

For information about managing receipt rules, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.update_receipt_rule(
    RuleSetName='string',
    Rule={
        'Name': 'string',
        'Enabled': True|False,
        'TlsPolicy': 'Require'|'Optional',
        'Recipients': [
            'string',
        ],
        'Actions': [
            {
                'S3Action': {
                    'TopicArn': 'string',
                    'BucketName': 'string',
                    'ObjectKeyPrefix': 'string',
                    'KmsKeyArn': 'string'
                },
                'BounceAction': {
                    'TopicArn': 'string',
                    'SmtpReplyCode': 'string',
                    'StatusCode': 'string',
                    'Message': 'string',
                    'Sender': 'string'
                },
                'WorkmailAction': {
                    'TopicArn': 'string',
                    'OrganizationArn': 'string'
                },
                'LambdaAction': {
                    'TopicArn': 'string',
                    'FunctionArn': 'string',
                    'InvocationType': 'Event'|'RequestResponse'
                },
                'StopAction': {
                    'Scope': 'RuleSet',
                    'TopicArn': 'string'
                },
                'AddHeaderAction': {
                    'HeaderName': 'string',
                    'HeaderValue': 'string'
                },
                'SNSAction': {
                    'TopicArn': 'string'
                }
            },
        ],
        'ScanEnabled': True|False
    }
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the receipt rule set to which the receipt rule belongs.

type Rule

dict

param Rule

[REQUIRED]

A data structure that contains the updated receipt rule information.

  • Name (string) -- [REQUIRED]

    The name of the receipt rule. The name must:

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

    • Start and end with a letter or number.

    • Contain less than 64 characters.

  • Enabled (boolean) --

    If true , the receipt rule is active. The default value is true.

  • TlsPolicy (string) --

    Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to Require , Amazon SES will bounce emails that are not received over TLS. The default is Optional .

  • Recipients (list) --

    The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.

    • (string) --

  • Actions (list) --

    An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.

    • (dict) --

      An action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own. An instance of this data type can represent only one action.

      For information about setting up receipt rules, see the Amazon SES Developer Guide.

      • S3Action (dict) --

        Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.

        • TopicArn (string) --

          The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • BucketName (string) -- [REQUIRED]

          The name of the Amazon S3 bucket to which to save the received email.

        • ObjectKeyPrefix (string) --

          The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.

        • KmsKeyArn (string) --

          The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:

          • To use the default master key, provide an ARN in the form of arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses . For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be arn:aws:kms:us-west-2:123456789012:alias/aws/ses . If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.

          • To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the Amazon SES Developer Guide.

          For more information about key policies, see the AWS KMS Developer Guide. If you do not specify a master key, Amazon SES will not encrypt your emails.

          Warning

          Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the AWS Java SDK and AWS Ruby SDK only. For more information about client-side encryption using AWS KMS master keys, see the Amazon S3 Developer Guide.

      • BounceAction (dict) --

        Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).

        • TopicArn (string) --

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • SmtpReplyCode (string) -- [REQUIRED]

          The SMTP reply code, as defined by RFC 5321.

        • StatusCode (string) --

          The SMTP enhanced status code, as defined by RFC 3463.

        • Message (string) -- [REQUIRED]

          Human-readable text to include in the bounce message.

        • Sender (string) -- [REQUIRED]

          The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.

      • WorkmailAction (dict) --

        Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.

        • TopicArn (string) --

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • OrganizationArn (string) -- [REQUIRED]

          The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7 . For information about Amazon WorkMail organizations, see the Amazon WorkMail Administrator Guide.

      • LambdaAction (dict) --

        Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.

        • TopicArn (string) --

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • FunctionArn (string) -- [REQUIRED]

          The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is arn:aws:lambda:us-west-2:account-id:function:MyFunction . For more information about AWS Lambda, see the AWS Lambda Developer Guide.

        • InvocationType (string) --

          The invocation type of the AWS Lambda function. An invocation type of RequestResponse means that the execution of the function will immediately result in a response, and a value of Event means that the function will be invoked asynchronously. The default value is Event . For information about AWS Lambda invocation types, see the AWS Lambda Developer Guide.

          Warning

          There is a 30-second timeout on RequestResponse invocations. You should use Event invocation in most cases. Use RequestResponse only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.

      • StopAction (dict) --

        Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.

        • Scope (string) -- [REQUIRED]

          The scope to which the Stop action applies. That is, what is being stopped.

        • TopicArn (string) --

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

      • AddHeaderAction (dict) --

        Adds a header to the received email.

        • HeaderName (string) -- [REQUIRED]

          The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.

        • HeaderValue (string) -- [REQUIRED]

          Must be less than 2048 characters, and must not contain newline characters ("r" or "n").

      • SNSAction (dict) --

        Publishes the email content within a notification to Amazon SNS.

        • TopicArn (string) -- [REQUIRED]

          The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

  • ScanEnabled (boolean) --

    If true , then messages to which this receipt rule applies are scanned for spam and viruses. The default value is true .

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ReorderReceiptRuleSet (new) Link ¶

Reorders the receipt rules within a receipt rule set.

Note

All of the rules in the rule set must be represented in this request. That is, this API will return an error if the reorder request doesn’t explicitly position all of the rules.

For information about managing receipt rule sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.reorder_receipt_rule_set(
    RuleSetName='string',
    RuleNames=[
        'string',
    ]
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the receipt rule set to reorder.

type RuleNames

list

param RuleNames

[REQUIRED]

A list of the specified receipt rule set's receipt rules in the order that you want to put them.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListReceiptFilters (new) Link ¶

Lists the IP address filters associated with your account.

For information about managing IP address filters, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.list_receipt_filters()
rtype

dict

returns

Response Syntax

{
    'Filters': [
        {
            'Name': 'string',
            'IpFilter': {
                'Policy': 'Block'|'Allow',
                'Cidr': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Filters (list) --

      A list of IP address filter data structures, which each consist of a name, an IP address range, and whether to allow or block mail from it.

      • (dict) --

        A receipt IP address filter enables you to specify whether to accept or reject mail originating from an IP address or range of IP addresses.

        For information about setting up IP address filters, see the Amazon SES Developer Guide.

        • Name (string) --

          The name of the IP address filter. The name must:

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

          • Start and end with a letter or number.

          • Contain less than 64 characters.

        • IpFilter (dict) --

          A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail from them.

          • Policy (string) --

            Indicates whether to block or allow incoming mail from the specified IP addresses.

          • Cidr (string) --

            A single IP address or a range of IP addresses that you want to block or allow, specified in Classless Inter-Domain Routing (CIDR) notation. An example of a single email address is 10.0.0.1. An example of a range of IP addresses is 10.0.0.1/24. For more information about CIDR notation, see RFC 2317.

DescribeActiveReceiptRuleSet (new) Link ¶

Returns the metadata and receipt rules for the receipt rule set that is currently active.

For information about setting up receipt rule sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.describe_active_receipt_rule_set()
rtype

dict

returns

Response Syntax

{
    'Metadata': {
        'Name': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1)
    },
    'Rules': [
        {
            'Name': 'string',
            'Enabled': True|False,
            'TlsPolicy': 'Require'|'Optional',
            'Recipients': [
                'string',
            ],
            'Actions': [
                {
                    'S3Action': {
                        'TopicArn': 'string',
                        'BucketName': 'string',
                        'ObjectKeyPrefix': 'string',
                        'KmsKeyArn': 'string'
                    },
                    'BounceAction': {
                        'TopicArn': 'string',
                        'SmtpReplyCode': 'string',
                        'StatusCode': 'string',
                        'Message': 'string',
                        'Sender': 'string'
                    },
                    'WorkmailAction': {
                        'TopicArn': 'string',
                        'OrganizationArn': 'string'
                    },
                    'LambdaAction': {
                        'TopicArn': 'string',
                        'FunctionArn': 'string',
                        'InvocationType': 'Event'|'RequestResponse'
                    },
                    'StopAction': {
                        'Scope': 'RuleSet',
                        'TopicArn': 'string'
                    },
                    'AddHeaderAction': {
                        'HeaderName': 'string',
                        'HeaderValue': 'string'
                    },
                    'SNSAction': {
                        'TopicArn': 'string'
                    }
                },
            ],
            'ScanEnabled': True|False
        },
    ]
}

Response Structure

  • (dict) --

    • Metadata (dict) --

      The metadata for the currently active receipt rule set. The metadata consists of the rule set name and a timestamp of when the rule set was created.

      • Name (string) --

        The name of the receipt rule set. The name must:

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

        • Start and end with a letter or number.

        • Contain less than 64 characters.

      • CreatedTimestamp (datetime) --

        The date and time the receipt rule set was created.

    • Rules (list) --

      The receipt rules that belong to the active rule set.

      • (dict) --

        Receipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.

        Each receipt rule defines a set of email addresses or domains to which it applies. If the email addresses or domains match at least one recipient address of the message, Amazon SES executes all of the receipt rule's actions on the message.

        For information about setting up receipt rules, see the Amazon SES Developer Guide.

        • Name (string) --

          The name of the receipt rule. The name must:

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

          • Start and end with a letter or number.

          • Contain less than 64 characters.

        • Enabled (boolean) --

          If true , the receipt rule is active. The default value is true.

        • TlsPolicy (string) --

          Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to Require , Amazon SES will bounce emails that are not received over TLS. The default is Optional .

        • Recipients (list) --

          The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.

          • (string) --

        • Actions (list) --

          An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.

          • (dict) --

            An action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own. An instance of this data type can represent only one action.

            For information about setting up receipt rules, see the Amazon SES Developer Guide.

            • S3Action (dict) --

              Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.

              • TopicArn (string) --

                The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              • BucketName (string) --

                The name of the Amazon S3 bucket to which to save the received email.

              • ObjectKeyPrefix (string) --

                The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.

              • KmsKeyArn (string) --

                The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:

                • To use the default master key, provide an ARN in the form of arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses . For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be arn:aws:kms:us-west-2:123456789012:alias/aws/ses . If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.

                • To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the Amazon SES Developer Guide.

                For more information about key policies, see the AWS KMS Developer Guide. If you do not specify a master key, Amazon SES will not encrypt your emails.

                Warning

                Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the AWS Java SDK and AWS Ruby SDK only. For more information about client-side encryption using AWS KMS master keys, see the Amazon S3 Developer Guide.

            • BounceAction (dict) --

              Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              • SmtpReplyCode (string) --

                The SMTP reply code, as defined by RFC 5321.

              • StatusCode (string) --

                The SMTP enhanced status code, as defined by RFC 3463.

              • Message (string) --

                Human-readable text to include in the bounce message.

              • Sender (string) --

                The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.

            • WorkmailAction (dict) --

              Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              • OrganizationArn (string) --

                The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7 . For information about Amazon WorkMail organizations, see the Amazon WorkMail Administrator Guide.

            • LambdaAction (dict) --

              Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

              • FunctionArn (string) --

                The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is arn:aws:lambda:us-west-2:account-id:function:MyFunction . For more information about AWS Lambda, see the AWS Lambda Developer Guide.

              • InvocationType (string) --

                The invocation type of the AWS Lambda function. An invocation type of RequestResponse means that the execution of the function will immediately result in a response, and a value of Event means that the function will be invoked asynchronously. The default value is Event . For information about AWS Lambda invocation types, see the AWS Lambda Developer Guide.

                Warning

                There is a 30-second timeout on RequestResponse invocations. You should use Event invocation in most cases. Use RequestResponse only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.

            • StopAction (dict) --

              Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.

              • Scope (string) --

                The scope to which the Stop action applies. That is, what is being stopped.

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

            • AddHeaderAction (dict) --

              Adds a header to the received email.

              • HeaderName (string) --

                The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.

              • HeaderValue (string) --

                Must be less than 2048 characters, and must not contain newline characters ("r" or "n").

            • SNSAction (dict) --

              Publishes the email content within a notification to Amazon SNS.

              • TopicArn (string) --

                The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

        • ScanEnabled (boolean) --

          If true , then messages to which this receipt rule applies are scanned for spam and viruses. The default value is true .

SetActiveReceiptRuleSet (new) Link ¶

Sets the specified receipt rule set as the active receipt rule set.

Note

To disable your email-receiving through Amazon SES completely, you can call this API with RuleSetName set to null.

For information about managing receipt rule sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.set_active_receipt_rule_set(
    RuleSetName='string'
)
type RuleSetName

string

param RuleSetName

The name of the receipt rule set to make active. Setting this value to null disables all email receiving.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteReceiptFilter (new) Link ¶

Deletes the specified IP address filter.

For information about managing IP address filters, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.delete_receipt_filter(
    FilterName='string'
)
type FilterName

string

param FilterName

[REQUIRED]

The name of the IP address filter to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateReceiptRuleSet (new) Link ¶

Creates an empty receipt rule set.

For information about setting up receipt rule sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.create_receipt_rule_set(
    RuleSetName='string'
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the rule set to create. The name must:

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

  • Start and end with a letter or number.

  • Contain less than 64 characters.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

SendBounce (new) Link ¶

Generates and sends a bounce message to the sender of an email you received through Amazon SES. You can only use this API on an email up to 24 hours after you receive it.

Note

You cannot use this API to send generic bounces for mail that was not received by Amazon SES.

For information about receiving email through Amazon SES, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.send_bounce(
    OriginalMessageId='string',
    BounceSender='string',
    Explanation='string',
    MessageDsn={
        'ReportingMta': 'string',
        'ArrivalDate': datetime(2015, 1, 1),
        'ExtensionFields': [
            {
                'Name': 'string',
                'Value': 'string'
            },
        ]
    },
    BouncedRecipientInfoList=[
        {
            'Recipient': 'string',
            'RecipientArn': 'string',
            'BounceType': 'DoesNotExist'|'MessageTooLarge'|'ExceededQuota'|'ContentRejected'|'Undefined'|'TemporaryFailure',
            'RecipientDsnFields': {
                'FinalRecipient': 'string',
                'Action': 'failed'|'delayed'|'delivered'|'relayed'|'expanded',
                'RemoteMta': 'string',
                'Status': 'string',
                'DiagnosticCode': 'string',
                'LastAttemptDate': datetime(2015, 1, 1),
                'ExtensionFields': [
                    {
                        'Name': 'string',
                        'Value': 'string'
                    },
                ]
            }
        },
    ],
    BounceSenderArn='string'
)
type OriginalMessageId

string

param OriginalMessageId

[REQUIRED]

The message ID of the message to be bounced.

type BounceSender

string

param BounceSender

[REQUIRED]

The address to use in the "From" header of the bounce message. This must be an identity that you have verified with Amazon SES.

type Explanation

string

param Explanation

Human-readable text for the bounce message to explain the failure. If not specified, the text will be auto-generated based on the bounced recipient information.

type MessageDsn

dict

param MessageDsn

Message-related DSN fields. If not specified, Amazon SES will choose the values.

  • ReportingMta (string) -- [REQUIRED]

    The reporting MTA that attempted to deliver the message, formatted as specified in RFC 3464 ( mta-name-type; mta-name ). The default value is dns; inbound-smtp.[region].amazonaws.com .

  • ArrivalDate (datetime) --

    When the message was received by the reporting mail transfer agent (MTA), in RFC 822 date-time format.

  • ExtensionFields (list) --

    Additional X-headers to include in the DSN.

    • (dict) --

      Additional X-headers to include in the Delivery Status Notification (DSN) when an email that Amazon SES receives on your behalf bounces.

      For information about receiving email through Amazon SES, see the Amazon SES Developer Guide.

      • Name (string) -- [REQUIRED]

        The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.

      • Value (string) -- [REQUIRED]

        The value of the header to add. Must be less than 2048 characters, and must not contain newline characters ("r" or "n").

type BouncedRecipientInfoList

list

param BouncedRecipientInfoList

[REQUIRED]

A list of recipients of the bounced message, including the information required to create the Delivery Status Notifications (DSNs) for the recipients. You must specify at least one BouncedRecipientInfo in the list.

  • (dict) --

    Recipient-related information to include in the Delivery Status Notification (DSN) when an email that Amazon SES receives on your behalf bounces.

    For information about receiving email through Amazon SES, see the Amazon SES Developer Guide.

    • Recipient (string) -- [REQUIRED]

      The email address of the recipient of the bounced email.

    • RecipientArn (string) --

      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 receive email for the recipient of the bounced email. For more information about sending authorization, see the Amazon SES Developer Guide.

    • BounceType (string) --

      The reason for the bounce. You must provide either this parameter or RecipientDsnFields .

    • RecipientDsnFields (dict) --

      Recipient-related DSN fields, most of which would normally be filled in automatically when provided with a BounceType . You must provide either this parameter or BounceType .

      • FinalRecipient (string) --

        The email address to which the message was ultimately delivered. This corresponds to the Final-Recipient in the DSN. If not specified, FinalRecipient will be set to the Recipient specified in the BouncedRecipientInfo structure. Either FinalRecipient or the recipient in BouncedRecipientInfo must be a recipient of the original bounced message.

        Note

        Do not prepend the FinalRecipient email address with rfc 822; , as described in RFC 3798.

      • Action (string) -- [REQUIRED]

        The action performed by the reporting mail transfer agent (MTA) as a result of its attempt to deliver the message to the recipient address. This is required by RFC 3464.

      • RemoteMta (string) --

        The MTA to which the remote MTA attempted to deliver the message, formatted as specified in RFC 3464 ( mta-name-type; mta-name ). This parameter typically applies only to propagating synchronous bounces.

      • Status (string) -- [REQUIRED]

        The status code that indicates what went wrong. This is required by RFC 3464.

      • DiagnosticCode (string) --

        An extended explanation of what went wrong; this is usually an SMTP response. See RFC 3463 for the correct formatting of this parameter.

      • LastAttemptDate (datetime) --

        The time the final delivery attempt was made, in RFC 822 date-time format.

      • ExtensionFields (list) --

        Additional X-headers to include in the DSN.

        • (dict) --

          Additional X-headers to include in the Delivery Status Notification (DSN) when an email that Amazon SES receives on your behalf bounces.

          For information about receiving email through Amazon SES, see the Amazon SES Developer Guide.

          • Name (string) -- [REQUIRED]

            The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.

          • Value (string) -- [REQUIRED]

            The value of the header to add. Must be less than 2048 characters, and must not contain newline characters ("r" or "n").

type BounceSenderArn

string

param BounceSenderArn

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 address in the "From" header of the bounce. For more information about sending authorization, see the Amazon SES Developer Guide.

rtype

dict

returns

Response Syntax

{
    'MessageId': 'string'
}

Response Structure

  • (dict) --

    • MessageId (string) --

      The message ID of the bounce message.

DeleteReceiptRuleSet (new) Link ¶

Deletes the specified receipt rule set and all of the receipt rules it contains.

Note

The currently active rule set cannot be deleted.

For information about managing receipt rule sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.delete_receipt_rule_set(
    RuleSetName='string'
)
type RuleSetName

string

param RuleSetName

[REQUIRED]

The name of the receipt rule set to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --