Class: AWSCDK::SES::CfnReceiptRule::BounceActionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ses/cfn_receipt_rule.rb

Overview

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).

For information about sending a bounce message in response to a received email, see the Amazon SES Developer Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message:, sender:, smtp_reply_code:, status_code: nil, topic_arn: nil) ⇒ BounceActionProperty

Returns a new instance of BounceActionProperty.

Parameters:

  • message (String)

    Human-readable text to include in the bounce message.

  • sender (String)

    The email address of the sender of the bounced email.

  • smtp_reply_code (String)

    The SMTP reply code, as defined by RFC 5321 .

  • status_code (String, nil) (defaults to: nil)

    The SMTP enhanced status code, as defined by RFC 3463 .

  • topic_arn (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken.



687
688
689
690
691
692
693
694
695
696
697
698
# File 'ses/cfn_receipt_rule.rb', line 687

def initialize(message:, sender:, smtp_reply_code:, status_code: nil, topic_arn: nil)
  @message = message
  Jsii::Type.check_type(@message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "message")
  @sender = sender
  Jsii::Type.check_type(@sender, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sender")
  @smtp_reply_code = smtp_reply_code
  Jsii::Type.check_type(@smtp_reply_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "smtpReplyCode")
  @status_code = status_code
  Jsii::Type.check_type(@status_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statusCode") unless @status_code.nil?
  @topic_arn = topic_arn
  Jsii::Type.check_type(@topic_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicArn") unless @topic_arn.nil?
end

Instance Attribute Details

#messageString (readonly)

Human-readable text to include in the bounce message.



704
705
706
# File 'ses/cfn_receipt_rule.rb', line 704

def message
  @message
end

#senderString (readonly)

The email address of the sender of the bounced email.

This is the address from which the bounce message is sent.



711
712
713
# File 'ses/cfn_receipt_rule.rb', line 711

def sender
  @sender
end

#smtp_reply_codeString (readonly)

The SMTP reply code, as defined by RFC 5321 .



716
717
718
# File 'ses/cfn_receipt_rule.rb', line 716

def smtp_reply_code
  @smtp_reply_code
end

#status_codeString? (readonly)

The SMTP enhanced status code, as defined by RFC 3463 .



721
722
723
# File 'ses/cfn_receipt_rule.rb', line 721

def status_code
  @status_code
end

#topic_arnString? (readonly)

The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken.

You can find the ARN of a topic by using the ListTopics operation in Amazon SNS.

For more information about Amazon SNS topics, see the Amazon SNS Developer Guide .



730
731
732
# File 'ses/cfn_receipt_rule.rb', line 730

def topic_arn
  @topic_arn
end

Class Method Details

.jsii_propertiesObject



732
733
734
735
736
737
738
739
740
# File 'ses/cfn_receipt_rule.rb', line 732

def self.jsii_properties
  {
    :message => "message",
    :sender => "sender",
    :smtp_reply_code => "smtpReplyCode",
    :status_code => "statusCode",
    :topic_arn => "topicArn",
  }
end

Instance Method Details

#to_jsiiObject



742
743
744
745
746
747
748
749
750
751
752
# File 'ses/cfn_receipt_rule.rb', line 742

def to_jsii
  result = {}
  result.merge!({
    "message" => @message,
    "sender" => @sender,
    "smtpReplyCode" => @smtp_reply_code,
    "statusCode" => @status_code,
    "topicArn" => @topic_arn,
  })
  result.compact
end