Package software.amazon.awscdk.services.ses
Amazon Simple Email Service Construct Library
---
AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2.
For more information on how to migrate, see the Migrating to AWS CDK v2 guide.
This module is part of the AWS Cloud Development Kit project.
Email receiving
Create a receipt rule set with rules and actions (actions can be found in the
@aws-cdk/aws-ses-actions package):
import software.amazon.awscdk.services.s3.*;
import software.amazon.awscdk.services.ses.actions.*;
Bucket bucket = new Bucket(this, "Bucket");
Topic topic = new Topic(this, "Topic");
ReceiptRuleSet.Builder.create(this, "RuleSet")
.rules(List.of(ReceiptRuleOptions.builder()
.recipients(List.of("hello@aws.com"))
.actions(List.of(
AddHeader.Builder.create()
.name("X-Special-Header")
.value("aws")
.build(),
S3.Builder.create()
.bucket(bucket)
.objectKeyPrefix("emails/")
.topic(topic)
.build()))
.build(), ReceiptRuleOptions.builder()
.recipients(List.of("aws.com"))
.actions(List.of(
Sns.Builder.create()
.topic(topic)
.build()))
.build()))
.build();
Alternatively, rules can be added to a rule set:
ReceiptRuleSet ruleSet = new ReceiptRuleSet(this, "RuleSet");
ReceiptRule awsRule = ruleSet.addRule("Aws", ReceiptRuleOptions.builder()
.recipients(List.of("aws.com"))
.build());
And actions to rules:
import software.amazon.awscdk.services.ses.actions.*;
ReceiptRule awsRule;
Topic topic;
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.
Drop spams
A rule to drop spam can be added by setting dropSpam to true:
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.
Receipt filter
Create a receipt filter:
ReceiptFilter.Builder.create(this, "Filter")
.ip("1.2.3.4/16")
.build();
An allow list filter is also available:
AllowListReceiptFilter.Builder.create(this, "AllowList")
.ips(List.of("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. Deprecated: AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html
-
ClassDescriptionAddHeaderAction configuration.A builder for
AddHeaderActionConfigAn implementation forAddHeaderActionConfigAn allow list receipt filter.A fluent builder forAllowListReceiptFilter.Construction properties for am AllowListReceiptFilter.A builder forAllowListReceiptFilterPropsAn implementation forAllowListReceiptFilterPropsBoundAction configuration.A builder forBounceActionConfigAn implementation forBounceActionConfigA CloudFormationAWS::SES::ConfigurationSet.A fluent builder forCfnConfigurationSet.Settings for your VDM configuration as applicable to the Dashboard.A builder forCfnConfigurationSet.DashboardOptionsPropertyAn implementation forCfnConfigurationSet.DashboardOptionsPropertySpecifies whether messages that use the configuration set are required to use Transport Layer Security (TLS).A builder forCfnConfigurationSet.DeliveryOptionsPropertyAn implementation forCfnConfigurationSet.DeliveryOptionsPropertySettings for your VDM configuration as applicable to the Guardian.A builder forCfnConfigurationSet.GuardianOptionsPropertyAn implementation forCfnConfigurationSet.GuardianOptionsPropertyContains information about the reputation settings for a configuration set.A builder forCfnConfigurationSet.ReputationOptionsPropertyAn implementation forCfnConfigurationSet.ReputationOptionsPropertyUsed to enable or disable email sending for messages that use this configuration set in the current AWS Region.A builder forCfnConfigurationSet.SendingOptionsPropertyAn implementation forCfnConfigurationSet.SendingOptionsPropertyAn object that contains information about the suppression list preferences for your account.A builder forCfnConfigurationSet.SuppressionOptionsPropertyAn implementation forCfnConfigurationSet.SuppressionOptionsPropertyA domain that is used to redirect email recipients to an Amazon SES-operated domain.A builder forCfnConfigurationSet.TrackingOptionsPropertyAn implementation forCfnConfigurationSet.TrackingOptionsPropertyThe Virtual Deliverability Manager (VDM) options that apply to a configuration set.A builder forCfnConfigurationSet.VdmOptionsPropertyAn implementation forCfnConfigurationSet.VdmOptionsPropertyA CloudFormationAWS::SES::ConfigurationSetEventDestination.A fluent builder forCfnConfigurationSetEventDestination.Contains information associated with an Amazon CloudWatch event destination to which email sending events are published.An implementation forCfnConfigurationSetEventDestination.CloudWatchDestinationPropertyContains the dimension configuration to use when you publish email sending events to Amazon CloudWatch.An implementation forCfnConfigurationSetEventDestination.DimensionConfigurationPropertyContains information about an event destination.An implementation forCfnConfigurationSetEventDestination.EventDestinationPropertyContains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.An implementation forCfnConfigurationSetEventDestination.KinesisFirehoseDestinationPropertyContains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.An implementation forCfnConfigurationSetEventDestination.SnsDestinationPropertyProperties for defining aCfnConfigurationSetEventDestination.A builder forCfnConfigurationSetEventDestinationPropsAn implementation forCfnConfigurationSetEventDestinationPropsProperties for defining aCfnConfigurationSet.A builder forCfnConfigurationSetPropsAn implementation forCfnConfigurationSetPropsA CloudFormationAWS::SES::ContactList.A fluent builder forCfnContactList.An interest group, theme, or label within a list.A builder forCfnContactList.TopicPropertyAn implementation forCfnContactList.TopicPropertyProperties for defining aCfnContactList.A builder forCfnContactListPropsAn implementation forCfnContactListPropsA CloudFormationAWS::SES::DedicatedIpPool.A fluent builder forCfnDedicatedIpPool.Properties for defining aCfnDedicatedIpPool.A builder forCfnDedicatedIpPoolPropsAn implementation forCfnDedicatedIpPoolPropsA CloudFormationAWS::SES::EmailIdentity.A fluent builder forCfnEmailIdentity.Used to associate a configuration set with an email identity.A builder forCfnEmailIdentity.ConfigurationSetAttributesPropertyAn implementation forCfnEmailIdentity.ConfigurationSetAttributesPropertyUsed to enable or disable DKIM authentication for an email identity.A builder forCfnEmailIdentity.DkimAttributesPropertyAn implementation forCfnEmailIdentity.DkimAttributesPropertyUsed to configure or change the DKIM authentication settings for an email domain identity.A builder forCfnEmailIdentity.DkimSigningAttributesPropertyAn implementation forCfnEmailIdentity.DkimSigningAttributesPropertyUsed to enable or disable feedback forwarding for an identity.A builder forCfnEmailIdentity.FeedbackAttributesPropertyAn implementation forCfnEmailIdentity.FeedbackAttributesPropertyUsed to enable or disable the custom Mail-From domain configuration for an email identity.A builder forCfnEmailIdentity.MailFromAttributesPropertyAn implementation forCfnEmailIdentity.MailFromAttributesPropertyProperties for defining aCfnEmailIdentity.A builder forCfnEmailIdentityPropsAn implementation forCfnEmailIdentityPropsA CloudFormationAWS::SES::ReceiptFilter.A fluent builder forCfnReceiptFilter.Specifies an IP address filter.A builder forCfnReceiptFilter.FilterPropertyAn implementation forCfnReceiptFilter.FilterPropertyA receipt IP address filter enables you to specify whether to accept or reject mail originating from an IP address or range of IP addresses.A builder forCfnReceiptFilter.IpFilterPropertyAn implementation forCfnReceiptFilter.IpFilterPropertyProperties for defining aCfnReceiptFilter.A builder forCfnReceiptFilterPropsAn implementation forCfnReceiptFilterPropsA CloudFormationAWS::SES::ReceiptRule.An action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own.A builder forCfnReceiptRule.ActionPropertyAn implementation forCfnReceiptRule.ActionPropertyWhen included in a receipt rule, this action adds a header to the received email.A builder forCfnReceiptRule.AddHeaderActionPropertyAn implementation forCfnReceiptRule.AddHeaderActionPropertyWhen included in a receipt rule, this action rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).A builder forCfnReceiptRule.BounceActionPropertyAn implementation forCfnReceiptRule.BounceActionPropertyA fluent builder forCfnReceiptRule.When included in a receipt rule, this action calls an AWS Lambda function and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).A builder forCfnReceiptRule.LambdaActionPropertyAn implementation forCfnReceiptRule.LambdaActionPropertyReceipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.A builder forCfnReceiptRule.RulePropertyAn implementation forCfnReceiptRule.RulePropertyWhen included in a receipt rule, this action saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).A builder forCfnReceiptRule.S3ActionPropertyAn implementation forCfnReceiptRule.S3ActionPropertyWhen included in a receipt rule, this action publishes a notification to Amazon Simple Notification Service (Amazon SNS).A builder forCfnReceiptRule.SNSActionPropertyAn implementation forCfnReceiptRule.SNSActionPropertyWhen included in a receipt rule, this action terminates the evaluation of the receipt rule set and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).A builder forCfnReceiptRule.StopActionPropertyAn implementation forCfnReceiptRule.StopActionPropertyWhen included in a receipt rule, this action calls Amazon WorkMail and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).A builder forCfnReceiptRule.WorkmailActionPropertyAn implementation forCfnReceiptRule.WorkmailActionPropertyProperties for defining aCfnReceiptRule.A builder forCfnReceiptRulePropsAn implementation forCfnReceiptRulePropsA CloudFormationAWS::SES::ReceiptRuleSet.A fluent builder forCfnReceiptRuleSet.Properties for defining aCfnReceiptRuleSet.A builder forCfnReceiptRuleSetPropsAn implementation forCfnReceiptRuleSetPropsA CloudFormationAWS::SES::Template.A fluent builder forCfnTemplate.The content of the email, composed of a subject line and either an HTML part or a text-only part.A builder forCfnTemplate.TemplatePropertyAn implementation forCfnTemplate.TemplatePropertyProperties for defining aCfnTemplate.A builder forCfnTemplatePropsAn implementation forCfnTemplatePropsA CloudFormationAWS::SES::VdmAttributes.A fluent builder forCfnVdmAttributes.Settings for your VDM configuration as applicable to the Dashboard.A builder forCfnVdmAttributes.DashboardAttributesPropertyAn implementation forCfnVdmAttributes.DashboardAttributesPropertySettings for your VDM configuration as applicable to the Guardian.A builder forCfnVdmAttributes.GuardianAttributesPropertyAn implementation forCfnVdmAttributes.GuardianAttributesPropertyProperties for defining aCfnVdmAttributes.A builder forCfnVdmAttributesPropsAn implementation forCfnVdmAttributesPropsA rule added at the top of the rule set to drop spam/virus.A fluent builder forDropSpamReceiptRule.Example:A builder forDropSpamReceiptRulePropsAn implementation forDropSpamReceiptRulePropsA receipt rule.Internal default implementation forIReceiptRule.A proxy class which represents a concrete javascript instance of this type.An abstract action for a receipt rule.Internal default implementation forIReceiptRuleAction.A proxy class which represents a concrete javascript instance of this type.A receipt rule set.Internal default implementation forIReceiptRuleSet.A proxy class which represents a concrete javascript instance of this type.LambdaAction configuration.A builder forLambdaActionConfigAn implementation forLambdaActionConfigA receipt filter.A fluent builder forReceiptFilter.The policy for the receipt filter.Construction properties for a ReceiptFilter.A builder forReceiptFilterPropsAn implementation forReceiptFilterPropsA new receipt rule.A fluent builder forReceiptRule.Properties for a receipt rule action.A builder forReceiptRuleActionConfigAn implementation forReceiptRuleActionConfigOptions to add a receipt rule to a receipt rule set.A builder forReceiptRuleOptionsAn implementation forReceiptRuleOptionsConstruction properties for a ReceiptRule.A builder forReceiptRulePropsAn implementation forReceiptRulePropsA new receipt rule set.A fluent builder forReceiptRuleSet.Construction properties for a ReceiptRuleSet.A builder forReceiptRuleSetPropsAn implementation forReceiptRuleSetPropsS3Action configuration.A builder forS3ActionConfigAn implementation forS3ActionConfigSNSAction configuration.A builder forSNSActionConfigAn implementation forSNSActionConfigStopAction configuration.A builder forStopActionConfigAn implementation forStopActionConfigThe type of TLS policy for a receipt rule.Deprecated.Deprecated.Deprecated.useAllowListReceiptFilterPropsDeprecated.Deprecated.WorkmailAction configuration.A builder forWorkmailActionConfigAn implementation forWorkmailActionConfig
AllowListReceiptFilter