@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SizeConstraintStatement extends Object implements Serializable, Cloneable, StructuredPojo
This is the latest version of AWS WAF, named AWS WAFV2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide.
A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<). For example, you can use a size constraint statement to look for query strings that are longer than 100 bytes.
If you configure AWS WAF to inspect the request body, AWS WAF inspects only the first 8192 bytes (8 KB). If the request body for your web requests never exceeds 8192 bytes, you can create a size constraint condition and block requests that have a request body greater than 8192 bytes.
If you choose URI for the value of Part of the request to filter on, the slash (/) in the URI counts as one
character. For example, the URI /logo.jpg
is nine characters long.
Constructor and Description |
---|
SizeConstraintStatement() |
Modifier and Type | Method and Description |
---|---|
SizeConstraintStatement |
clone() |
boolean |
equals(Object obj) |
String |
getComparisonOperator()
The operator to use to compare the request part to the size setting.
|
FieldToMatch |
getFieldToMatch()
The part of a web request that you want AWS WAF to inspect.
|
Long |
getSize()
The size, in byte, to compare to the request part, after any transformations.
|
List<TextTransformation> |
getTextTransformations()
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to
bypass detection.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setComparisonOperator(String comparisonOperator)
The operator to use to compare the request part to the size setting.
|
void |
setFieldToMatch(FieldToMatch fieldToMatch)
The part of a web request that you want AWS WAF to inspect.
|
void |
setSize(Long size)
The size, in byte, to compare to the request part, after any transformations.
|
void |
setTextTransformations(Collection<TextTransformation> textTransformations)
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to
bypass detection.
|
String |
toString()
Returns a string representation of this object.
|
SizeConstraintStatement |
withComparisonOperator(ComparisonOperator comparisonOperator)
The operator to use to compare the request part to the size setting.
|
SizeConstraintStatement |
withComparisonOperator(String comparisonOperator)
The operator to use to compare the request part to the size setting.
|
SizeConstraintStatement |
withFieldToMatch(FieldToMatch fieldToMatch)
The part of a web request that you want AWS WAF to inspect.
|
SizeConstraintStatement |
withSize(Long size)
The size, in byte, to compare to the request part, after any transformations.
|
SizeConstraintStatement |
withTextTransformations(Collection<TextTransformation> textTransformations)
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to
bypass detection.
|
SizeConstraintStatement |
withTextTransformations(TextTransformation... textTransformations)
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to
bypass detection.
|
public void setFieldToMatch(FieldToMatch fieldToMatch)
The part of a web request that you want AWS WAF to inspect. For more information, see FieldToMatch.
fieldToMatch
- The part of a web request that you want AWS WAF to inspect. For more information, see FieldToMatch.public FieldToMatch getFieldToMatch()
The part of a web request that you want AWS WAF to inspect. For more information, see FieldToMatch.
public SizeConstraintStatement withFieldToMatch(FieldToMatch fieldToMatch)
The part of a web request that you want AWS WAF to inspect. For more information, see FieldToMatch.
fieldToMatch
- The part of a web request that you want AWS WAF to inspect. For more information, see FieldToMatch.public void setComparisonOperator(String comparisonOperator)
The operator to use to compare the request part to the size setting.
comparisonOperator
- The operator to use to compare the request part to the size setting.ComparisonOperator
public String getComparisonOperator()
The operator to use to compare the request part to the size setting.
ComparisonOperator
public SizeConstraintStatement withComparisonOperator(String comparisonOperator)
The operator to use to compare the request part to the size setting.
comparisonOperator
- The operator to use to compare the request part to the size setting.ComparisonOperator
public SizeConstraintStatement withComparisonOperator(ComparisonOperator comparisonOperator)
The operator to use to compare the request part to the size setting.
comparisonOperator
- The operator to use to compare the request part to the size setting.ComparisonOperator
public void setSize(Long size)
The size, in byte, to compare to the request part, after any transformations.
size
- The size, in byte, to compare to the request part, after any transformations.public Long getSize()
The size, in byte, to compare to the request part, after any transformations.
public SizeConstraintStatement withSize(Long size)
The size, in byte, to compare to the request part, after any transformations.
size
- The size, in byte, to compare to the request part, after any transformations.public List<TextTransformation> getTextTransformations()
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to
bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all
transformations on the content identified by FieldToMatch
, starting from the lowest priority
setting, before inspecting the content for a match.
FieldToMatch
, starting from the
lowest priority setting, before inspecting the content for a match.public void setTextTransformations(Collection<TextTransformation> textTransformations)
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to
bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all
transformations on the content identified by FieldToMatch
, starting from the lowest priority
setting, before inspecting the content for a match.
textTransformations
- Text transformations eliminate some of the unusual formatting that attackers use in web requests in an
effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF
performs all transformations on the content identified by FieldToMatch
, starting from the
lowest priority setting, before inspecting the content for a match.public SizeConstraintStatement withTextTransformations(TextTransformation... textTransformations)
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to
bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all
transformations on the content identified by FieldToMatch
, starting from the lowest priority
setting, before inspecting the content for a match.
NOTE: This method appends the values to the existing list (if any). Use
setTextTransformations(java.util.Collection)
or withTextTransformations(java.util.Collection)
if you want to override the existing values.
textTransformations
- Text transformations eliminate some of the unusual formatting that attackers use in web requests in an
effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF
performs all transformations on the content identified by FieldToMatch
, starting from the
lowest priority setting, before inspecting the content for a match.public SizeConstraintStatement withTextTransformations(Collection<TextTransformation> textTransformations)
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to
bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all
transformations on the content identified by FieldToMatch
, starting from the lowest priority
setting, before inspecting the content for a match.
textTransformations
- Text transformations eliminate some of the unusual formatting that attackers use in web requests in an
effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF
performs all transformations on the content identified by FieldToMatch
, starting from the
lowest priority setting, before inspecting the content for a match.public String toString()
toString
in class Object
Object.toString()
public SizeConstraintStatement clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.