SizeConstraintSet
Provides a WAF Size Constraint Set Resource
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var sizeConstraintSet = new Aws.Waf.SizeConstraintSet("sizeConstraintSet", new Aws.Waf.SizeConstraintSetArgs
{
SizeConstraints =
{
new Aws.Waf.Inputs.SizeConstraintSetSizeConstraintArgs
{
ComparisonOperator = "EQ",
FieldToMatch = new Aws.Waf.Inputs.SizeConstraintSetSizeConstraintFieldToMatchArgs
{
Type = "BODY",
},
Size = 4096,
TextTransformation = "NONE",
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/waf"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := waf.NewSizeConstraintSet(ctx, "sizeConstraintSet", &waf.SizeConstraintSetArgs{
SizeConstraints: waf.SizeConstraintSetSizeConstraintArray{
&waf.SizeConstraintSetSizeConstraintArgs{
ComparisonOperator: pulumi.String("EQ"),
FieldToMatch: &waf.SizeConstraintSetSizeConstraintFieldToMatchArgs{
Type: pulumi.String("BODY"),
},
Size: pulumi.Int(4096),
TextTransformation: pulumi.String("NONE"),
},
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
size_constraint_set = aws.waf.SizeConstraintSet("sizeConstraintSet", size_constraints=[{
"comparison_operator": "EQ",
"fieldToMatch": {
"type": "BODY",
},
"size": "4096",
"textTransformation": "NONE",
}])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const sizeConstraintSet = new aws.waf.SizeConstraintSet("size_constraint_set", {
sizeConstraints: [{
comparisonOperator: "EQ",
fieldToMatch: {
type: "BODY",
},
size: 4096,
textTransformation: "NONE",
}],
});Create a SizeConstraintSet Resource
new SizeConstraintSet(name: string, args?: SizeConstraintSetArgs, opts?: CustomResourceOptions);def SizeConstraintSet(resource_name, opts=None, name=None, size_constraints=None, __props__=None);func NewSizeConstraintSet(ctx *Context, name string, args *SizeConstraintSetArgs, opts ...ResourceOption) (*SizeConstraintSet, error)public SizeConstraintSet(string name, SizeConstraintSetArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args SizeConstraintSetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SizeConstraintSetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SizeConstraintSetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
SizeConstraintSet Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The SizeConstraintSet resource accepts the following input properties:
- Name string
The name or description of the Size Constraint Set.
- Size
Constraints List<SizeConstraint Set Size Constraint Args> Specifies the parts of web requests that you want to inspect the size of.
- Name string
The name or description of the Size Constraint Set.
- Size
Constraints []SizeConstraint Set Size Constraint Specifies the parts of web requests that you want to inspect the size of.
- name string
The name or description of the Size Constraint Set.
- size
Constraints SizeConstraint Set Size Constraint[] Specifies the parts of web requests that you want to inspect the size of.
- name str
The name or description of the Size Constraint Set.
- size_
constraints List[SizeConstraint Set Size Constraint] Specifies the parts of web requests that you want to inspect the size of.
Outputs
All input properties are implicitly available as output properties. Additionally, the SizeConstraintSet resource produces the following output properties:
Look up an Existing SizeConstraintSet Resource
Get an existing SizeConstraintSet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SizeConstraintSetState, opts?: CustomResourceOptions): SizeConstraintSetstatic get(resource_name, id, opts=None, arn=None, name=None, size_constraints=None, __props__=None);func GetSizeConstraintSet(ctx *Context, name string, id IDInput, state *SizeConstraintSetState, opts ...ResourceOption) (*SizeConstraintSet, error)public static SizeConstraintSet Get(string name, Input<string> id, SizeConstraintSetState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
Amazon Resource Name (ARN)
- Name string
The name or description of the Size Constraint Set.
- Size
Constraints List<SizeConstraint Set Size Constraint Args> Specifies the parts of web requests that you want to inspect the size of.
- Arn string
Amazon Resource Name (ARN)
- Name string
The name or description of the Size Constraint Set.
- Size
Constraints []SizeConstraint Set Size Constraint Specifies the parts of web requests that you want to inspect the size of.
- arn string
Amazon Resource Name (ARN)
- name string
The name or description of the Size Constraint Set.
- size
Constraints SizeConstraint Set Size Constraint[] Specifies the parts of web requests that you want to inspect the size of.
- arn str
Amazon Resource Name (ARN)
- name str
The name or description of the Size Constraint Set.
- size_
constraints List[SizeConstraint Set Size Constraint] Specifies the parts of web requests that you want to inspect the size of.
Supporting Types
SizeConstraintSetSizeConstraint
- Comparison
Operator string The type of comparison you want to perform. e.g.
EQ,NE,LT,GT. See docs for all supported values.- Field
To SizeMatch Constraint Set Size Constraint Field To Match Args Specifies where in a web request to look for the size constraint.
- Size int
The size in bytes that you want to compare against the size of the specified
field_to_match. Valid values are between 0 - 21474836480 bytes (0 - 20 GB).- Text
Transformation string 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 on
field_to_matchbefore inspecting a request for a match. e.g.CMD_LINE,HTML_ENTITY_DECODEorNONE. See docs for all supported values. Note: if you chooseBODYastype, you must chooseNONEbecause CloudFront forwards only the first 8192 bytes for inspection.
- Comparison
Operator string The type of comparison you want to perform. e.g.
EQ,NE,LT,GT. See docs for all supported values.- Field
To SizeMatch Constraint Set Size Constraint Field To Match Specifies where in a web request to look for the size constraint.
- Size int
The size in bytes that you want to compare against the size of the specified
field_to_match. Valid values are between 0 - 21474836480 bytes (0 - 20 GB).- Text
Transformation string 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 on
field_to_matchbefore inspecting a request for a match. e.g.CMD_LINE,HTML_ENTITY_DECODEorNONE. See docs for all supported values. Note: if you chooseBODYastype, you must chooseNONEbecause CloudFront forwards only the first 8192 bytes for inspection.
- comparison
Operator string The type of comparison you want to perform. e.g.
EQ,NE,LT,GT. See docs for all supported values.- field
To SizeMatch Constraint Set Size Constraint Field To Match Specifies where in a web request to look for the size constraint.
- size number
The size in bytes that you want to compare against the size of the specified
field_to_match. Valid values are between 0 - 21474836480 bytes (0 - 20 GB).- text
Transformation string 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 on
field_to_matchbefore inspecting a request for a match. e.g.CMD_LINE,HTML_ENTITY_DECODEorNONE. See docs for all supported values. Note: if you chooseBODYastype, you must chooseNONEbecause CloudFront forwards only the first 8192 bytes for inspection.
- comparison_
operator str The type of comparison you want to perform. e.g.
EQ,NE,LT,GT. See docs for all supported values.- field
To Dict[SizeMatch Constraint Set Size Constraint Field To Match] Specifies where in a web request to look for the size constraint.
- size float
The size in bytes that you want to compare against the size of the specified
field_to_match. Valid values are between 0 - 21474836480 bytes (0 - 20 GB).- text
Transformation str 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 on
field_to_matchbefore inspecting a request for a match. e.g.CMD_LINE,HTML_ENTITY_DECODEorNONE. See docs for all supported values. Note: if you chooseBODYastype, you must chooseNONEbecause CloudFront forwards only the first 8192 bytes for inspection.
SizeConstraintSetSizeConstraintFieldToMatch
- Type string
The part of the web request that you want AWS WAF to search for a specified string. e.g.
HEADER,METHODorBODY. See docs for all supported values.- Data string
When
typeisHEADER, enter the name of the header that you want to search, e.g.User-AgentorReferer. Iftypeis any other value, omit this field.
- Type string
The part of the web request that you want AWS WAF to search for a specified string. e.g.
HEADER,METHODorBODY. See docs for all supported values.- Data string
When
typeisHEADER, enter the name of the header that you want to search, e.g.User-AgentorReferer. Iftypeis any other value, omit this field.
- type string
The part of the web request that you want AWS WAF to search for a specified string. e.g.
HEADER,METHODorBODY. See docs for all supported values.- data string
When
typeisHEADER, enter the name of the header that you want to search, e.g.User-AgentorReferer. Iftypeis any other value, omit this field.
- type str
The part of the web request that you want AWS WAF to search for a specified string. e.g.
HEADER,METHODorBODY. See docs for all supported values.- data str
When
typeisHEADER, enter the name of the header that you want to search, e.g.User-AgentorReferer. Iftypeis any other value, omit this field.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.