@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SizeConstraintStatement extends Object implements Serializable, Cloneable, StructuredPojo
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 WAF to inspect the request body, 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 the web request that you want 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 the web request that you want 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 the web request that you want 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 the web request that you want WAF to inspect. For more information, see FieldToMatch.
fieldToMatch
- The part of the web request that you want WAF to inspect. For more information, see FieldToMatch.public FieldToMatch getFieldToMatch()
The part of the web request that you want WAF to inspect. For more information, see FieldToMatch.
public SizeConstraintStatement withFieldToMatch(FieldToMatch fieldToMatch)
The part of the web request that you want WAF to inspect. For more information, see FieldToMatch.
fieldToMatch
- The part of the web request that you want 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, WAF performs all
transformations on the content of the request component 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, WAF performs all
transformations on the content of the request component 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, WAF performs
all transformations on the content of the request component 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, WAF performs all
transformations on the content of the request component 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, WAF performs
all transformations on the content of the request component 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, WAF performs all
transformations on the content of the request component 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, WAF performs
all transformations on the content of the request component 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.