RegexMatchSet

Provides a WAF Regex Match Set Resource

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleRegexPatternSet = new Aws.Waf.RegexPatternSet("exampleRegexPatternSet", new Aws.Waf.RegexPatternSetArgs
        {
            RegexPatternStrings = 
            {
                "one",
                "two",
            },
        });
        var exampleRegexMatchSet = new Aws.Waf.RegexMatchSet("exampleRegexMatchSet", new Aws.Waf.RegexMatchSetArgs
        {
            RegexMatchTuples = 
            {
                new Aws.Waf.Inputs.RegexMatchSetRegexMatchTupleArgs
                {
                    FieldToMatch = new Aws.Waf.Inputs.RegexMatchSetRegexMatchTupleFieldToMatchArgs
                    {
                        Data = "User-Agent",
                        Type = "HEADER",
                    },
                    RegexPatternSetId = exampleRegexPatternSet.Id,
                    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 {
        exampleRegexPatternSet, err := waf.NewRegexPatternSet(ctx, "exampleRegexPatternSet", &waf.RegexPatternSetArgs{
            RegexPatternStrings: pulumi.StringArray{
                pulumi.String("one"),
                pulumi.String("two"),
            },
        })
        if err != nil {
            return err
        }
        _, err = waf.NewRegexMatchSet(ctx, "exampleRegexMatchSet", &waf.RegexMatchSetArgs{
            RegexMatchTuples: waf.RegexMatchSetRegexMatchTupleArray{
                &waf.RegexMatchSetRegexMatchTupleArgs{
                    FieldToMatch: &waf.RegexMatchSetRegexMatchTupleFieldToMatchArgs{
                        Data: pulumi.String("User-Agent"),
                        Type: pulumi.String("HEADER"),
                    },
                    RegexPatternSetId:  exampleRegexPatternSet.ID(),
                    TextTransformation: pulumi.String("NONE"),
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example_regex_pattern_set = aws.waf.RegexPatternSet("exampleRegexPatternSet", regex_pattern_strings=[
    "one",
    "two",
])
example_regex_match_set = aws.waf.RegexMatchSet("exampleRegexMatchSet", regex_match_tuples=[{
    "fieldToMatch": {
        "data": "User-Agent",
        "type": "HEADER",
    },
    "regexPatternSetId": example_regex_pattern_set.id,
    "textTransformation": "NONE",
}])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleRegexPatternSet = new aws.waf.RegexPatternSet("example", {
    regexPatternStrings: [
        "one",
        "two",
    ],
});
const exampleRegexMatchSet = new aws.waf.RegexMatchSet("example", {
    regexMatchTuples: [{
        fieldToMatch: {
            data: "User-Agent",
            type: "HEADER",
        },
        regexPatternSetId: exampleRegexPatternSet.id,
        textTransformation: "NONE",
    }],
});

Create a RegexMatchSet Resource

def RegexMatchSet(resource_name, opts=None, name=None, regex_match_tuples=None, __props__=None);
public RegexMatchSet(string name, RegexMatchSetArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RegexMatchSetArgs
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 RegexMatchSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RegexMatchSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RegexMatchSet Resource Properties

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

Inputs

The RegexMatchSet resource accepts the following input properties:

Name string

The name or description of the Regex Match Set.

RegexMatchTuples List<RegexMatchSetRegexMatchTupleArgs>

The regular expression pattern 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. See below.

Name string

The name or description of the Regex Match Set.

RegexMatchTuples []RegexMatchSetRegexMatchTuple

The regular expression pattern 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. See below.

name string

The name or description of the Regex Match Set.

regexMatchTuples RegexMatchSetRegexMatchTuple[]

The regular expression pattern 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. See below.

name str

The name or description of the Regex Match Set.

regex_match_tuples List[RegexMatchSetRegexMatchTuple]

The regular expression pattern 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. See below.

Outputs

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

Arn string

Amazon Resource Name (ARN)

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

Amazon Resource Name (ARN)

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

Amazon Resource Name (ARN)

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

Amazon Resource Name (ARN)

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

Look up an Existing RegexMatchSet Resource

Get an existing RegexMatchSet 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?: RegexMatchSetState, opts?: CustomResourceOptions): RegexMatchSet
static get(resource_name, id, opts=None, arn=None, name=None, regex_match_tuples=None, __props__=None);
func GetRegexMatchSet(ctx *Context, name string, id IDInput, state *RegexMatchSetState, opts ...ResourceOption) (*RegexMatchSet, error)
public static RegexMatchSet Get(string name, Input<string> id, RegexMatchSetState? 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 Regex Match Set.

RegexMatchTuples List<RegexMatchSetRegexMatchTupleArgs>

The regular expression pattern 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. See below.

Arn string

Amazon Resource Name (ARN)

Name string

The name or description of the Regex Match Set.

RegexMatchTuples []RegexMatchSetRegexMatchTuple

The regular expression pattern 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. See below.

arn string

Amazon Resource Name (ARN)

name string

The name or description of the Regex Match Set.

regexMatchTuples RegexMatchSetRegexMatchTuple[]

The regular expression pattern 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. See below.

arn str

Amazon Resource Name (ARN)

name str

The name or description of the Regex Match Set.

regex_match_tuples List[RegexMatchSetRegexMatchTuple]

The regular expression pattern 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. See below.

Supporting Types

RegexMatchSetRegexMatchTuple

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 RegexMatchSetRegexMatchTupleFieldToMatchArgs

The part of a web request that you want to search, such as a specified header or a query string.

RegexPatternSetId string

The ID of a WAF Regex Pattern Set.

TextTransformation string

Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. e.g. CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

FieldToMatch RegexMatchSetRegexMatchTupleFieldToMatch

The part of a web request that you want to search, such as a specified header or a query string.

RegexPatternSetId string

The ID of a WAF Regex Pattern Set.

TextTransformation string

Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. e.g. CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

fieldToMatch RegexMatchSetRegexMatchTupleFieldToMatch

The part of a web request that you want to search, such as a specified header or a query string.

regexPatternSetId string

The ID of a WAF Regex Pattern Set.

textTransformation string

Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. e.g. CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

fieldToMatch Dict[RegexMatchSetRegexMatchTupleFieldToMatch]

The part of a web request that you want to search, such as a specified header or a query string.

regexPatternSetId str

The ID of a WAF Regex Pattern Set.

textTransformation str

Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. e.g. CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

RegexMatchSetRegexMatchTupleFieldToMatch

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. e.g. HEADER, METHOD or BODY. See docs for all supported values.

Data string

When type is HEADER, enter the name of the header that you want to search, e.g. User-Agent or Referer. If type 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 or BODY. See docs for all supported values.

Data string

When type is HEADER, enter the name of the header that you want to search, e.g. User-Agent or Referer. If type 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 or BODY. See docs for all supported values.

data string

When type is HEADER, enter the name of the header that you want to search, e.g. User-Agent or Referer. If type 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 or BODY. See docs for all supported values.

data str

When type is HEADER, enter the name of the header that you want to search, e.g. User-Agent or Referer. If type is 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 aws Terraform Provider.