SES / Client / list_receipt_filters

list_receipt_filters#

SES.Client.list_receipt_filters()#

Lists the IP address filters associated with your Amazon Web Services account in the current Amazon Web Services Region.

For information about managing IP address filters, 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_filters()
Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    A list of IP address filters that exist under your Amazon Web Services account.

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

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

Examples

The following example lists the IP address filters that are associated with an AWS account:

response = client.list_receipt_filters(
)

print(response)

Expected Output:

{
    'Filters': [
        {
            'IpFilter': {
                'Cidr': '1.2.3.4/24',
                'Policy': 'Block',
            },
            'Name': 'MyFilter',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}