Class: AWSCDK::WAFv2::CfnWebACL::HeaderMatchPatternProperty

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

Overview

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(all: nil, excluded_headers: nil, included_headers: nil) ⇒ HeaderMatchPatternProperty

Returns a new instance of HeaderMatchPatternProperty.

Parameters:

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

    Inspect all headers.

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

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

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

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



2835
2836
2837
2838
2839
2840
2841
2842
# File 'wa_fv2/cfn_web_acl.rb', line 2835

def initialize(all: nil, excluded_headers: nil, included_headers: nil)
  @all = all
  Jsii::Type.check_type(@all, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "all") unless @all.nil?
  @excluded_headers = excluded_headers
  Jsii::Type.check_type(@excluded_headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludedHeaders") unless @excluded_headers.nil?
  @included_headers = included_headers
  Jsii::Type.check_type(@included_headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "includedHeaders") unless @included_headers.nil?
end

Instance Attribute Details

#allObject? (readonly)

Inspect all headers.



2848
2849
2850
# File 'wa_fv2/cfn_web_acl.rb', line 2848

def all
  @all
end

#excluded_headersArray<String>? (readonly)

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



2853
2854
2855
# File 'wa_fv2/cfn_web_acl.rb', line 2853

def excluded_headers
  @excluded_headers
end

#included_headersArray<String>? (readonly)

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



2858
2859
2860
# File 'wa_fv2/cfn_web_acl.rb', line 2858

def included_headers
  @included_headers
end

Class Method Details

.jsii_propertiesObject



2860
2861
2862
2863
2864
2865
2866
# File 'wa_fv2/cfn_web_acl.rb', line 2860

def self.jsii_properties
  {
    :all => "all",
    :excluded_headers => "excludedHeaders",
    :included_headers => "includedHeaders",
  }
end

Instance Method Details

#to_jsiiObject



2868
2869
2870
2871
2872
2873
2874
2875
2876
# File 'wa_fv2/cfn_web_acl.rb', line 2868

def to_jsii
  result = {}
  result.merge!({
    "all" => @all,
    "excludedHeaders" => @excluded_headers,
    "includedHeaders" => @included_headers,
  })
  result.compact
end