aws-cdk-lib.aws_ses_actions.AddHeaderProps

interface AddHeaderProps

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

Construction properties for a add header 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
namestringThe name of the header to add.
valuestringThe value of the header to add.

name

Type: string

The name of the header to add.

Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.


value

Type: string

The value of the header to add.

Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").