See: Description
| Interface | Description |
|---|---|
| AddHeaderActionConfig |
(experimental) AddHeaderAction configuration.
|
| AllowListReceiptFilterProps |
(experimental) Construction properties for am AllowListReceiptFilter.
|
| BounceActionConfig |
(experimental) BoundAction configuration.
|
| CfnConfigurationSetEventDestination.CloudWatchDestinationProperty | |
| CfnConfigurationSetEventDestination.DimensionConfigurationProperty | |
| CfnConfigurationSetEventDestination.EventDestinationProperty | |
| CfnConfigurationSetEventDestination.KinesisFirehoseDestinationProperty | |
| CfnConfigurationSetEventDestinationProps |
Properties for defining a `AWS::SES::ConfigurationSetEventDestination`.
|
| CfnConfigurationSetProps |
Properties for defining a `AWS::SES::ConfigurationSet`.
|
| CfnContactList.TopicProperty | |
| CfnContactListProps |
Properties for defining a `AWS::SES::ContactList`.
|
| CfnReceiptFilter.FilterProperty | |
| CfnReceiptFilter.IpFilterProperty | |
| CfnReceiptFilterProps |
Properties for defining a `AWS::SES::ReceiptFilter`.
|
| CfnReceiptRule.ActionProperty | |
| CfnReceiptRule.AddHeaderActionProperty | |
| CfnReceiptRule.BounceActionProperty | |
| CfnReceiptRule.LambdaActionProperty | |
| CfnReceiptRule.RuleProperty | |
| CfnReceiptRule.S3ActionProperty | |
| CfnReceiptRule.SNSActionProperty | |
| CfnReceiptRule.StopActionProperty | |
| CfnReceiptRule.WorkmailActionProperty | |
| CfnReceiptRuleProps |
Properties for defining a `AWS::SES::ReceiptRule`.
|
| CfnReceiptRuleSetProps |
Properties for defining a `AWS::SES::ReceiptRuleSet`.
|
| CfnTemplate.TemplateProperty | |
| CfnTemplateProps |
Properties for defining a `AWS::SES::Template`.
|
| DropSpamReceiptRuleProps | |
| IReceiptRule |
(experimental) A receipt rule.
|
| IReceiptRule.Jsii$Default |
Internal default implementation for
IReceiptRule. |
| IReceiptRuleAction |
(experimental) An abstract action for a receipt rule.
|
| IReceiptRuleAction.Jsii$Default |
Internal default implementation for
IReceiptRuleAction. |
| IReceiptRuleSet |
(experimental) A receipt rule set.
|
| IReceiptRuleSet.Jsii$Default |
Internal default implementation for
IReceiptRuleSet. |
| LambdaActionConfig |
(experimental) LambdaAction configuration.
|
| ReceiptFilterProps |
(experimental) Construction properties for a ReceiptFilter.
|
| ReceiptRuleActionConfig |
(experimental) Properties for a receipt rule action.
|
| ReceiptRuleOptions |
(experimental) Options to add a receipt rule to a receipt rule set.
|
| ReceiptRuleProps |
(experimental) Construction properties for a ReceiptRule.
|
| ReceiptRuleSetProps |
(experimental) Construction properties for a ReceiptRuleSet.
|
| S3ActionConfig |
(experimental) S3Action configuration.
|
| SNSActionConfig |
(experimental) SNSAction configuration.
|
| StopActionConfig |
(experimental) StopAction configuration.
|
| WorkmailActionConfig |
(experimental) WorkmailAction configuration.
|
| Enum | Description |
|---|---|
| ReceiptFilterPolicy |
(experimental) The policy for the receipt filter.
|
| TlsPolicy |
(experimental) The type of TLS policy for a receipt rule.
|
---
This module is part of the AWS Cloud Development Kit project.
Create a receipt rule set with rules and actions (actions can be found in the
@aws-cdk/aws-ses-actions package):
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import software.amazon.awscdk.aws_s3;
import software.amazon.awscdk.aws_ses;
import software.amazon.awscdk.aws_ses_actions;
import software.amazon.awscdk.aws_sns;
Bucket bucket = new Bucket(stack, "Bucket");
Topic topic = new Topic(stack, "Topic");
new ReceiptRuleSet(stack, "RuleSet", new ReceiptRuleSetProps()
.rules(asList(new ReceiptRuleOptions()
.recipients(asList("hello@aws.com"))
.actions(asList(
new AddHeader(new AddHeaderProps()
.name("X-Special-Header")
.value("aws")),
new S3(new S3Props()
.bucket(bucket)
.objectKeyPrefix("emails/")
.topic(topic)))), new ReceiptRuleOptions()
.recipients(asList("aws.com"))
.actions(asList(
new Sns(new SnsProps()
.topic(topic)))))));
Alternatively, rules can be added to a rule set:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
Object ruleSet = new ReceiptRuleSet(this, "RuleSet");
Object awsRule = ruleSet.addRule("Aws", Map.of(
"recipients", asList("aws.com")));
And actions to rules:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
awsRule.addAction(Sns.Builder.create()
.topic(topic)
.build());
When using addRule, the new rule is added after the last added rule unless after is specified.
A rule to drop spam can be added by setting dropSpam to true:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
ReceiptRuleSet.Builder.create(this, "RuleSet")
.dropSpam(true)
.build();
This will add a rule at the top of the rule set with a Lambda action that stops processing messages that have at least one spam indicator. See Lambda Function Examples.
Create a receipt filter:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
ReceiptFilter.Builder.create(this, "Filter")
.ip("1.2.3.4/16")
.build();
An allow list filter is also available:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
AllowListReceiptFilter.Builder.create(this, "AllowList")
.ips(asList("10.0.0.0/16", "1.2.3.4/16"))
.build();
This will first create a block all filter and then create allow filters for the listed ip addresses.
Copyright © 2021. All rights reserved.