Class: AWSCDK::SES::CfnMailManagerRuleSet::RuleIPExpressionProperty

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

Overview

An IP address expression matching certain IP addresses within a given range of IP addresses.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(evaluate:, operator:, values:) ⇒ RuleIPExpressionProperty

Returns a new instance of RuleIPExpressionProperty.

Parameters:

  • evaluate (AWSCDK::IResolvable, AWSCDK::SES::CfnMailManagerRuleSet::RuleIPToEvaluateProperty)

    The IP address to evaluate in this condition.

  • operator (String)

    The operator to evaluate the IP address.

  • values (Array<String>)

    The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.



1441
1442
1443
1444
1445
1446
1447
1448
# File 'ses/cfn_mail_manager_rule_set.rb', line 1441

def initialize(evaluate:, operator:, values:)
  @evaluate = evaluate.is_a?(Hash) ? ::AWSCDK::SES::CfnMailManagerRuleSet::RuleIPToEvaluateProperty.new(**evaluate.transform_keys(&:to_sym)) : evaluate
  Jsii::Type.check_type(@evaluate, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXMuQ2ZuTWFpbE1hbmFnZXJSdWxlU2V0LlJ1bGVJcFRvRXZhbHVhdGVQcm9wZXJ0eSJ9XX19")), "evaluate")
  @operator = operator
  Jsii::Type.check_type(@operator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operator")
  @values = values
  Jsii::Type.check_type(@values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "values")
end

Instance Attribute Details

#operatorString (readonly)

The operator to evaluate the IP address.



1459
1460
1461
# File 'ses/cfn_mail_manager_rule_set.rb', line 1459

def operator
  @operator
end

#valuesArray<String> (readonly)

The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.



1464
1465
1466
# File 'ses/cfn_mail_manager_rule_set.rb', line 1464

def values
  @values
end

Class Method Details

.jsii_propertiesObject



1466
1467
1468
1469
1470
1471
1472
# File 'ses/cfn_mail_manager_rule_set.rb', line 1466

def self.jsii_properties
  {
    :evaluate => "evaluate",
    :operator => "operator",
    :values => "values",
  }
end

Instance Method Details

#to_jsiiObject



1474
1475
1476
1477
1478
1479
1480
1481
1482
# File 'ses/cfn_mail_manager_rule_set.rb', line 1474

def to_jsii
  result = {}
  result.merge!({
    "evaluate" => @evaluate,
    "operator" => @operator,
    "values" => @values,
  })
  result.compact
end