AddHeaderProps
- class aws_cdk.aws_ses_actions.AddHeaderProps(*, name, value)
Bases:
object
Construction properties for a add header action.
- Parameters:
name (
str
) – 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 (
str
) – The value of the header to add. Must be less than 2048 characters, and must not contain newline characters (”r” or “n”).
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_s3 as s3 import aws_cdk.aws_ses_actions as actions bucket = s3.Bucket(self, "Bucket") topic = sns.Topic(self, "Topic") ses.ReceiptRuleSet(self, "RuleSet", rules=[ses.ReceiptRuleOptions( recipients=["hello@aws.com"], actions=[ actions.AddHeader( name="X-Special-Header", value="aws" ), actions.S3( bucket=bucket, object_key_prefix="emails/", topic=topic ) ] ), ses.ReceiptRuleOptions( recipients=["aws.com"], actions=[ actions.Sns( topic=topic ) ] ) ] )
Attributes
- name
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
The value of the header to add.
Must be less than 2048 characters, and must not contain newline characters (”r” or “n”).