public static final class CfnRuleGroup.JsonBodyProperty.Builder
extends java.lang.Object
CfnRuleGroup.JsonBodyProperty
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CfnRuleGroup.JsonBodyProperty |
build()
Builds the configured instance.
|
CfnRuleGroup.JsonBodyProperty.Builder |
invalidFallbackBehavior(java.lang.String invalidFallbackBehavior)
Sets the value of
CfnRuleGroup.JsonBodyProperty.getInvalidFallbackBehavior() |
CfnRuleGroup.JsonBodyProperty.Builder |
matchPattern(CfnRuleGroup.JsonMatchPatternProperty matchPattern)
Sets the value of
CfnRuleGroup.JsonBodyProperty.getMatchPattern() |
CfnRuleGroup.JsonBodyProperty.Builder |
matchPattern(IResolvable matchPattern)
Sets the value of
CfnRuleGroup.JsonBodyProperty.getMatchPattern() |
CfnRuleGroup.JsonBodyProperty.Builder |
matchScope(java.lang.String matchScope)
Sets the value of
CfnRuleGroup.JsonBodyProperty.getMatchScope() |
CfnRuleGroup.JsonBodyProperty.Builder |
oversizeHandling(java.lang.String oversizeHandling)
Sets the value of
CfnRuleGroup.JsonBodyProperty.getOversizeHandling() |
public CfnRuleGroup.JsonBodyProperty.Builder matchPattern(IResolvable matchPattern)
CfnRuleGroup.JsonBodyProperty.getMatchPattern()
matchPattern
- The patterns to look for in the JSON body. This parameter is required.
AWS WAF inspects the results of these pattern matches against the rule inspection criteria.this
public CfnRuleGroup.JsonBodyProperty.Builder matchPattern(CfnRuleGroup.JsonMatchPatternProperty matchPattern)
CfnRuleGroup.JsonBodyProperty.getMatchPattern()
matchPattern
- The patterns to look for in the JSON body. This parameter is required.
AWS WAF inspects the results of these pattern matches against the rule inspection criteria.this
public CfnRuleGroup.JsonBodyProperty.Builder matchScope(java.lang.String matchScope)
CfnRuleGroup.JsonBodyProperty.getMatchScope()
matchScope
- The parts of the JSON to match against using the `MatchPattern` . This parameter is required.
If you specify All
, AWS WAF matches against keys and values.this
public CfnRuleGroup.JsonBodyProperty.Builder invalidFallbackBehavior(java.lang.String invalidFallbackBehavior)
CfnRuleGroup.JsonBodyProperty.getInvalidFallbackBehavior()
invalidFallbackBehavior
- What AWS WAF should do if it fails to completely parse the JSON body. The options are the following:.
EVALUATE_AS_STRING
- Inspect the body as plain text. AWS WAF applies the text transformations and inspection criteria that you defined for the JSON inspection to the body text string.MATCH
- Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.NO_MATCH
- Treat the web request as not matching the rule statement.If you don't provide this setting, AWS WAF parses and evaluates the content only up to the first parsing failure that it encounters.
AWS WAF does its best to parse the entire JSON body, but might be forced to stop for reasons such as invalid characters, duplicate keys, truncation, and any content whose root node isn't an object or an array.
AWS WAF parses the JSON in the following examples as two valid key, value pairs:
{"key1":"value1""key2":"value2"}
{"key1":"value1","key2""value2"}
{"key1"::"value1","key2""value2"}
this
public CfnRuleGroup.JsonBodyProperty.Builder oversizeHandling(java.lang.String oversizeHandling)
CfnRuleGroup.JsonBodyProperty.getOversizeHandling()
oversizeHandling
- What AWS WAF should do if the body is larger than AWS WAF can inspect.
AWS WAF does not support inspecting the entire contents of the body of a web request when the body exceeds 8 KB (8192 bytes). Only the first 8 KB of the request body are forwarded to AWS WAF by the underlying host service.
The options for oversize handling are the following:
CONTINUE
- Inspect the body normally, according to the rule inspection criteria.MATCH
- Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.NO_MATCH
- Treat the web request as not matching the rule statement.
You can combine the MATCH
or NO_MATCH
settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over 8 KB.
Default: CONTINUE
this
public CfnRuleGroup.JsonBodyProperty build()
CfnRuleGroup.JsonBodyProperty
java.lang.NullPointerException
- if any required attribute was not provided