Skip to content
v2.274.0

Bounce Class ​

Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon SNS.

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 bounceTemplate: ses_actions.BounceTemplate;
declare const topic: sns.Topic;
const bounce = new ses_actions.Bounce({
  sender: 'sender',
  template: bounceTemplate,

  // 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

# bounce_template: ses_actions.BounceTemplate
# topic: sns.Topic

bounce = ses_actions.Bounce(
    sender="sender",
    template=bounce_template,

    # 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.*;

BounceTemplate bounceTemplate;
Topic topic;

Bounce bounce = Bounce.Builder.create()
        .sender("sender")
        .template(bounceTemplate)

        // 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;

BounceTemplate bounceTemplate;
Topic topic;

var bounce = new Bounce(new BounceProps {
    Sender = "sender",
    Template = bounceTemplate,

    // 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 bounceTemplate BounceTemplate
var topic Topic

bounce := awscdk.Aws_ses_actions.NewBounce(&BounceProps{
	Sender: jsii.String("sender"),
	Template: bounceTemplate,

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

Initializer ​

ts
new Bounce(props: BounceProps)
python
Bounce(props: BounceProps)
java
new Bounce(BounceProps props)
csharp
new Bounce(BounceProps props)
go
NewBounce(Props BounceProps)

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.