Class: AWSCDK::WAFv2::CfnWebACL::CookiesProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::CookiesProperty
- Defined in:
- wa_fv2/cfn_web_acl.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::CfnWebACL::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.
1862 1863 1864 1865 1866 1867 1868 1869 |
# File 'wa_fv2/cfn_web_acl.rb', line 1862 def initialize(match_pattern:, match_scope:, oversize_handling:) @match_pattern = match_pattern.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::CookieMatchPatternProperty.new(**match_pattern.transform_keys(&:to_sym)) : match_pattern Jsii::Type.check_type(@match_pattern, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuQ29va2llTWF0Y2hQYXR0ZXJuUHJvcGVydHkifV19fQ==")), "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::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" ] }
1879 1880 1881 |
# File 'wa_fv2/cfn_web_acl.rb', line 1879 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.
1888 1889 1890 |
# File 'wa_fv2/cfn_web_acl.rb', line 1888 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.
1901 1902 1903 |
# File 'wa_fv2/cfn_web_acl.rb', line 1901 def oversize_handling @oversize_handling end |
Class Method Details
.jsii_properties ⇒ Object
1903 1904 1905 1906 1907 1908 1909 |
# File 'wa_fv2/cfn_web_acl.rb', line 1903 def self.jsii_properties { :match_pattern => "matchPattern", :match_scope => "matchScope", :oversize_handling => "oversizeHandling", } end |
Instance Method Details
#to_jsii ⇒ Object
1911 1912 1913 1914 1915 1916 1917 1918 1919 |
# File 'wa_fv2/cfn_web_acl.rb', line 1911 def to_jsii result = {} result.merge!({ "matchPattern" => @match_pattern, "matchScope" => @match_scope, "oversizeHandling" => @oversize_handling, }) result.compact end |