CreateReceiptFilterCommand

Creates a new IP address filter.

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

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

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { SESClient, CreateReceiptFilterCommand } from "@aws-sdk/client-ses"; // ES Modules import
// const { SESClient, CreateReceiptFilterCommand } = require("@aws-sdk/client-ses"); // CommonJS import
const client = new SESClient(config);
const input = { // CreateReceiptFilterRequest
  Filter: { // ReceiptFilter
    Name: "STRING_VALUE", // required
    IpFilter: { // ReceiptIpFilter
      Policy: "Block" || "Allow", // required
      Cidr: "STRING_VALUE", // required
    },
  },
};
const command = new CreateReceiptFilterCommand(input);
const response = await client.send(command);
// {};

Example Usage

 Loading code editorLoading code editor

CreateReceiptFilterCommand Input

See CreateReceiptFilterCommandInput for more details

Parameter
Type
Description
Filter
Required
ReceiptFilter | undefined

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.

CreateReceiptFilterCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
AlreadyExistsException
client

Indicates that a resource could not be created because of a naming conflict.

LimitExceededException
client

Indicates that a resource could not be created because of service limits. For a list of Amazon SES limits, see the Amazon SES Developer Guide .

SESServiceException
Base exception class for all service exceptions from SES service.