aws-cdk-lib.aws_ses_actions.SnsProps

interface SnsProps

LanguageType name
.NETAmazon.CDK.AWS.SES.Actions.SnsProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssesactions#SnsProps
Javasoftware.amazon.awscdk.services.ses.actions.SnsProps
Pythonaws_cdk.aws_ses_actions.SnsProps
TypeScript (source)aws-cdk-lib » aws_ses_actions » SnsProps

Construction properties for a SNS action.

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
topicITopicThe SNS topic to notify.
encoding?EmailEncodingThe encoding to use for the email within the Amazon SNS notification.

topic

Type: ITopic

The SNS topic to notify.


encoding?

Type: EmailEncoding (optional, default: UTF-8)

The encoding to use for the email within the Amazon SNS notification.