@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 number of bytes in the body up to the limit
for the web ACL and protected resource type. If you know that the request body for your web requests should never
exceed the inspection limit, you can use a size constraint statement to block requests that have a larger request
body size. For more information about the inspection limits, see Body
and JsonBody
settings
for the FieldToMatch
data type.
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.
fieldToMatch
- The part of the web request that you want WAF to inspect.public FieldToMatch getFieldToMatch()
The part of the web request that you want WAF to inspect.
public SizeConstraintStatement withFieldToMatch(FieldToMatch fieldToMatch)
The part of the web request that you want WAF to inspect.
fieldToMatch
- The part of the web request that you want WAF to inspect.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. Text transformations are used in rule match statements, to transform the
FieldToMatch
request component before inspecting it, and they're used in rate-based rule statements,
to transform request components before using them as custom aggregation keys. If you specify one or more
transformations to apply, WAF performs all transformations on the specified content, starting from the lowest
priority setting, and then uses the transformed component contents.
FieldToMatch
request component before inspecting it, and they're used in rate-based rule
statements, to transform request components before using them as custom aggregation keys. If you specify
one or more transformations to apply, WAF performs all transformations on the specified content, starting
from the lowest priority setting, and then uses the transformed component contents.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. Text transformations are used in rule match statements, to transform the
FieldToMatch
request component before inspecting it, and they're used in rate-based rule statements,
to transform request components before using them as custom aggregation keys. If you specify one or more
transformations to apply, WAF performs all transformations on the specified content, starting from the lowest
priority setting, and then uses the transformed component contents.
textTransformations
- Text transformations eliminate some of the unusual formatting that attackers use in web requests in an
effort to bypass detection. Text transformations are used in rule match statements, to transform the
FieldToMatch
request component before inspecting it, and they're used in rate-based rule
statements, to transform request components before using them as custom aggregation keys. If you specify
one or more transformations to apply, WAF performs all transformations on the specified content, starting
from the lowest priority setting, and then uses the transformed component contents.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. Text transformations are used in rule match statements, to transform the
FieldToMatch
request component before inspecting it, and they're used in rate-based rule statements,
to transform request components before using them as custom aggregation keys. If you specify one or more
transformations to apply, WAF performs all transformations on the specified content, starting from the lowest
priority setting, and then uses the transformed component contents.
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. Text transformations are used in rule match statements, to transform the
FieldToMatch
request component before inspecting it, and they're used in rate-based rule
statements, to transform request components before using them as custom aggregation keys. If you specify
one or more transformations to apply, WAF performs all transformations on the specified content, starting
from the lowest priority setting, and then uses the transformed component contents.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. Text transformations are used in rule match statements, to transform the
FieldToMatch
request component before inspecting it, and they're used in rate-based rule statements,
to transform request components before using them as custom aggregation keys. If you specify one or more
transformations to apply, WAF performs all transformations on the specified content, starting from the lowest
priority setting, and then uses the transformed component contents.
textTransformations
- Text transformations eliminate some of the unusual formatting that attackers use in web requests in an
effort to bypass detection. Text transformations are used in rule match statements, to transform the
FieldToMatch
request component before inspecting it, and they're used in rate-based rule
statements, to transform request components before using them as custom aggregation keys. If you specify
one or more transformations to apply, WAF performs all transformations on the specified content, starting
from the lowest priority setting, and then uses the transformed component contents.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.