Interface CfnWebACL.FieldToMatchProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnWebACL.FieldToMatchProperty.Jsii$Proxy
Enclosing class:
CfnWebACL

@Stability(Stable) public static interface CfnWebACL.FieldToMatchProperty extends software.amazon.jsii.JsiiSerializable
The part of the web request that you want AWS WAF to inspect.

Include the single FieldToMatch type that you want to inspect, with additional specifications as needed, according to the type. You specify a single request component in FieldToMatch for each rule statement that requires it. To inspect more than one component of the web request, create a separate rule statement for each component.

Example JSON for a QueryString field to match:

"FieldToMatch": { "QueryString": {} }

Example JSON for a Method field to match specification:

"FieldToMatch": { "Method": { "Name": "DELETE" } }

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.wafv2.*;
 Object all;
 Object allQueryArguments;
 Object method;
 Object queryString;
 Object singleHeader;
 Object singleQueryArgument;
 Object uriPath;
 FieldToMatchProperty fieldToMatchProperty = FieldToMatchProperty.builder()
         .allQueryArguments(allQueryArguments)
         .body(BodyProperty.builder()
                 .oversizeHandling("oversizeHandling")
                 .build())
         .cookies(CookiesProperty.builder()
                 .matchPattern(CookieMatchPatternProperty.builder()
                         .all(all)
                         .excludedCookies(List.of("excludedCookies"))
                         .includedCookies(List.of("includedCookies"))
                         .build())
                 .matchScope("matchScope")
                 .oversizeHandling("oversizeHandling")
                 .build())
         .headers(HeadersProperty.builder()
                 .matchPattern(HeaderMatchPatternProperty.builder()
                         .all(all)
                         .excludedHeaders(List.of("excludedHeaders"))
                         .includedHeaders(List.of("includedHeaders"))
                         .build())
                 .matchScope("matchScope")
                 .oversizeHandling("oversizeHandling")
                 .build())
         .jsonBody(JsonBodyProperty.builder()
                 .matchPattern(JsonMatchPatternProperty.builder()
                         .all(all)
                         .includedPaths(List.of("includedPaths"))
                         .build())
                 .matchScope("matchScope")
                 // the properties below are optional
                 .invalidFallbackBehavior("invalidFallbackBehavior")
                 .oversizeHandling("oversizeHandling")
                 .build())
         .method(method)
         .queryString(queryString)
         .singleHeader(singleHeader)
         .singleQueryArgument(singleQueryArgument)
         .uriPath(uriPath)
         .build();
 

See Also: