Class: AWSCDK::SES::ReceiptRuleOptions

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

Overview

Options to add a receipt rule to a receipt rule set.

Direct Known Subclasses

ReceiptRuleProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actions: nil, after: nil, enabled: nil, receipt_rule_name: nil, recipients: nil, scan_enabled: nil, tls_policy: nil) ⇒ ReceiptRuleOptions

Returns a new instance of ReceiptRuleOptions.

Parameters:

  • actions (Array<AWSCDK::SES::IReceiptRuleAction>, nil) (defaults to: nil)

    An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.

  • after (AWSCDK::Interfaces::AWSSES::IReceiptRuleRef, nil) (defaults to: nil)

    An existing rule after which the new rule will be placed.

  • enabled (Boolean, nil) (defaults to: nil)

    Whether the rule is active.

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

    The name for the rule.

  • recipients (Array<String>, nil) (defaults to: nil)

    The recipient domains and email addresses that the receipt rule applies to.

  • scan_enabled (Boolean, nil) (defaults to: nil)

    Whether to scan for spam and viruses.

  • tls_policy (AWSCDK::SES::TLSPolicy, nil) (defaults to: nil)

    Whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'ses/receipt_rule_options.rb', line 14

def initialize(actions: nil, after: nil, enabled: nil, receipt_rule_name: nil, recipients: nil, scan_enabled: nil, tls_policy: nil)
  @actions = actions
  Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXMuSVJlY2VpcHRSdWxlQWN0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "actions") unless @actions.nil?
  @after = after
  Jsii::Type.check_type(@after, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zZXMuSVJlY2VpcHRSdWxlUmVmIn0=")), "after") unless @after.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil?
  @receipt_rule_name = receipt_rule_name
  Jsii::Type.check_type(@receipt_rule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "receiptRuleName") unless @receipt_rule_name.nil?
  @recipients = recipients
  Jsii::Type.check_type(@recipients, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "recipients") unless @recipients.nil?
  @scan_enabled = scan_enabled
  Jsii::Type.check_type(@scan_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "scanEnabled") unless @scan_enabled.nil?
  @tls_policy = tls_policy
  Jsii::Type.check_type(@tls_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VzLlRsc1BvbGljeSJ9")), "tlsPolicy") unless @tls_policy.nil?
end

Instance Attribute Details

#actionsArray<AWSCDK::SES::IReceiptRuleAction>? (readonly)

Note:

Default: - No actions.

An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.

Returns:



35
36
37
# File 'ses/receipt_rule_options.rb', line 35

def actions
  @actions
end

#afterAWSCDK::Interfaces::AWSSES::IReceiptRuleRef? (readonly)

Note:

Default: - The new rule is inserted at the beginning of the rule list.

An existing rule after which the new rule will be placed.



40
41
42
# File 'ses/receipt_rule_options.rb', line 40

def after
  @after
end

#enabledBoolean? (readonly)

Note:

Default: true

Whether the rule is active.

Returns:

  • (Boolean, nil)


45
46
47
# File 'ses/receipt_rule_options.rb', line 45

def enabled
  @enabled
end

#receipt_rule_nameString? (readonly)

Note:

Default: - A CloudFormation generated name.

The name for the rule.

Returns:

  • (String, nil)


50
51
52
# File 'ses/receipt_rule_options.rb', line 50

def receipt_rule_name
  @receipt_rule_name
end

#recipientsArray<String>? (readonly)

Note:

Default: - Match all recipients under all verified domains.

The recipient domains and email addresses that the receipt rule applies to.

Returns:

  • (Array<String>, nil)


55
56
57
# File 'ses/receipt_rule_options.rb', line 55

def recipients
  @recipients
end

#scan_enabledBoolean? (readonly)

Note:

Default: false

Whether to scan for spam and viruses.

Returns:

  • (Boolean, nil)


60
61
62
# File 'ses/receipt_rule_options.rb', line 60

def scan_enabled
  @scan_enabled
end

#tls_policyAWSCDK::SES::TLSPolicy? (readonly)

Note:

Default: - Optional which will not check for TLS.

Whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).

Returns:



65
66
67
# File 'ses/receipt_rule_options.rb', line 65

def tls_policy
  @tls_policy
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
76
77
# File 'ses/receipt_rule_options.rb', line 67

def self.jsii_properties
  {
    :actions => "actions",
    :after => "after",
    :enabled => "enabled",
    :receipt_rule_name => "receiptRuleName",
    :recipients => "recipients",
    :scan_enabled => "scanEnabled",
    :tls_policy => "tlsPolicy",
  }
end

Instance Method Details

#to_jsiiObject



79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'ses/receipt_rule_options.rb', line 79

def to_jsii
  result = {}
  result.merge!({
    "actions" => @actions,
    "after" => @after,
    "enabled" => @enabled,
    "receiptRuleName" => @receipt_rule_name,
    "recipients" => @recipients,
    "scanEnabled" => @scan_enabled,
    "tlsPolicy" => @tls_policy,
  })
  result.compact
end