class Sns
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.SES.Actions.Sns |
Java | software.amazon.awscdk.services.ses.actions.Sns |
Python | aws_cdk.aws_ses_actions.Sns |
TypeScript (source) | @aws-cdk/aws-ses-actions » Sns |
Implements
IReceipt
Publishes the email content within a notification to Amazon SNS.
Example
import * as s3 from '@aws-cdk/aws-s3';
import * as actions from '@aws-cdk/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,
}),
],
},
],
});
Initializer
new Sns(props: SnsProps)
Parameters
- props
Sns
Props
Methods
Name | Description |
---|---|
bind(_rule) | Returns the receipt rule action specification. |
bind(_rule)
public bind(_rule: IReceiptRule): ReceiptRuleActionConfig
Parameters
- _rule
IReceipt
Rule
Returns
Returns the receipt rule action specification.