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
AddHeaderActionConfig
An implementation forAddHeaderActionConfig
An allow list receipt filter.A fluent builder forAllowListReceiptFilter
.Construction properties for am AllowListReceiptFilter.A builder forAllowListReceiptFilterProps
An implementation forAllowListReceiptFilterProps
BoundAction configuration.A builder forBounceActionConfig
An implementation forBounceActionConfig
A CloudFormationAWS::SES::ConfigurationSet
.A fluent builder forCfnConfigurationSet
.Settings for your VDM configuration as applicable to the Dashboard.A builder forCfnConfigurationSet.DashboardOptionsProperty
An implementation forCfnConfigurationSet.DashboardOptionsProperty
Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS).A builder forCfnConfigurationSet.DeliveryOptionsProperty
An implementation forCfnConfigurationSet.DeliveryOptionsProperty
Settings for your VDM configuration as applicable to the Guardian.A builder forCfnConfigurationSet.GuardianOptionsProperty
An implementation forCfnConfigurationSet.GuardianOptionsProperty
Contains information about the reputation settings for a configuration set.A builder forCfnConfigurationSet.ReputationOptionsProperty
An implementation forCfnConfigurationSet.ReputationOptionsProperty
Used to enable or disable email sending for messages that use this configuration set in the current AWS Region.A builder forCfnConfigurationSet.SendingOptionsProperty
An implementation forCfnConfigurationSet.SendingOptionsProperty
An object that contains information about the suppression list preferences for your account.A builder forCfnConfigurationSet.SuppressionOptionsProperty
An implementation forCfnConfigurationSet.SuppressionOptionsProperty
A domain that is used to redirect email recipients to an Amazon SES-operated domain.A builder forCfnConfigurationSet.TrackingOptionsProperty
An implementation forCfnConfigurationSet.TrackingOptionsProperty
The Virtual Deliverability Manager (VDM) options that apply to a configuration set.A builder forCfnConfigurationSet.VdmOptionsProperty
An implementation forCfnConfigurationSet.VdmOptionsProperty
A 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.CloudWatchDestinationProperty
Contains the dimension configuration to use when you publish email sending events to Amazon CloudWatch.An implementation forCfnConfigurationSetEventDestination.DimensionConfigurationProperty
Contains information about an event destination.An implementation forCfnConfigurationSetEventDestination.EventDestinationProperty
Contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.An implementation forCfnConfigurationSetEventDestination.KinesisFirehoseDestinationProperty
Contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.An implementation forCfnConfigurationSetEventDestination.SnsDestinationProperty
Properties for defining aCfnConfigurationSetEventDestination
.A builder forCfnConfigurationSetEventDestinationProps
An implementation forCfnConfigurationSetEventDestinationProps
Properties for defining aCfnConfigurationSet
.A builder forCfnConfigurationSetProps
An implementation forCfnConfigurationSetProps
A CloudFormationAWS::SES::ContactList
.A fluent builder forCfnContactList
.An interest group, theme, or label within a list.A builder forCfnContactList.TopicProperty
An implementation forCfnContactList.TopicProperty
Properties for defining aCfnContactList
.A builder forCfnContactListProps
An implementation forCfnContactListProps
A CloudFormationAWS::SES::DedicatedIpPool
.A fluent builder forCfnDedicatedIpPool
.Properties for defining aCfnDedicatedIpPool
.A builder forCfnDedicatedIpPoolProps
An implementation forCfnDedicatedIpPoolProps
A CloudFormationAWS::SES::EmailIdentity
.A fluent builder forCfnEmailIdentity
.Used to associate a configuration set with an email identity.A builder forCfnEmailIdentity.ConfigurationSetAttributesProperty
An implementation forCfnEmailIdentity.ConfigurationSetAttributesProperty
Used to enable or disable DKIM authentication for an email identity.A builder forCfnEmailIdentity.DkimAttributesProperty
An implementation forCfnEmailIdentity.DkimAttributesProperty
Used to configure or change the DKIM authentication settings for an email domain identity.A builder forCfnEmailIdentity.DkimSigningAttributesProperty
An implementation forCfnEmailIdentity.DkimSigningAttributesProperty
Used to enable or disable feedback forwarding for an identity.A builder forCfnEmailIdentity.FeedbackAttributesProperty
An implementation forCfnEmailIdentity.FeedbackAttributesProperty
Used to enable or disable the custom Mail-From domain configuration for an email identity.A builder forCfnEmailIdentity.MailFromAttributesProperty
An implementation forCfnEmailIdentity.MailFromAttributesProperty
Properties for defining aCfnEmailIdentity
.A builder forCfnEmailIdentityProps
An implementation forCfnEmailIdentityProps
A CloudFormationAWS::SES::ReceiptFilter
.A fluent builder forCfnReceiptFilter
.Specifies an IP address filter.A builder forCfnReceiptFilter.FilterProperty
An implementation forCfnReceiptFilter.FilterProperty
A 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.IpFilterProperty
An implementation forCfnReceiptFilter.IpFilterProperty
Properties for defining aCfnReceiptFilter
.A builder forCfnReceiptFilterProps
An implementation forCfnReceiptFilterProps
A 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.ActionProperty
An implementation forCfnReceiptRule.ActionProperty
When included in a receipt rule, this action adds a header to the received email.A builder forCfnReceiptRule.AddHeaderActionProperty
An implementation forCfnReceiptRule.AddHeaderActionProperty
When 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.BounceActionProperty
An implementation forCfnReceiptRule.BounceActionProperty
A 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.LambdaActionProperty
An implementation forCfnReceiptRule.LambdaActionProperty
Receipt 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.RuleProperty
An implementation forCfnReceiptRule.RuleProperty
When 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.S3ActionProperty
An implementation forCfnReceiptRule.S3ActionProperty
When included in a receipt rule, this action publishes a notification to Amazon Simple Notification Service (Amazon SNS).A builder forCfnReceiptRule.SNSActionProperty
An implementation forCfnReceiptRule.SNSActionProperty
When 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.StopActionProperty
An implementation forCfnReceiptRule.StopActionProperty
When 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.WorkmailActionProperty
An implementation forCfnReceiptRule.WorkmailActionProperty
Properties for defining aCfnReceiptRule
.A builder forCfnReceiptRuleProps
An implementation forCfnReceiptRuleProps
A CloudFormationAWS::SES::ReceiptRuleSet
.A fluent builder forCfnReceiptRuleSet
.Properties for defining aCfnReceiptRuleSet
.A builder forCfnReceiptRuleSetProps
An implementation forCfnReceiptRuleSetProps
A 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.TemplateProperty
An implementation forCfnTemplate.TemplateProperty
Properties for defining aCfnTemplate
.A builder forCfnTemplateProps
An implementation forCfnTemplateProps
A CloudFormationAWS::SES::VdmAttributes
.A fluent builder forCfnVdmAttributes
.Settings for your VDM configuration as applicable to the Dashboard.A builder forCfnVdmAttributes.DashboardAttributesProperty
An implementation forCfnVdmAttributes.DashboardAttributesProperty
Settings for your VDM configuration as applicable to the Guardian.A builder forCfnVdmAttributes.GuardianAttributesProperty
An implementation forCfnVdmAttributes.GuardianAttributesProperty
Properties for defining aCfnVdmAttributes
.A builder forCfnVdmAttributesProps
An implementation forCfnVdmAttributesProps
A rule added at the top of the rule set to drop spam/virus.A fluent builder forDropSpamReceiptRule
.Example:A builder forDropSpamReceiptRuleProps
An implementation forDropSpamReceiptRuleProps
A 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 forLambdaActionConfig
An implementation forLambdaActionConfig
A receipt filter.A fluent builder forReceiptFilter
.The policy for the receipt filter.Construction properties for a ReceiptFilter.A builder forReceiptFilterProps
An implementation forReceiptFilterProps
A new receipt rule.A fluent builder forReceiptRule
.Properties for a receipt rule action.A builder forReceiptRuleActionConfig
An implementation forReceiptRuleActionConfig
Options to add a receipt rule to a receipt rule set.A builder forReceiptRuleOptions
An implementation forReceiptRuleOptions
Construction properties for a ReceiptRule.A builder forReceiptRuleProps
An implementation forReceiptRuleProps
A new receipt rule set.A fluent builder forReceiptRuleSet
.Construction properties for a ReceiptRuleSet.A builder forReceiptRuleSetProps
An implementation forReceiptRuleSetProps
S3Action configuration.A builder forS3ActionConfig
An implementation forS3ActionConfig
SNSAction configuration.A builder forSNSActionConfig
An implementation forSNSActionConfig
StopAction configuration.A builder forStopActionConfig
An implementation forStopActionConfig
The type of TLS policy for a receipt rule.Deprecated.Deprecated.Deprecated.useAllowListReceiptFilterProps
Deprecated.Deprecated.WorkmailAction configuration.A builder forWorkmailActionConfig
An implementation forWorkmailActionConfig
AllowListReceiptFilter