Class: AWSCDK::WAFv2::CfnRuleGroup::JsonMatchPatternProperty

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

Overview

The patterns to look for in the JSON body.

AWS WAF inspects the results of these pattern matches against the rule inspection criteria. This is used with the FieldToMatch option JsonBody .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(all: nil, included_paths: nil) ⇒ JsonMatchPatternProperty

Returns a new instance of JsonMatchPatternProperty.

Parameters:

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

    Match all of the elements. See also MatchScope in the JsonBody FieldToMatch specification.

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

    Match only the specified include paths. See also MatchScope in the JsonBody FieldToMatch specification.



2425
2426
2427
2428
2429
2430
# File 'wa_fv2/cfn_rule_group.rb', line 2425

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

Instance Attribute Details

#allObject? (readonly)

Match all of the elements. See also MatchScope in the JsonBody FieldToMatch specification.

You must specify either this setting or the IncludedPaths setting, but not both.



2438
2439
2440
# File 'wa_fv2/cfn_rule_group.rb', line 2438

def all
  @all
end

#included_pathsArray<String>? (readonly)

Match only the specified include paths. See also MatchScope in the JsonBody FieldToMatch specification.

Provide the include paths using JSON Pointer syntax. For example, "IncludedPaths": ["/dogs/0/name", "/dogs/1/name"] . For information about this syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer .

You must specify either this setting or the All setting, but not both.

Don't use this option to include all paths. Instead, use the All setting.



2449
2450
2451
# File 'wa_fv2/cfn_rule_group.rb', line 2449

def included_paths
  @included_paths
end

Class Method Details

.jsii_propertiesObject



2451
2452
2453
2454
2455
2456
# File 'wa_fv2/cfn_rule_group.rb', line 2451

def self.jsii_properties
  {
    :all => "all",
    :included_paths => "includedPaths",
  }
end

Instance Method Details

#to_jsiiObject



2458
2459
2460
2461
2462
2463
2464
2465
# File 'wa_fv2/cfn_rule_group.rb', line 2458

def to_jsii
  result = {}
  result.merge!({
    "all" => @all,
    "includedPaths" => @included_paths,
  })
  result.compact
end