Class: AWSCDK::WAFRegional::CfnRule::PredicateProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFRegional::CfnRule::PredicateProperty
- Defined in:
- waf_regional/cfn_rule.rb
Overview
Specifies the ByteMatchSet , IPSet , SqlInjectionMatchSet , XssMatchSet , RegexMatchSet , GeoMatchSet , and SizeConstraintSet objects that you want to add to a Rule and, for each object, indicates whether you want to negate the settings, for example, requests that do NOT originate from the IP address 192.0.2.44.
Instance Attribute Summary collapse
-
#data_id ⇒ String
readonly
A unique identifier for a predicate in a
Rule, such asByteMatchSetIdorIPSetId. -
#negated ⇒ Boolean, AWSCDK::IResolvable
readonly
Set
NegatedtoFalseif you want AWS WAF to allow, block, or count requests based on the settings in the specifiedByteMatchSet,IPSet,SqlInjectionMatchSet,XssMatchSet,RegexMatchSet,GeoMatchSet, orSizeConstraintSet. -
#type ⇒ String
readonly
The type of predicate in a
Rule, such asByteMatchorIPSet.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data_id:, negated:, type:) ⇒ PredicateProperty
constructor
A new instance of PredicateProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(data_id:, negated:, type:) ⇒ PredicateProperty
Returns a new instance of PredicateProperty.
544 545 546 547 548 549 550 551 |
# File 'waf_regional/cfn_rule.rb', line 544 def initialize(data_id:, negated:, type:) @data_id = data_id Jsii::Type.check_type(@data_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataId") @negated = negated Jsii::Type.check_type(@negated, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "negated") @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") end |
Instance Attribute Details
#data_id ⇒ String (readonly)
A unique identifier for a predicate in a Rule , such as ByteMatchSetId or IPSetId .
The ID is returned by the corresponding Create or List command.
559 560 561 |
# File 'waf_regional/cfn_rule.rb', line 559 def data_id @data_id end |
#negated ⇒ Boolean, AWSCDK::IResolvable (readonly)
Set Negated to False if you want AWS WAF to allow, block, or count requests based on the settings in the specified ByteMatchSet , IPSet , SqlInjectionMatchSet , XssMatchSet , RegexMatchSet , GeoMatchSet , or SizeConstraintSet .
For example, if an IPSet includes the IP address 192.0.2.44 , AWS WAF will allow or block requests based on that IP address.
Set Negated to True if you want AWS WAF to allow or block a request based on the negation of the settings in the ByteMatchSet , IPSet , SqlInjectionMatchSet , XssMatchSet , RegexMatchSet , GeoMatchSet , or SizeConstraintSet . For example, if an IPSet includes the IP address 192.0.2.44 , AWS WAF will allow, block, or count requests based on all IP addresses except 192.0.2.44 .
568 569 570 |
# File 'waf_regional/cfn_rule.rb', line 568 def negated @negated end |
#type ⇒ String (readonly)
The type of predicate in a Rule , such as ByteMatch or IPSet .
573 574 575 |
# File 'waf_regional/cfn_rule.rb', line 573 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
575 576 577 578 579 580 581 |
# File 'waf_regional/cfn_rule.rb', line 575 def self.jsii_properties { :data_id => "dataId", :negated => "negated", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
583 584 585 586 587 588 589 590 591 |
# File 'waf_regional/cfn_rule.rb', line 583 def to_jsii result = {} result.merge!({ "dataId" => @data_id, "negated" => @negated, "type" => @type, }) result.compact end |