Resource: awsWafSizeConstraintSet
Provides a WAF Size Constraint Set Resource
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.wafSizeConstraintSet.WafSizeConstraintSet(this, "size_constraint_set", {
name: "tfsize_constraints",
sizeConstraints: [
{
comparisonOperator: "EQ",
fieldToMatch: {
type: "BODY",
},
size: "4096",
textTransformation: "NONE",
},
],
});
Argument Reference
The following arguments are supported:
name
- (Required) The name or description of the Size Constraint Set.sizeConstraints
- (Optional) Specifies the parts of web requests that you want to inspect the size of.
Nested Blocks
sizeConstraints
Arguments
fieldToMatch
- (Required) Specifies where in a web request to look for the size constraint.comparisonOperator
- (Required) The type of comparison you want to perform. e.g.,eq
,ne
,lt
,gt
. See docs for all supported values.size
- (Required) The size in bytes that you want to compare against the size of the specifiedfieldToMatch
. Valid values are between 0 - 21474836480 bytes (0 - 20 GB).textTransformation
- (Required) Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. If you specify a transformation, AWS WAF performs the transformation onfieldToMatch
before inspecting a request for a match. e.g.,CMD_LINE
,HTML_ENTITY_DECODE
ornone
. See docs for all supported values. Note: if you choosebody
astype
, you must choosenone
because CloudFront forwards only the first 8192 bytes for inspection.
fieldToMatch
Arguments
data
- (Optional) Whentype
isheader
, enter the name of the header that you want to search, e.g.,userAgent
orreferer
. Iftype
is any other value, omit this field.type
- (Required) The part of the web request that you want AWS WAF to search for a specified string. e.g.,header
,method
orbody
. See docs for all supported values.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The ID of the WAF Size Constraint Set.arn
- Amazon Resource Name (ARN)
Import
AWS WAF Size Constraint Set can be imported using their ID, e.g.,