interface AddHeaderProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.SES.Actions.AddHeaderProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awssesactions#AddHeaderProps |
Java | software.amazon.awscdk.services.ses.actions.AddHeaderProps |
Python | aws_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
Name | Type | Description |
---|---|---|
name | string | The name of the header to add. |
value | string | The 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").