Try AWS Native preview for resources not in the classic version.
aws.waf.SizeConstraintSet
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a WAF Size Constraint Set Resource
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var sizeConstraintSet = new Aws.Waf.SizeConstraintSet("sizeConstraintSet", new()
{
SizeConstraints = new[]
{
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/v5/go/aws/waf"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.SizeConstraintSet;
import com.pulumi.aws.waf.SizeConstraintSetArgs;
import com.pulumi.aws.waf.inputs.SizeConstraintSetSizeConstraintArgs;
import com.pulumi.aws.waf.inputs.SizeConstraintSetSizeConstraintFieldToMatchArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var sizeConstraintSet = new SizeConstraintSet("sizeConstraintSet", SizeConstraintSetArgs.builder()
.sizeConstraints(SizeConstraintSetSizeConstraintArgs.builder()
.comparisonOperator("EQ")
.fieldToMatch(SizeConstraintSetSizeConstraintFieldToMatchArgs.builder()
.type("BODY")
.build())
.size("4096")
.textTransformation("NONE")
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
size_constraint_set = aws.waf.SizeConstraintSet("sizeConstraintSet", size_constraints=[aws.waf.SizeConstraintSetSizeConstraintArgs(
comparison_operator="EQ",
field_to_match=aws.waf.SizeConstraintSetSizeConstraintFieldToMatchArgs(
type="BODY",
),
size=4096,
text_transformation="NONE",
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const sizeConstraintSet = new aws.waf.SizeConstraintSet("sizeConstraintSet", {sizeConstraints: [{
comparisonOperator: "EQ",
fieldToMatch: {
type: "BODY",
},
size: 4096,
textTransformation: "NONE",
}]});
resources:
sizeConstraintSet:
type: aws:waf:SizeConstraintSet
properties:
sizeConstraints:
- comparisonOperator: EQ
fieldToMatch:
type: BODY
size: '4096'
textTransformation: NONE
Create SizeConstraintSet Resource
new SizeConstraintSet(name: string, args?: SizeConstraintSetArgs, opts?: CustomResourceOptions);
@overload
def SizeConstraintSet(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
size_constraints: Optional[Sequence[SizeConstraintSetSizeConstraintArgs]] = None)
@overload
def SizeConstraintSet(resource_name: str,
args: Optional[SizeConstraintSetArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewSizeConstraintSet(ctx *Context, name string, args *SizeConstraintSetArgs, opts ...ResourceOption) (*SizeConstraintSet, error)
public SizeConstraintSet(string name, SizeConstraintSetArgs? args = null, CustomResourceOptions? opts = null)
public SizeConstraintSet(String name, SizeConstraintSetArgs args)
public SizeConstraintSet(String name, SizeConstraintSetArgs args, CustomResourceOptions options)
type: aws:waf:SizeConstraintSet
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args SizeConstraintSetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args SizeConstraintSetArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts 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 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 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 Args[] 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 Sequence[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 List<Property Map> 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 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): SizeConstraintSet
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
name: Optional[str] = None,
size_constraints: Optional[Sequence[SizeConstraintSetSizeConstraintArgs]] = None) -> SizeConstraintSet
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)
public static SizeConstraintSet get(String name, Output<String> id, SizeConstraintSetState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- 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 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 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 Args[] 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 Sequence[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 List<Property Map> 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 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_match
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.
- 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_match
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.
- 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 Integer
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_match
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.
- 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_match
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.
- 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_ 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 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_match
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.
- 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 Property MapMatch 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_match
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.
SizeConstraintSetSizeConstraintFieldToMatch
- Type string
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.- Data string
When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
is 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
,METHOD
orBODY
. See docs for all supported values.- Data string
When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
is 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
,METHOD
orBODY
. See docs for all supported values.- data String
When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
is 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
,METHOD
orBODY
. See docs for all supported values.- data string
When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
is 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
,METHOD
orBODY
. See docs for all supported values.- data str
When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
is 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
,METHOD
orBODY
. See docs for all supported values.- data String
When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
is any other value, omit this field.
Import
AWS WAF Size Constraint Set can be imported using their ID, e.g.,
$ pulumi import aws:waf/sizeConstraintSet:SizeConstraintSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.