Class: AWSCDK::WAFv2::CfnRuleGroup::HeadersProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnRuleGroup::HeadersProperty
- Defined in:
- wa_fv2/cfn_rule_group.rb
Overview
Inspect all headers in the web request.
You can specify the parts of the headers to inspect and you can narrow the set of headers to inspect by including or excluding specific keys.
This is used to indicate the web request component to inspect, in the FieldToMatch specification.
If you want to inspect just the value of a single header, use the SingleHeader FieldToMatch setting instead.
Example JSON: "Headers": { "MatchPattern": { "All": {} }, "MatchScope": "KEY", "OversizeHandling": "MATCH" }
Instance Attribute Summary collapse
-
#match_pattern ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnRuleGroup::HeaderMatchPatternProperty
readonly
The filter to use to identify the subset of headers to inspect in a web request.
-
#match_scope ⇒ String
readonly
The parts of the headers to match with the rule inspection criteria.
-
#oversize_handling ⇒ String
readonly
What AWS WAF should do if the headers determined by your match scope are more numerous or larger than AWS WAF can inspect.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(match_pattern:, match_scope:, oversize_handling:) ⇒ HeadersProperty
constructor
A new instance of HeadersProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(match_pattern:, match_scope:, oversize_handling:) ⇒ HeadersProperty
Returns a new instance of HeadersProperty.
1994 1995 1996 1997 1998 1999 2000 2001 |
# File 'wa_fv2/cfn_rule_group.rb', line 1994 def initialize(match_pattern:, match_scope:, oversize_handling:) @match_pattern = match_pattern.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnRuleGroup::HeaderMatchPatternProperty.new(**match_pattern.transform_keys(&:to_sym)) : match_pattern Jsii::Type.check_type(@match_pattern, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5SdWxlR3JvdXAuSGVhZGVyTWF0Y2hQYXR0ZXJuUHJvcGVydHkifV19fQ==")), "matchPattern") @match_scope = match_scope Jsii::Type.check_type(@match_scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "matchScope") @oversize_handling = oversize_handling Jsii::Type.check_type(@oversize_handling, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "oversizeHandling") end |
Instance Attribute Details
#match_pattern ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnRuleGroup::HeaderMatchPatternProperty (readonly)
The filter to use to identify the subset of headers to inspect in a web request.
You must specify exactly one setting: either All , IncludedHeaders , or ExcludedHeaders .
Example JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", "KeyToExclude2" ] }
2011 2012 2013 |
# File 'wa_fv2/cfn_rule_group.rb', line 2011 def match_pattern @match_pattern end |
#match_scope ⇒ String (readonly)
The parts of the headers to match with the rule inspection criteria.
If you specify ALL , AWS WAF inspects both keys and values.
All does not require a match to be found in the keys and a match to be found in the values. It requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, use a logical AND statement to combine two match rules, one that inspects the keys and another that inspects the values.
2020 2021 2022 |
# File 'wa_fv2/cfn_rule_group.rb', line 2020 def match_scope @match_scope end |
#oversize_handling ⇒ String (readonly)
What AWS WAF should do if the headers determined by your match scope are more numerous or larger than AWS WAF can inspect.
AWS WAF does not support inspecting the entire contents of request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The underlying host service forwards a maximum of 200 headers and at most 8 KB of header contents to AWS WAF .
The options for oversize handling are the following:
CONTINUE- Inspect the available headers normally, according to the rule inspection criteria.MATCH- Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.NO_MATCH- Treat the web request as not matching the rule statement.
2033 2034 2035 |
# File 'wa_fv2/cfn_rule_group.rb', line 2033 def oversize_handling @oversize_handling end |
Class Method Details
.jsii_properties ⇒ Object
2035 2036 2037 2038 2039 2040 2041 |
# File 'wa_fv2/cfn_rule_group.rb', line 2035 def self.jsii_properties { :match_pattern => "matchPattern", :match_scope => "matchScope", :oversize_handling => "oversizeHandling", } end |
Instance Method Details
#to_jsii ⇒ Object
2043 2044 2045 2046 2047 2048 2049 2050 2051 |
# File 'wa_fv2/cfn_rule_group.rb', line 2043 def to_jsii result = {} result.merge!({ "matchPattern" => @match_pattern, "matchScope" => @match_scope, "oversizeHandling" => @oversize_handling, }) result.compact end |