Class: AWSCDK::WAFv2::CfnRuleGroup::CookieMatchPatternProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wa_fv2/cfn_rule_group.rb

Overview

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" ] }

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(all: nil, excluded_cookies: nil, included_cookies: nil) ⇒ CookieMatchPatternProperty

Returns a new instance of CookieMatchPatternProperty.

Parameters:

  • all (Object, nil) (defaults to: nil)

    Inspect all cookies.

  • excluded_cookies (Array<String>, nil) (defaults to: nil)

    Inspect only the cookies whose keys don't match any of the strings specified here.

  • included_cookies (Array<String>, nil) (defaults to: nil)

    Inspect only the cookies that have a key that matches one of the strings specified here.



1136
1137
1138
1139
1140
1141
1142
1143
# File 'wa_fv2/cfn_rule_group.rb', line 1136

def initialize(all: nil, excluded_cookies: nil, included_cookies: nil)
  @all = all
  Jsii::Type.check_type(@all, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "all") unless @all.nil?
  @excluded_cookies = excluded_cookies
  Jsii::Type.check_type(@excluded_cookies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludedCookies") unless @excluded_cookies.nil?
  @included_cookies = included_cookies
  Jsii::Type.check_type(@included_cookies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "includedCookies") unless @included_cookies.nil?
end

Instance Attribute Details

#allObject? (readonly)

Inspect all cookies.



1149
1150
1151
# File 'wa_fv2/cfn_rule_group.rb', line 1149

def all
  @all
end

#excluded_cookiesArray<String>? (readonly)

Inspect only the cookies whose keys don't match any of the strings specified here.



1154
1155
1156
# File 'wa_fv2/cfn_rule_group.rb', line 1154

def excluded_cookies
  @excluded_cookies
end

#included_cookiesArray<String>? (readonly)

Inspect only the cookies that have a key that matches one of the strings specified here.



1159
1160
1161
# File 'wa_fv2/cfn_rule_group.rb', line 1159

def included_cookies
  @included_cookies
end

Class Method Details

.jsii_propertiesObject



1161
1162
1163
1164
1165
1166
1167
# File 'wa_fv2/cfn_rule_group.rb', line 1161

def self.jsii_properties
  {
    :all => "all",
    :excluded_cookies => "excludedCookies",
    :included_cookies => "includedCookies",
  }
end

Instance Method Details

#to_jsiiObject



1169
1170
1171
1172
1173
1174
1175
1176
1177
# File 'wa_fv2/cfn_rule_group.rb', line 1169

def to_jsii
  result = {}
  result.merge!({
    "all" => @all,
    "excludedCookies" => @excluded_cookies,
    "includedCookies" => @included_cookies,
  })
  result.compact
end