Class: AWSCDK::WAFRegional::CfnRateBasedRule::PredicateProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
waf_regional/cfn_rate_based_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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_id:, negated:, type:) ⇒ PredicateProperty

Returns a new instance of PredicateProperty.

Parameters:

  • data_id (String)

    A unique identifier for a predicate in a Rule , such as ByteMatchSetId or IPSetId .

  • negated (Boolean, AWSCDK::IResolvable)

    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 .

  • type (String)

    The type of predicate in a Rule , such as ByteMatch or IPSet .



574
575
576
577
578
579
580
581
# File 'waf_regional/cfn_rate_based_rule.rb', line 574

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_idString (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.



589
590
591
# File 'waf_regional/cfn_rate_based_rule.rb', line 589

def data_id
  @data_id
end

#negatedBoolean, 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 .



598
599
600
# File 'waf_regional/cfn_rate_based_rule.rb', line 598

def negated
  @negated
end

#typeString (readonly)

The type of predicate in a Rule , such as ByteMatch or IPSet .



603
604
605
# File 'waf_regional/cfn_rate_based_rule.rb', line 603

def type
  @type
end

Class Method Details

.jsii_propertiesObject



605
606
607
608
609
610
611
# File 'waf_regional/cfn_rate_based_rule.rb', line 605

def self.jsii_properties
  {
    :data_id => "dataId",
    :negated => "negated",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



613
614
615
616
617
618
619
620
621
# File 'waf_regional/cfn_rate_based_rule.rb', line 613

def to_jsii
  result = {}
  result.merge!({
    "dataId" => @data_id,
    "negated" => @negated,
    "type" => @type,
  })
  result.compact
end