Class: AWSCDK::SES::DropSpamReceiptRuleProps

Inherits:
ReceiptRuleProps
  • Object
show all
Defined in:
ses/drop_spam_receipt_rule_props.rb

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:) ⇒ DropSpamReceiptRuleProps

Returns a new instance of DropSpamReceiptRuleProps.

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.



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

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:



37
38
39
# File 'ses/drop_spam_receipt_rule_props.rb', line 37

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.



42
43
44
# File 'ses/drop_spam_receipt_rule_props.rb', line 42

def after
  @after
end

#enabledBoolean? (readonly)

Note:

Default: true

Whether the rule is active.

Returns:

  • (Boolean, nil)


47
48
49
# File 'ses/drop_spam_receipt_rule_props.rb', line 47

def enabled
  @enabled
end

#receipt_rule_nameString? (readonly)

Note:

Default: - A CloudFormation generated name.

The name for the rule.

Returns:

  • (String, nil)


52
53
54
# File 'ses/drop_spam_receipt_rule_props.rb', line 52

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)


57
58
59
# File 'ses/drop_spam_receipt_rule_props.rb', line 57

def recipients
  @recipients
end

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

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



71
72
73
# File 'ses/drop_spam_receipt_rule_props.rb', line 71

def rule_set
  @rule_set
end

#scan_enabledBoolean? (readonly)

Note:

Default: false

Whether to scan for spam and viruses.

Returns:

  • (Boolean, nil)


62
63
64
# File 'ses/drop_spam_receipt_rule_props.rb', line 62

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:



67
68
69
# File 'ses/drop_spam_receipt_rule_props.rb', line 67

def tls_policy
  @tls_policy
end

Class Method Details

.jsii_propertiesObject



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

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



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

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