Class: AWSCDK::WAFv2::CfnWebACL::HeadersProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::HeadersProperty
- Defined in:
- wa_fv2/cfn_web_acl.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::CfnWebACL::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.
2929 2930 2931 2932 2933 2934 2935 2936 |
# File 'wa_fv2/cfn_web_acl.rb', line 2929 def initialize(match_pattern:, match_scope:, oversize_handling:) @match_pattern = match_pattern.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::HeaderMatchPatternProperty.new(**match_pattern.transform_keys(&:to_sym)) : match_pattern Jsii::Type.check_type(@match_pattern, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuSGVhZGVyTWF0Y2hQYXR0ZXJuUHJvcGVydHkifV19fQ==")), "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::CfnWebACL::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" ] }
2946 2947 2948 |
# File 'wa_fv2/cfn_web_acl.rb', line 2946 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.
2955 2956 2957 |
# File 'wa_fv2/cfn_web_acl.rb', line 2955 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.
2968 2969 2970 |
# File 'wa_fv2/cfn_web_acl.rb', line 2968 def oversize_handling @oversize_handling end |
Class Method Details
.jsii_properties ⇒ Object
2970 2971 2972 2973 2974 2975 2976 |
# File 'wa_fv2/cfn_web_acl.rb', line 2970 def self.jsii_properties { :match_pattern => "matchPattern", :match_scope => "matchScope", :oversize_handling => "oversizeHandling", } end |
Instance Method Details
#to_jsii ⇒ Object
2978 2979 2980 2981 2982 2983 2984 2985 2986 |
# File 'wa_fv2/cfn_web_acl.rb', line 2978 def to_jsii result = {} result.merge!({ "matchPattern" => @match_pattern, "matchScope" => @match_scope, "oversizeHandling" => @oversize_handling, }) result.compact end |