Skip to content
v2.277.0

ReceiptRuleActionConfig Struct ​

Properties for a receipt rule action.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ses as ses } from 'aws-cdk-lib';
const receiptRuleActionConfig: ses.ReceiptRuleActionConfig = {
  addHeaderAction: {
    headerName: 'headerName',
    headerValue: 'headerValue',
  },
  bounceAction: {
    message: 'message',
    sender: 'sender',
    smtpReplyCode: 'smtpReplyCode',

    // the properties below are optional
    statusCode: 'statusCode',
    topicArn: 'topicArn',
  },
  lambdaAction: {
    functionArn: 'functionArn',

    // the properties below are optional
    invocationType: 'invocationType',
    topicArn: 'topicArn',
  },
  s3Action: {
    bucketName: 'bucketName',

    // the properties below are optional
    kmsKeyArn: 'kmsKeyArn',
    objectKeyPrefix: 'objectKeyPrefix',
    topicArn: 'topicArn',
  },
  snsAction: {
    encoding: 'encoding',
    topicArn: 'topicArn',
  },
  stopAction: {
    scope: 'scope',

    // the properties below are optional
    topicArn: 'topicArn',
  },
  workmailAction: {
    organizationArn: 'organizationArn',

    // the properties below are optional
    topicArn: 'topicArn',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ses as ses

receipt_rule_action_config = ses.ReceiptRuleActionConfig(
    add_header_action=ses.AddHeaderActionConfig(
        header_name="headerName",
        header_value="headerValue"
    ),
    bounce_action=ses.BounceActionConfig(
        message="message",
        sender="sender",
        smtp_reply_code="smtpReplyCode",

        # the properties below are optional
        status_code="statusCode",
        topic_arn="topicArn"
    ),
    lambda_action=ses.LambdaActionConfig(
        function_arn="functionArn",

        # the properties below are optional
        invocation_type="invocationType",
        topic_arn="topicArn"
    ),
    s3_action=ses.S3ActionConfig(
        bucket_name="bucketName",

        # the properties below are optional
        kms_key_arn="kmsKeyArn",
        object_key_prefix="objectKeyPrefix",
        topic_arn="topicArn"
    ),
    sns_action=ses.SNSActionConfig(
        encoding="encoding",
        topic_arn="topicArn"
    ),
    stop_action=ses.StopActionConfig(
        scope="scope",

        # the properties below are optional
        topic_arn="topicArn"
    ),
    workmail_action=ses.WorkmailActionConfig(
        organization_arn="organizationArn",

        # the properties below are optional
        topic_arn="topicArn"
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ses.*;

ReceiptRuleActionConfig receiptRuleActionConfig = ReceiptRuleActionConfig.builder()
        .addHeaderAction(AddHeaderActionConfig.builder()
                .headerName("headerName")
                .headerValue("headerValue")
                .build())
        .bounceAction(BounceActionConfig.builder()
                .message("message")
                .sender("sender")
                .smtpReplyCode("smtpReplyCode")

                // the properties below are optional
                .statusCode("statusCode")
                .topicArn("topicArn")
                .build())
        .lambdaAction(LambdaActionConfig.builder()
                .functionArn("functionArn")

                // the properties below are optional
                .invocationType("invocationType")
                .topicArn("topicArn")
                .build())
        .s3Action(S3ActionConfig.builder()
                .bucketName("bucketName")

                // the properties below are optional
                .kmsKeyArn("kmsKeyArn")
                .objectKeyPrefix("objectKeyPrefix")
                .topicArn("topicArn")
                .build())
        .snsAction(SNSActionConfig.builder()
                .encoding("encoding")
                .topicArn("topicArn")
                .build())
        .stopAction(StopActionConfig.builder()
                .scope("scope")

                // the properties below are optional
                .topicArn("topicArn")
                .build())
        .workmailAction(WorkmailActionConfig.builder()
                .organizationArn("organizationArn")

                // the properties below are optional
                .topicArn("topicArn")
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SES;

var receiptRuleActionConfig = new ReceiptRuleActionConfig {
    AddHeaderAction = new AddHeaderActionConfig {
        HeaderName = "headerName",
        HeaderValue = "headerValue"
    },
    BounceAction = new BounceActionConfig {
        Message = "message",
        Sender = "sender",
        SmtpReplyCode = "smtpReplyCode",

        // the properties below are optional
        StatusCode = "statusCode",
        TopicArn = "topicArn"
    },
    LambdaAction = new LambdaActionConfig {
        FunctionArn = "functionArn",

        // the properties below are optional
        InvocationType = "invocationType",
        TopicArn = "topicArn"
    },
    S3Action = new S3ActionConfig {
        BucketName = "bucketName",

        // the properties below are optional
        KmsKeyArn = "kmsKeyArn",
        ObjectKeyPrefix = "objectKeyPrefix",
        TopicArn = "topicArn"
    },
    SnsAction = new SNSActionConfig {
        Encoding = "encoding",
        TopicArn = "topicArn"
    },
    StopAction = new StopActionConfig {
        Scope = "scope",

        // the properties below are optional
        TopicArn = "topicArn"
    },
    WorkmailAction = new WorkmailActionConfig {
        OrganizationArn = "organizationArn",

        // the properties below are optional
        TopicArn = "topicArn"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

receiptRuleActionConfig := &ReceiptRuleActionConfig{
	AddHeaderAction: &AddHeaderActionConfig{
		HeaderName: jsii.String("headerName"),
		HeaderValue: jsii.String("headerValue"),
	},
	BounceAction: &BounceActionConfig{
		Message: jsii.String("message"),
		Sender: jsii.String("sender"),
		SmtpReplyCode: jsii.String("smtpReplyCode"),

		// the properties below are optional
		StatusCode: jsii.String("statusCode"),
		TopicArn: jsii.String("topicArn"),
	},
	LambdaAction: &LambdaActionConfig{
		FunctionArn: jsii.String("functionArn"),

		// the properties below are optional
		InvocationType: jsii.String("invocationType"),
		TopicArn: jsii.String("topicArn"),
	},
	S3Action: &S3ActionConfig{
		BucketName: jsii.String("bucketName"),

		// the properties below are optional
		KmsKeyArn: jsii.String("kmsKeyArn"),
		ObjectKeyPrefix: jsii.String("objectKeyPrefix"),
		TopicArn: jsii.String("topicArn"),
	},
	SnsAction: &SNSActionConfig{
		Encoding: jsii.String("encoding"),
		TopicArn: jsii.String("topicArn"),
	},
	StopAction: &StopActionConfig{
		Scope: jsii.String("scope"),

		// the properties below are optional
		TopicArn: jsii.String("topicArn"),
	},
	WorkmailAction: &WorkmailActionConfig{
		OrganizationArn: jsii.String("organizationArn"),

		// the properties below are optional
		TopicArn: jsii.String("topicArn"),
	},
}

Properties ​

addHeaderActionoptionalAddHeaderActionConfigadd_header_actionoptionalAddHeaderActionConfigaddHeaderActionoptionalAddHeaderActionConfigAddHeaderActionoptionalAddHeaderActionConfigAddHeaderActionoptionalAddHeaderActionConfig#
Adds a header to the received email.
bounceActionoptionalBounceActionConfigbounce_actionoptionalBounceActionConfigbounceActionoptionalBounceActionConfigBounceActionoptionalBounceActionConfigBounceActionoptionalBounceActionConfig#
Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon SNS.
lambdaActionoptionalLambdaActionConfiglambda_actionoptionalLambdaActionConfiglambdaActionoptionalLambdaActionConfigLambdaActionoptionalLambdaActionConfigLambdaActionoptionalLambdaActionConfig#
Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.
s3ActionoptionalS3ActionConfigs3_actionoptionalS3ActionConfigs3ActionoptionalS3ActionConfigS3ActionoptionalS3ActionConfigS3ActionoptionalS3ActionConfig#
Saves the received message to an Amazon S3 bucket and, optionally, publishes a notification to Amazon SNS.
snsActionoptionalSNSActionConfigsns_actionoptionalSNSActionConfigsnsActionoptionalSNSActionConfigSnsActionoptionalSNSActionConfigSnsActionoptionalSNSActionConfig#
Publishes the email content within a notification to Amazon SNS.
stopActionoptionalStopActionConfigstop_actionoptionalStopActionConfigstopActionoptionalStopActionConfigStopActionoptionalStopActionConfigStopActionoptionalStopActionConfig#
Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.
workmailActionoptionalWorkmailActionConfigworkmail_actionoptionalWorkmailActionConfigworkmailActionoptionalWorkmailActionConfigWorkmailActionoptionalWorkmailActionConfigWorkmailActionoptionalWorkmailActionConfig#
Calls Amazon WorkMail and, optionally, publishes a notification to Amazon SNS.