Class: AWSCDK::SES::CfnMailManagerRuleSet::RuleProperty

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

Overview

A rule contains conditions, "unless conditions" and actions.

For each envelope recipient of an email, if all conditions match and none of the "unless conditions" match, then all of the actions are executed sequentially. If no conditions are provided, the rule always applies and the actions are implicitly executed. If only "unless conditions" are provided, the rule applies if the email does not match the evaluation of the "unless conditions".

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actions:, conditions: nil, name: nil, _unless: nil) ⇒ RuleProperty

Returns a new instance of RuleProperty.

Parameters:



1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
# File 'ses/cfn_mail_manager_rule_set.rb', line 1659

def initialize(actions:, conditions: nil, name: nil, _unless: nil)
  @actions = actions
  Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VzLkNmbk1haWxNYW5hZ2VyUnVsZVNldC5SdWxlQWN0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "actions")
  @conditions = conditions
  Jsii::Type.check_type(@conditions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VzLkNmbk1haWxNYW5hZ2VyUnVsZVNldC5SdWxlQ29uZGl0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "conditions") unless @conditions.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @_unless = _unless
  Jsii::Type.check_type(@_unless, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VzLkNmbk1haWxNYW5hZ2VyUnVsZVNldC5SdWxlQ29uZGl0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "unless") unless @_unless.nil?
end

Instance Attribute Details

#_unlessAWSCDK::IResolvable, ... (readonly)

The "unless conditions" of this rule.

None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.



1693
1694
1695
# File 'ses/cfn_mail_manager_rule_set.rb', line 1693

def _unless
  @_unless
end

#actionsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::SES::CfnMailManagerRuleSet::RuleActionProperty> (readonly)

The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.



1674
1675
1676
# File 'ses/cfn_mail_manager_rule_set.rb', line 1674

def actions
  @actions
end

#conditionsAWSCDK::IResolvable, ... (readonly)

The conditions of this rule.

All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"



1681
1682
1683
# File 'ses/cfn_mail_manager_rule_set.rb', line 1681

def conditions
  @conditions
end

#nameString? (readonly)

The user-friendly name of the rule.



1686
1687
1688
# File 'ses/cfn_mail_manager_rule_set.rb', line 1686

def name
  @name
end

Class Method Details

.jsii_propertiesObject



1695
1696
1697
1698
1699
1700
1701
1702
# File 'ses/cfn_mail_manager_rule_set.rb', line 1695

def self.jsii_properties
  {
    :actions => "actions",
    :conditions => "conditions",
    :name => "name",
    :_unless => "unless",
  }
end

Instance Method Details

#to_jsiiObject



1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
# File 'ses/cfn_mail_manager_rule_set.rb', line 1704

def to_jsii
  result = {}
  result.merge!({
    "actions" => @actions,
    "conditions" => @conditions,
    "name" => @name,
    "unless" => @_unless,
  })
  result.compact
end