Class: AWSCDK::SES::BounceActionConfig

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

Overview

BoundAction configuration.

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) ⇒ BounceActionConfig

Returns a new instance of BounceActionConfig.

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.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'ses/bounce_action_config.rb', line 12

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.

Returns:

  • (String)


28
29
30
# File 'ses/bounce_action_config.rb', line 28

def message
  @message
end

#senderString (readonly)

The email address of the sender of the bounced email.

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

Returns:

  • (String)


34
35
36
# File 'ses/bounce_action_config.rb', line 34

def sender
  @sender
end

#smtp_reply_codeString (readonly)

The SMTP reply code, as defined by RFC 5321.

Returns:

  • (String)


38
39
40
# File 'ses/bounce_action_config.rb', line 38

def smtp_reply_code
  @smtp_reply_code
end

#status_codeString? (readonly)

Note:

Default: - No status code.

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

Returns:

  • (String, nil)


43
44
45
# File 'ses/bounce_action_config.rb', line 43

def status_code
  @status_code
end

#topic_arnString? (readonly)

Note:

Default: - No notification is sent to SNS.

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

Returns:

  • (String, nil)


48
49
50
# File 'ses/bounce_action_config.rb', line 48

def topic_arn
  @topic_arn
end

Class Method Details

.jsii_propertiesObject



50
51
52
53
54
55
56
57
58
# File 'ses/bounce_action_config.rb', line 50

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

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
70
# File 'ses/bounce_action_config.rb', line 60

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