SES / Client / list_receipt_rule_sets

list_receipt_rule_sets#

SES.Client.list_receipt_rule_sets(**kwargs)#

Lists the receipt rule sets that exist under your Amazon Web Services account in the current Amazon Web Services Region. If there are additional receipt rule sets to be retrieved, you 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.

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

See also: AWS API Documentation

Request Syntax

response = client.list_receipt_rule_sets(
    NextToken='string'
)
Parameters:

NextToken (string) – A token returned from a previous call to ListReceiptRuleSets to indicate the position in the receipt rule set list.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    A list of receipt rule sets that exist under your Amazon Web Services account.

    • 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 meet the following requirements:

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

          • Start and end with a letter or number.

          • Contain 64 characters or fewer.

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

Examples

The following example lists the receipt rule sets that exist under an AWS account:

response = client.list_receipt_rule_sets(
    NextToken='',
)

print(response)

Expected Output:

{
    'NextToken': '',
    'RuleSets': [
        {
            'CreatedTimestamp': datetime(2016, 7, 15, 16, 25, 59, 4, 197, 0),
            'Name': 'MyRuleSet',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}