aws-cdk-lib.aws_ses.ReceiptRuleSetProps

interface ReceiptRuleSetProps

LanguageType name
.NETAmazon.CDK.AWS.SES.ReceiptRuleSetProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsses#ReceiptRuleSetProps
Javasoftware.amazon.awscdk.services.ses.ReceiptRuleSetProps
Pythonaws_cdk.aws_ses.ReceiptRuleSetProps
TypeScript (source)aws-cdk-lib » aws_ses » ReceiptRuleSetProps

Construction properties for a ReceiptRuleSet.

Example

import * as s3 from 'aws-cdk-lib/aws-s3';
import * as actions from 'aws-cdk-lib/aws-ses-actions';

const bucket = new s3.Bucket(this, 'Bucket');
const topic = new sns.Topic(this, 'Topic');

new ses.ReceiptRuleSet(this, 'RuleSet', {
  rules: [
    {
      recipients: ['hello@aws.com'],
      actions: [
        new actions.AddHeader({
          name: 'X-Special-Header',
          value: 'aws',
        }),
        new actions.S3({
          bucket,
          objectKeyPrefix: 'emails/',
          topic,
        }),
      ],
    },
    {
      recipients: ['aws.com'],
      actions: [
        new actions.Sns({
          topic,
        }),
      ],
    },
  ],
});

Properties

NameTypeDescription
dropSpam?booleanWhether to add a first rule to stop processing messages that have at least one spam indicator.
receiptRuleSetName?stringThe name for the receipt rule set.
rules?ReceiptRuleOptions[]The list of rules to add to this rule set.

dropSpam?

Type: boolean (optional, default: false)

Whether to add a first rule to stop processing messages that have at least one spam indicator.


receiptRuleSetName?

Type: string (optional, default: A CloudFormation generated name.)

The name for the receipt rule set.


rules?

Type: ReceiptRuleOptions[] (optional, default: No rules are added to the rule set.)

The list of rules to add to this rule set.

Rules are added in the same order as they appear in the list.