diff --git a/packages/@aws-cdk/aws-ses/README.md b/packages/@aws-cdk/aws-ses/README.md index b8543970796ad..c1368b094c93d 100644 --- a/packages/@aws-cdk/aws-ses/README.md +++ b/packages/@aws-cdk/aws-ses/README.md @@ -5,17 +5,7 @@ ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. -> -> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib - -![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) - -> The APIs of higher level constructs in this module are experimental and under active development. -> They are subject to non-backward compatible changes or removal in any future version. These are -> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be -> announced in the release notes. This means that while you may use them, you may need to update -> your source code when upgrading to a newer version of this package. +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- diff --git a/packages/@aws-cdk/aws-ses/lib/receipt-rule-action.ts b/packages/@aws-cdk/aws-ses/lib/receipt-rule-action.ts index 38f08a03ee425..33b29627c8f5f 100644 --- a/packages/@aws-cdk/aws-ses/lib/receipt-rule-action.ts +++ b/packages/@aws-cdk/aws-ses/lib/receipt-rule-action.ts @@ -1,5 +1,4 @@ import { IReceiptRule } from './receipt-rule'; -import { CfnReceiptRule } from './ses.generated'; /** * An abstract action for a receipt rule. @@ -11,6 +10,194 @@ export interface IReceiptRuleAction { bind(receiptRule: IReceiptRule): ReceiptRuleActionConfig; } +/** + * AddHeaderAction configuration. + */ +export interface AddHeaderActionConfig { + /** + * The name of the header that you want to add to the incoming message + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-addheaderaction.html#cfn-ses-receiptrule-addheaderaction-headername + */ + readonly headerName: string; + /** + * The content that you want to include in the header. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-addheaderaction.html#cfn-ses-receiptrule-addheaderaction-headervalue + */ + readonly headerValue: string; +} + +/** + * BoundAction configuration. + */ +export interface BounceActionConfig { + /** + * Human-readable text to include in the bounce message. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-message + */ + readonly message: string; + /** + * The email address of the sender of the bounced email. + * This is the address that the bounce message is sent from. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-sender + */ + readonly sender: string; + /** + * The SMTP reply code, as defined by RFC 5321 + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-smtpreplycode + */ + readonly smtpReplyCode: string; + /** + * The SMTP enhanced status code, as defined by RFC 3463 + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-statuscode + * + * @default - No status code. + */ + readonly statusCode?: string; + /** + * The Amazon Resource Name (ARN) of the Amazon SNS topic to + * notify when the bounce action is taken. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-bounceaction.html#cfn-ses-receiptrule-bounceaction-topicarn + * + * @default - No notification is sent to SNS. + */ + readonly topicArn?: string; +} + +/** + * LambdaAction configuration. + */ +export interface LambdaActionConfig { + /** + * The Amazon Resource Name (ARN) of the AWS Lambda function. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-functionarn + */ + readonly functionArn: string; + /** + * The invocation type of the AWS Lambda function + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-invocationtype + * + * @default 'Event' + */ + readonly invocationType?: string; + /** + * The Amazon Resource Name (ARN) of the Amazon SNS topic to + * notify when the Lambda action is executed. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-lambdaaction.html#cfn-ses-receiptrule-lambdaaction-topicarn + * + * @default - No notification is sent to SNS. + */ + readonly topicArn?: string; +} + +/** + * S3Action configuration. + */ +export interface S3ActionConfig { + /** + * The name of the Amazon S3 bucket that you want to send incoming mail to. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-bucketname + */ + readonly bucketName: string; + /** + * The customer master key that Amazon SES should use to encrypt your emails before saving + * them to the Amazon S3 bucket. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-kmskeyarn + * + * @default - Emails are not encrypted. + */ + readonly kmsKeyArn?: string; + /** + * The key prefix of the Amazon S3 bucket. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-objectkeyprefix + * + * @default - No prefix. + */ + readonly objectKeyPrefix?: string; + /** + * The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-s3action.html#cfn-ses-receiptrule-s3action-topicarn + * + * @default - No notification is sent to SNS. + */ + readonly topicArn?: string; +} + +/** + * SNSAction configuration. + */ +export interface SNSActionConfig { + /** + * The encoding to use for the email within the Amazon SNS notification. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-snsaction.html#cfn-ses-receiptrule-snsaction-encoding + * + * @default 'UTF-8' + */ + readonly encoding?: string; + /** + * The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-snsaction.html#cfn-ses-receiptrule-snsaction-topicarn + * + * @default - No notification is sent to SNS. + */ + readonly topicArn?: string; +} + +/** + * StopAction configuration. + */ +export interface StopActionConfig { + /** + * The scope of the StopAction. The only acceptable value is RuleSet. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-stopaction.html#cfn-ses-receiptrule-stopaction-scope + */ + readonly scope: string; + /** + * The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-stopaction.html#cfn-ses-receiptrule-stopaction-topicarn + * + * @default - No notification is sent to SNS. + */ + readonly topicArn?: string; +} + +/** + * WorkmailAction configuration. + */ +export interface WorkmailActionConfig { + /** + * The Amazon Resource Name (ARN) of the Amazon WorkMail organization. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-workmailaction.html#cfn-ses-receiptrule-workmailaction-organizationarn + */ + readonly organizationArn: string; + /** + * The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. + * + * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-receiptrule-workmailaction.html#cfn-ses-receiptrule-workmailaction-topicarn + * + * @default - No notification is sent to SNS. + */ + readonly topicArn?: string; +} + /** * Properties for a receipt rule action. */ @@ -18,39 +205,39 @@ export interface ReceiptRuleActionConfig { /** * Adds a header to the received email. */ - readonly addHeaderAction?: CfnReceiptRule.AddHeaderActionProperty + readonly addHeaderAction?: AddHeaderActionConfig /** * Rejects the received email by returning a bounce response to the sender and, * optionally, publishes a notification to Amazon SNS. */ - readonly bounceAction?: CfnReceiptRule.BounceActionProperty; + readonly bounceAction?: BounceActionConfig; /** * Calls an AWS Lambda function, and optionally, publishes a notification to * Amazon SNS. */ - readonly lambdaAction?: CfnReceiptRule.LambdaActionProperty; + readonly lambdaAction?: LambdaActionConfig; /** * Saves the received message to an Amazon S3 bucket and, optionally, publishes * a notification to Amazon SNS. */ - readonly s3Action?: CfnReceiptRule.S3ActionProperty; + readonly s3Action?: S3ActionConfig; /** * Publishes the email content within a notification to Amazon SNS. */ - readonly snsAction?: CfnReceiptRule.SNSActionProperty; + readonly snsAction?: SNSActionConfig; /** * Terminates the evaluation of the receipt rule set and optionally publishes a * notification to Amazon SNS. */ - readonly stopAction?: CfnReceiptRule.StopActionProperty; + readonly stopAction?: StopActionConfig; /** * Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS. */ - readonly workmailAction?: CfnReceiptRule.WorkmailActionProperty; + readonly workmailAction?: WorkmailActionConfig; } diff --git a/packages/@aws-cdk/aws-ses/package.json b/packages/@aws-cdk/aws-ses/package.json index b8e12dca280f2..5219441321df1 100644 --- a/packages/@aws-cdk/aws-ses/package.json +++ b/packages/@aws-cdk/aws-ses/package.json @@ -94,8 +94,8 @@ "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, - "stability": "experimental", - "maturity": "experimental", + "stability": "stable", + "maturity": "stable", "awslint": { "exclude": [ "props-default-doc:@aws-cdk/aws-ses.ReceiptRuleActionConfig.addHeaderAction",