Class: AWSCDK::WAFv2::CfnRuleGroup::CookiesProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnRuleGroup::CookiesProperty
- Defined in:
- wa_fv2/cfn_rule_group.rb
Overview
Inspect the cookies in the web request.
You can specify the parts of the cookies to inspect and you can narrow the set of cookies to inspect by including or excluding specific keys.
This is used to indicate the web request component to inspect, in the FieldToMatch specification.
Example JSON: "Cookies": { "MatchPattern": { "All": {} }, "MatchScope": "KEY", "OversizeHandling": "MATCH" }
Instance Attribute Summary collapse
-
#match_pattern ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnRuleGroup::CookieMatchPatternProperty
readonly
The filter to use to identify the subset of cookies to inspect in a web request.
-
#match_scope ⇒ String
readonly
The parts of the cookies to inspect with the rule inspection criteria.
-
#oversize_handling ⇒ String
readonly
What AWS WAF should do if the cookies of the request 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:) ⇒ CookiesProperty
constructor
A new instance of CookiesProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(match_pattern:, match_scope:, oversize_handling:) ⇒ CookiesProperty
Returns a new instance of CookiesProperty.
1195 1196 1197 1198 1199 1200 1201 1202 |
# File 'wa_fv2/cfn_rule_group.rb', line 1195 def initialize(match_pattern:, match_scope:, oversize_handling:) @match_pattern = match_pattern.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnRuleGroup::CookieMatchPatternProperty.new(**match_pattern.transform_keys(&:to_sym)) : match_pattern Jsii::Type.check_type(@match_pattern, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5SdWxlR3JvdXAuQ29va2llTWF0Y2hQYXR0ZXJuUHJvcGVydHkifV19fQ==")), "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::CookieMatchPatternProperty (readonly)
The filter to use to identify the subset of cookies to inspect in a web request.
You must specify exactly one setting: either All , IncludedCookies , or ExcludedCookies .
Example JSON: "MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] }
1212 1213 1214 |
# File 'wa_fv2/cfn_rule_group.rb', line 1212 def match_pattern @match_pattern end |
#match_scope ⇒ String (readonly)
The parts of the cookies to inspect 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.
1221 1222 1223 |
# File 'wa_fv2/cfn_rule_group.rb', line 1221 def match_scope @match_scope end |
#oversize_handling ⇒ String (readonly)
What AWS WAF should do if the cookies of the request are more numerous or larger than AWS WAF can inspect.
AWS WAF does not support inspecting the entire contents of request cookies when they exceed 8 KB (8192 bytes) or 200 total cookies. The underlying host service forwards a maximum of 200 cookies and at most 8 KB of cookie contents to AWS WAF .
The options for oversize handling are the following:
CONTINUE- Inspect the available cookies 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.
1234 1235 1236 |
# File 'wa_fv2/cfn_rule_group.rb', line 1234 def oversize_handling @oversize_handling end |
Class Method Details
.jsii_properties ⇒ Object
1236 1237 1238 1239 1240 1241 1242 |
# File 'wa_fv2/cfn_rule_group.rb', line 1236 def self.jsii_properties { :match_pattern => "matchPattern", :match_scope => "matchScope", :oversize_handling => "oversizeHandling", } end |
Instance Method Details
#to_jsii ⇒ Object
1244 1245 1246 1247 1248 1249 1250 1251 1252 |
# File 'wa_fv2/cfn_rule_group.rb', line 1244 def to_jsii result = {} result.merge!({ "matchPattern" => @match_pattern, "matchScope" => @match_scope, "oversizeHandling" => @oversize_handling, }) result.compact end |