Class: AWSCDK::WAFv2::CfnWebACL::CookieMatchPatternProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wa_fv2/cfn_web_acl.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.



1803
1804
1805
1806
1807
1808
1809
1810
# File 'wa_fv2/cfn_web_acl.rb', line 1803

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.



1816
1817
1818
# File 'wa_fv2/cfn_web_acl.rb', line 1816

def all
  @all
end

#excluded_cookiesArray<String>? (readonly)

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



1821
1822
1823
# File 'wa_fv2/cfn_web_acl.rb', line 1821

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.



1826
1827
1828
# File 'wa_fv2/cfn_web_acl.rb', line 1826

def included_cookies
  @included_cookies
end

Class Method Details

.jsii_propertiesObject



1828
1829
1830
1831
1832
1833
1834
# File 'wa_fv2/cfn_web_acl.rb', line 1828

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

Instance Method Details

#to_jsiiObject



1836
1837
1838
1839
1840
1841
1842
1843
1844
# File 'wa_fv2/cfn_web_acl.rb', line 1836

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