Class: AWSCDK::SES::ReceiptRuleProps

Inherits:
ReceiptRuleOptions
  • Object
show all
Defined in:
ses/receipt_rule_props.rb

Overview

Construction properties for a ReceiptRule.

Direct Known Subclasses

DropSpamReceiptRuleProps

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, rule_set:) ⇒ ReceiptRuleProps

Returns a new instance of ReceiptRuleProps.

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

  • rule_set (AWSCDK::Interfaces::AWSSES::IReceiptRuleSetRef)

    The name of the rule set that the receipt rule will be added to.



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

def initialize(actions: nil, after: nil, enabled: nil, receipt_rule_name: nil, recipients: nil, scan_enabled: nil, tls_policy: nil, rule_set:)
  @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?
  @rule_set = rule_set
  Jsii::Type.check_type(@rule_set, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zZXMuSVJlY2VpcHRSdWxlU2V0UmVmIn0=")), "ruleSet")
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:



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

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.



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

def after
  @after
end

#enabledBoolean? (readonly)

Note:

Default: true

Whether the rule is active.

Returns:

  • (Boolean, nil)


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

def enabled
  @enabled
end

#receipt_rule_nameString? (readonly)

Note:

Default: - A CloudFormation generated name.

The name for the rule.

Returns:

  • (String, nil)


53
54
55
# File 'ses/receipt_rule_props.rb', line 53

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)


58
59
60
# File 'ses/receipt_rule_props.rb', line 58

def recipients
  @recipients
end

#rule_setAWSCDK::Interfaces::AWSSES::IReceiptRuleSetRef (readonly)

The name of the rule set that the receipt rule will be added to.



72
73
74
# File 'ses/receipt_rule_props.rb', line 72

def rule_set
  @rule_set
end

#scan_enabledBoolean? (readonly)

Note:

Default: false

Whether to scan for spam and viruses.

Returns:

  • (Boolean, nil)


63
64
65
# File 'ses/receipt_rule_props.rb', line 63

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:



68
69
70
# File 'ses/receipt_rule_props.rb', line 68

def tls_policy
  @tls_policy
end

Class Method Details

.jsii_propertiesObject



74
75
76
77
78
79
80
81
82
83
84
85
# File 'ses/receipt_rule_props.rb', line 74

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

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'ses/receipt_rule_props.rb', line 87

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