Skip to content
v2.275.0

WorkMail Class ​

Integrates an Amazon WorkMail action into a receipt rule set, and optionally publishes a notification to Amazon SNS.

Beware that WorkMail should already set up an active INBOUND_MAIL rule set that includes a WorkMail rule action for this exact purpose. This action should be used to customize the behavior of replacement rule set.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ses_actions as ses_actions } from 'aws-cdk-lib';
import { aws_sns as sns } from 'aws-cdk-lib';

declare const topic: sns.Topic;
const workMail = new ses_actions.WorkMail({
  organizationArn: 'organizationArn',

  // the properties below are optional
  topic: topic,
});
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_actions as ses_actions
from aws_cdk import aws_sns as sns

# topic: sns.Topic

work_mail = ses_actions.WorkMail(
    organization_arn="organizationArn",

    # the properties below are optional
    topic=topic
)
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.actions.*;
import software.amazon.awscdk.services.sns.*;

Topic topic;

WorkMail workMail = WorkMail.Builder.create()
        .organizationArn("organizationArn")

        // the properties below are optional
        .topic(topic)
        .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.Actions;
using Amazon.CDK.AWS.SNS;

Topic topic;

var workMail = new WorkMail(new WorkMailProps {
    OrganizationArn = "organizationArn",

    // the properties below are optional
    Topic = topic
});
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"
import "github.com/aws/aws-cdk-go/awscdk"

var topic Topic

workMail := awscdk.Aws_ses_actions.NewWorkMail(&WorkMailProps{
	OrganizationArn: jsii.String("organizationArn"),

	// the properties below are optional
	Topic: topic,
})

Initializer ​

ts
new WorkMail(props: WorkMailProps)
python
WorkMail(props: WorkMailProps)
java
new WorkMail(WorkMailProps props)
csharp
new WorkMail(WorkMailProps props)
go
NewWorkMail(Props WorkMailProps)

Methods ​

bind(_rule: IReceiptRuleRef): ReceiptRuleActionConfigdef bind(self, _rule: IReceiptRuleRef) -> ReceiptRuleActionConfigpublic ReceiptRuleActionConfig bind(IReceiptRuleRef _rule)public ReceiptRuleActionConfig Bind(IReceiptRuleRef _rule)func Bind(_rule IReceiptRuleRef) ReceiptRuleActionConfig#
Returns the receipt rule action specification.