ByteMatchSet

Provides a WAF Regional Byte Match Set Resource for use with Application Load Balancer.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var byteSet = new Aws.WafRegional.ByteMatchSet("byteSet", new Aws.WafRegional.ByteMatchSetArgs
        {
            ByteMatchTuples = 
            {
                new Aws.WafRegional.Inputs.ByteMatchSetByteMatchTupleArgs
                {
                    FieldToMatch = new Aws.WafRegional.Inputs.ByteMatchSetByteMatchTupleFieldToMatchArgs
                    {
                        Data = "referer",
                        Type = "HEADER",
                    },
                    PositionalConstraint = "CONTAINS",
                    TargetString = "badrefer1",
                    TextTransformation = "NONE",
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/wafregional"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := wafregional.NewByteMatchSet(ctx, "byteSet", &wafregional.ByteMatchSetArgs{
            ByteMatchTuples: wafregional.ByteMatchSetByteMatchTupleArray{
                &wafregional.ByteMatchSetByteMatchTupleArgs{
                    FieldToMatch: &wafregional.ByteMatchSetByteMatchTupleFieldToMatchArgs{
                        Data: pulumi.String("referer"),
                        Type: pulumi.String("HEADER"),
                    },
                    PositionalConstraint: pulumi.String("CONTAINS"),
                    TargetString:         pulumi.String("badrefer1"),
                    TextTransformation:   pulumi.String("NONE"),
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

byte_set = aws.wafregional.ByteMatchSet("byteSet", byte_match_tuples=[{
    "fieldToMatch": {
        "data": "referer",
        "type": "HEADER",
    },
    "positionalConstraint": "CONTAINS",
    "targetString": "badrefer1",
    "textTransformation": "NONE",
}])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const byteSet = new aws.wafregional.ByteMatchSet("byte_set", {
    byteMatchTuples: [{
        fieldToMatch: {
            data: "referer",
            type: "HEADER",
        },
        positionalConstraint: "CONTAINS",
        targetString: "badrefer1",
        textTransformation: "NONE",
    }],
});

Create a ByteMatchSet Resource

def ByteMatchSet(resource_name, opts=None, byte_match_tuples=None, name=None, __props__=None);
func NewByteMatchSet(ctx *Context, name string, args *ByteMatchSetArgs, opts ...ResourceOption) (*ByteMatchSet, error)
public ByteMatchSet(string name, ByteMatchSetArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ByteMatchSetArgs
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 ByteMatchSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ByteMatchSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ByteMatchSet Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ByteMatchSet resource accepts the following input properties:

ByteMatchTuples List<ByteMatchSetByteMatchTupleArgs>

Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below.

Name string

The name or description of the ByteMatchSet.

ByteMatchTuples []ByteMatchSetByteMatchTuple

Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below.

Name string

The name or description of the ByteMatchSet.

byteMatchTuples ByteMatchSetByteMatchTuple[]

Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below.

name string

The name or description of the ByteMatchSet.

byte_match_tuples List[ByteMatchSetByteMatchTuple]

Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below.

name str

The name or description of the ByteMatchSet.

Outputs

All input properties are implicitly available as output properties. Additionally, the ByteMatchSet resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ByteMatchSet Resource

Get an existing ByteMatchSet 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?: ByteMatchSetState, opts?: CustomResourceOptions): ByteMatchSet
static get(resource_name, id, opts=None, byte_match_tuples=None, name=None, __props__=None);
func GetByteMatchSet(ctx *Context, name string, id IDInput, state *ByteMatchSetState, opts ...ResourceOption) (*ByteMatchSet, error)
public static ByteMatchSet Get(string name, Input<string> id, ByteMatchSetState? 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:

ByteMatchTuples List<ByteMatchSetByteMatchTupleArgs>

Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below.

Name string

The name or description of the ByteMatchSet.

ByteMatchTuples []ByteMatchSetByteMatchTuple

Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below.

Name string

The name or description of the ByteMatchSet.

byteMatchTuples ByteMatchSetByteMatchTuple[]

Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below.

name string

The name or description of the ByteMatchSet.

byte_match_tuples List[ByteMatchSetByteMatchTuple]

Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below.

name str

The name or description of the ByteMatchSet.

Supporting Types

ByteMatchSetByteMatchTuple

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

FieldToMatch ByteMatchSetByteMatchTupleFieldToMatchArgs

Settings for the ByteMatchTuple. FieldToMatch documented below.

PositionalConstraint string

Within the portion of a web request that you want to search.

TextTransformation string

The formatting way for web request.

TargetString string

The value that you want AWS WAF to search for. The maximum length of the value is 50 bytes.

FieldToMatch ByteMatchSetByteMatchTupleFieldToMatch

Settings for the ByteMatchTuple. FieldToMatch documented below.

PositionalConstraint string

Within the portion of a web request that you want to search.

TextTransformation string

The formatting way for web request.

TargetString string

The value that you want AWS WAF to search for. The maximum length of the value is 50 bytes.

fieldToMatch ByteMatchSetByteMatchTupleFieldToMatch

Settings for the ByteMatchTuple. FieldToMatch documented below.

positionalConstraint string

Within the portion of a web request that you want to search.

textTransformation string

The formatting way for web request.

targetString string

The value that you want AWS WAF to search for. The maximum length of the value is 50 bytes.

fieldToMatch Dict[ByteMatchSetByteMatchTupleFieldToMatch]

Settings for the ByteMatchTuple. FieldToMatch documented below.

positionalConstraint str

Within the portion of a web request that you want to search.

textTransformation str

The formatting way for web request.

targetString str

The value that you want AWS WAF to search for. The maximum length of the value is 50 bytes.

ByteMatchSetByteMatchTupleFieldToMatch

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Type string

The part of the web request that you want AWS WAF to search for a specified string.

Data string

When the value of Type is HEADER, enter the name of the header that you want AWS WAF to search, for example, User-Agent or Referer. If the value of Type is any other value, omit Data.

Type string

The part of the web request that you want AWS WAF to search for a specified string.

Data string

When the value of Type is HEADER, enter the name of the header that you want AWS WAF to search, for example, User-Agent or Referer. If the value of Type is any other value, omit Data.

type string

The part of the web request that you want AWS WAF to search for a specified string.

data string

When the value of Type is HEADER, enter the name of the header that you want AWS WAF to search, for example, User-Agent or Referer. If the value of Type is any other value, omit Data.

type str

The part of the web request that you want AWS WAF to search for a specified string.

data str

When the value of Type is HEADER, enter the name of the header that you want AWS WAF to search, for example, User-Agent or Referer. If the value of Type is any other value, omit Data.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.