@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class JsonBody extends Object implements Serializable, Cloneable, StructuredPojo
The body of a web request, inspected as JSON. The body immediately follows the request headers. This is used in the FieldToMatch specification.
Use the specifications in this object to indicate which parts of the JSON body to inspect using the rule's inspection criteria. AWS WAF inspects only the parts of the JSON that result from the matches that you indicate.
| Constructor and Description |
|---|
JsonBody() |
| Modifier and Type | Method and Description |
|---|---|
JsonBody |
clone() |
boolean |
equals(Object obj) |
String |
getInvalidFallbackBehavior()
The inspection behavior to fall back to if the JSON in the request body is invalid.
|
JsonMatchPattern |
getMatchPattern()
The patterns to look for in the JSON body.
|
String |
getMatchScope()
The parts of the JSON to match against using the
MatchPattern. |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller) |
void |
setInvalidFallbackBehavior(String invalidFallbackBehavior)
The inspection behavior to fall back to if the JSON in the request body is invalid.
|
void |
setMatchPattern(JsonMatchPattern matchPattern)
The patterns to look for in the JSON body.
|
void |
setMatchScope(String matchScope)
The parts of the JSON to match against using the
MatchPattern. |
String |
toString()
Returns a string representation of this object.
|
JsonBody |
withInvalidFallbackBehavior(BodyParsingFallbackBehavior invalidFallbackBehavior)
The inspection behavior to fall back to if the JSON in the request body is invalid.
|
JsonBody |
withInvalidFallbackBehavior(String invalidFallbackBehavior)
The inspection behavior to fall back to if the JSON in the request body is invalid.
|
JsonBody |
withMatchPattern(JsonMatchPattern matchPattern)
The patterns to look for in the JSON body.
|
JsonBody |
withMatchScope(JsonMatchScope matchScope)
The parts of the JSON to match against using the
MatchPattern. |
JsonBody |
withMatchScope(String matchScope)
The parts of the JSON to match against using the
MatchPattern. |
public void setMatchPattern(JsonMatchPattern matchPattern)
The patterns to look for in the JSON body. AWS WAF inspects the results of these pattern matches against the rule inspection criteria.
matchPattern - The patterns to look for in the JSON body. AWS WAF inspects the results of these pattern matches against
the rule inspection criteria.public JsonMatchPattern getMatchPattern()
The patterns to look for in the JSON body. AWS WAF inspects the results of these pattern matches against the rule inspection criteria.
public JsonBody withMatchPattern(JsonMatchPattern matchPattern)
The patterns to look for in the JSON body. AWS WAF inspects the results of these pattern matches against the rule inspection criteria.
matchPattern - The patterns to look for in the JSON body. AWS WAF inspects the results of these pattern matches against
the rule inspection criteria.public void setMatchScope(String matchScope)
The parts of the JSON to match against using the MatchPattern. If you specify All, AWS
WAF matches against keys and values.
matchScope - The parts of the JSON to match against using the MatchPattern. If you specify
All, AWS WAF matches against keys and values.JsonMatchScopepublic String getMatchScope()
The parts of the JSON to match against using the MatchPattern. If you specify All, AWS
WAF matches against keys and values.
MatchPattern. If you specify
All, AWS WAF matches against keys and values.JsonMatchScopepublic JsonBody withMatchScope(String matchScope)
The parts of the JSON to match against using the MatchPattern. If you specify All, AWS
WAF matches against keys and values.
matchScope - The parts of the JSON to match against using the MatchPattern. If you specify
All, AWS WAF matches against keys and values.JsonMatchScopepublic JsonBody withMatchScope(JsonMatchScope matchScope)
The parts of the JSON to match against using the MatchPattern. If you specify All, AWS
WAF matches against keys and values.
matchScope - The parts of the JSON to match against using the MatchPattern. If you specify
All, AWS WAF matches against keys and values.JsonMatchScopepublic void setInvalidFallbackBehavior(String invalidFallbackBehavior)
The inspection behavior to fall back to if the JSON in the request body is invalid. For AWS WAF, invalid JSON is any content that isn't complete syntactical JSON, content whose root node isn't an object or an array, and duplicate keys in the content.
You can specify the following fallback behaviors:
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.
EVALUATE_AS_STRING - Inspect the body as plain text. This option applies the text transformations
and inspection criteria that you defined for the JSON inspection to the body text string.
If you don't provide this setting, when AWS WAF encounters invalid JSON, it parses and inspects what it can, up to the first invalid JSON that it encounters.
invalidFallbackBehavior - The inspection behavior to fall back to if the JSON in the request body is invalid. For AWS WAF, invalid
JSON is any content that isn't complete syntactical JSON, content whose root node isn't an object or an
array, and duplicate keys in the content.
You can specify the following fallback behaviors:
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.
EVALUATE_AS_STRING - Inspect the body as plain text. This option applies the text
transformations and inspection criteria that you defined for the JSON inspection to the body text string.
If you don't provide this setting, when AWS WAF encounters invalid JSON, it parses and inspects what it can, up to the first invalid JSON that it encounters.
BodyParsingFallbackBehaviorpublic String getInvalidFallbackBehavior()
The inspection behavior to fall back to if the JSON in the request body is invalid. For AWS WAF, invalid JSON is any content that isn't complete syntactical JSON, content whose root node isn't an object or an array, and duplicate keys in the content.
You can specify the following fallback behaviors:
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.
EVALUATE_AS_STRING - Inspect the body as plain text. This option applies the text transformations
and inspection criteria that you defined for the JSON inspection to the body text string.
If you don't provide this setting, when AWS WAF encounters invalid JSON, it parses and inspects what it can, up to the first invalid JSON that it encounters.
You can specify the following fallback behaviors:
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.
EVALUATE_AS_STRING - Inspect the body as plain text. This option applies the text
transformations and inspection criteria that you defined for the JSON inspection to the body text string.
If you don't provide this setting, when AWS WAF encounters invalid JSON, it parses and inspects what it can, up to the first invalid JSON that it encounters.
BodyParsingFallbackBehaviorpublic JsonBody withInvalidFallbackBehavior(String invalidFallbackBehavior)
The inspection behavior to fall back to if the JSON in the request body is invalid. For AWS WAF, invalid JSON is any content that isn't complete syntactical JSON, content whose root node isn't an object or an array, and duplicate keys in the content.
You can specify the following fallback behaviors:
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.
EVALUATE_AS_STRING - Inspect the body as plain text. This option applies the text transformations
and inspection criteria that you defined for the JSON inspection to the body text string.
If you don't provide this setting, when AWS WAF encounters invalid JSON, it parses and inspects what it can, up to the first invalid JSON that it encounters.
invalidFallbackBehavior - The inspection behavior to fall back to if the JSON in the request body is invalid. For AWS WAF, invalid
JSON is any content that isn't complete syntactical JSON, content whose root node isn't an object or an
array, and duplicate keys in the content.
You can specify the following fallback behaviors:
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.
EVALUATE_AS_STRING - Inspect the body as plain text. This option applies the text
transformations and inspection criteria that you defined for the JSON inspection to the body text string.
If you don't provide this setting, when AWS WAF encounters invalid JSON, it parses and inspects what it can, up to the first invalid JSON that it encounters.
BodyParsingFallbackBehaviorpublic JsonBody withInvalidFallbackBehavior(BodyParsingFallbackBehavior invalidFallbackBehavior)
The inspection behavior to fall back to if the JSON in the request body is invalid. For AWS WAF, invalid JSON is any content that isn't complete syntactical JSON, content whose root node isn't an object or an array, and duplicate keys in the content.
You can specify the following fallback behaviors:
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.
EVALUATE_AS_STRING - Inspect the body as plain text. This option applies the text transformations
and inspection criteria that you defined for the JSON inspection to the body text string.
If you don't provide this setting, when AWS WAF encounters invalid JSON, it parses and inspects what it can, up to the first invalid JSON that it encounters.
invalidFallbackBehavior - The inspection behavior to fall back to if the JSON in the request body is invalid. For AWS WAF, invalid
JSON is any content that isn't complete syntactical JSON, content whose root node isn't an object or an
array, and duplicate keys in the content.
You can specify the following fallback behaviors:
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.
EVALUATE_AS_STRING - Inspect the body as plain text. This option applies the text
transformations and inspection criteria that you defined for the JSON inspection to the body text string.
If you don't provide this setting, when AWS WAF encounters invalid JSON, it parses and inspects what it can, up to the first invalid JSON that it encounters.
BodyParsingFallbackBehaviorpublic String toString()
toString in class ObjectObject.toString()public void marshall(ProtocolMarshaller protocolMarshaller)
marshall in interface StructuredPojoCopyright © 2021. All rights reserved.