Skip to content
v2.277.0

CfnByteMatchSetProps Struct ​

Properties for defining a CfnByteMatchSet.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_waf as waf } from 'aws-cdk-lib';
const cfnByteMatchSetProps: waf.CfnByteMatchSetProps = {
  name: 'name',

  // the properties below are optional
  byteMatchTuples: [{
    fieldToMatch: {
      type: 'type',

      // the properties below are optional
      data: 'data',
    },
    positionalConstraint: 'positionalConstraint',
    textTransformation: 'textTransformation',

    // the properties below are optional
    targetString: 'targetString',
    targetStringBase64: 'targetStringBase64',
  }],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_waf as waf

cfn_byte_match_set_props = waf.CfnByteMatchSetProps(
    name="name",

    # the properties below are optional
    byte_match_tuples=[waf.CfnByteMatchSet.ByteMatchTupleProperty(
        field_to_match=waf.CfnByteMatchSet.FieldToMatchProperty(
            type="type",

            # the properties below are optional
            data="data"
        ),
        positional_constraint="positionalConstraint",
        text_transformation="textTransformation",

        # the properties below are optional
        target_string="targetString",
        target_string_base64="targetStringBase64"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.waf.*;

CfnByteMatchSetProps cfnByteMatchSetProps = CfnByteMatchSetProps.builder()
        .name("name")

        // the properties below are optional
        .byteMatchTuples(List.of(ByteMatchTupleProperty.builder()
                .fieldToMatch(FieldToMatchProperty.builder()
                        .type("type")

                        // the properties below are optional
                        .data("data")
                        .build())
                .positionalConstraint("positionalConstraint")
                .textTransformation("textTransformation")

                // the properties below are optional
                .targetString("targetString")
                .targetStringBase64("targetStringBase64")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAF;

var cfnByteMatchSetProps = new CfnByteMatchSetProps {
    Name = "name",

    // the properties below are optional
    ByteMatchTuples = new [] { new ByteMatchTupleProperty {
        FieldToMatch = new FieldToMatchProperty {
            Type = "type",

            // the properties below are optional
            Data = "data"
        },
        PositionalConstraint = "positionalConstraint",
        TextTransformation = "textTransformation",

        // the properties below are optional
        TargetString = "targetString",
        TargetStringBase64 = "targetStringBase64"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnByteMatchSetProps := &CfnByteMatchSetProps{
	Name: jsii.String("name"),

	// the properties below are optional
	ByteMatchTuples: []interface{}{
		&ByteMatchTupleProperty{
			FieldToMatch: &FieldToMatchProperty{
				Type: jsii.String("type"),

				// the properties below are optional
				Data: jsii.String("data"),
			},
			PositionalConstraint: jsii.String("positionalConstraint"),
			TextTransformation: jsii.String("textTransformation"),

			// the properties below are optional
			TargetString: jsii.String("targetString"),
			TargetStringBase64: jsii.String("targetStringBase64"),
		},
	},
}

Properties ​

byteMatchTuplesoptionalIResolvable | IResolvable | CfnByteMatchSet.ByteMatchTupleProperty[]byte_match_tuplesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ByteMatchTupleProperty]]]byteMatchTuplesoptionalIResolvableByteMatchTuplesoptionalIResolvableByteMatchTuplesoptionalinterface{}#
Specifies the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests, the location in requests that you want AWS WAF to search, and other settings.
namestringnamestrnameStringNamestringName*stringrequired#
The name of the `ByteMatchSet` .

You can't change Name after you create a ByteMatchSet .