@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 of the body up to the limit
for the web ACL. By default, for regional web ACLs, this limit is 8 KB (8,192 kilobytes) and for CloudFront web ACLs,
this limit is 16 KB (16,384 kilobytes). For CloudFront web ACLs, you can increase the limit in the web ACL
AssociationConfig, for additional fees. If you know that the request body for your web requests should
never exceed the inspection limit, you could use a size constraint statement to block requests that have a larger
request body size.
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) |
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.ComparisonOperatorpublic String getComparisonOperator()
The operator to use to compare the request part to the size setting.
ComparisonOperatorpublic 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.ComparisonOperatorpublic 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.ComparisonOperatorpublic 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 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 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 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 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 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 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 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 component contents.public String toString()
toString in class ObjectObject.toString()public SizeConstraintStatement clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
marshall in interface StructuredPojoCopyright © 2023. All rights reserved.