RegexPatternSet

Provides an AWS WAFv2 Regex Pattern Set Resource

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.WafV2.RegexPatternSet("example", new Aws.WafV2.RegexPatternSetArgs
        {
            Description = "Example regex pattern set",
            RegularExpressions = 
            {
                new Aws.WafV2.Inputs.RegexPatternSetRegularExpressionArgs
                {
                    RegexString = "one",
                },
                new Aws.WafV2.Inputs.RegexPatternSetRegularExpressionArgs
                {
                    RegexString = "two",
                },
            },
            Scope = "REGIONAL",
            Tags = 
            {
                { "Tag1", "Value1" },
                { "Tag2", "Value2" },
            },
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := wafv2.NewRegexPatternSet(ctx, "example", &wafv2.RegexPatternSetArgs{
            Description: pulumi.String("Example regex pattern set"),
            RegularExpressions: wafv2.RegexPatternSetRegularExpressionArray{
                &wafv2.RegexPatternSetRegularExpressionArgs{
                    RegexString: pulumi.String("one"),
                },
                &wafv2.RegexPatternSetRegularExpressionArgs{
                    RegexString: pulumi.String("two"),
                },
            },
            Scope: pulumi.String("REGIONAL"),
            Tags: pulumi.StringMap{
                "Tag1": pulumi.String("Value1"),
                "Tag2": pulumi.String("Value2"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.wafv2.RegexPatternSet("example",
    description="Example regex pattern set",
    regular_expressions=[
        {
            "regexString": "one",
        },
        {
            "regexString": "two",
        },
    ],
    scope="REGIONAL",
    tags={
        "Tag1": "Value1",
        "Tag2": "Value2",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.wafv2.RegexPatternSet("example", {
    description: "Example regex pattern set",
    regularExpressions: [
        {
            regexString: "one",
        },
        {
            regexString: "two",
        },
    ],
    scope: "REGIONAL",
    tags: {
        Tag1: "Value1",
        Tag2: "Value2",
    },
});

Create a RegexPatternSet Resource

def RegexPatternSet(resource_name, opts=None, description=None, name=None, regular_expressions=None, scope=None, tags=None, __props__=None);
name string
The unique name of the resource.
args RegexPatternSetArgs
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 RegexPatternSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RegexPatternSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RegexPatternSet Resource Properties

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

Inputs

The RegexPatternSet resource accepts the following input properties:

Scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

Description string

A friendly description of the regular expression pattern set.

Name string

A friendly name of the regular expression pattern set.

RegularExpressions List<RegexPatternSetRegularExpressionArgs>

One or more blocks of regular expression patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t. See Regular Expression below for details.

Tags Dictionary<string, string>

An array of key:value pairs to associate with the resource.

Scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

Description string

A friendly description of the regular expression pattern set.

Name string

A friendly name of the regular expression pattern set.

RegularExpressions []RegexPatternSetRegularExpression

One or more blocks of regular expression patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t. See Regular Expression below for details.

Tags map[string]string

An array of key:value pairs to associate with the resource.

scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

description string

A friendly description of the regular expression pattern set.

name string

A friendly name of the regular expression pattern set.

regularExpressions RegexPatternSetRegularExpression[]

One or more blocks of regular expression patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t. See Regular Expression below for details.

tags {[key: string]: string}

An array of key:value pairs to associate with the resource.

scope str

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

description str

A friendly description of the regular expression pattern set.

name str

A friendly name of the regular expression pattern set.

regular_expressions List[RegexPatternSetRegularExpression]

One or more blocks of regular expression patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t. See Regular Expression below for details.

tags Dict[str, str]

An array of key:value pairs to associate with the resource.

Outputs

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

Arn string

The Amazon Resource Name (ARN) that identifies the cluster.

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

The Amazon Resource Name (ARN) that identifies the cluster.

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

The Amazon Resource Name (ARN) that identifies the cluster.

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

The Amazon Resource Name (ARN) that identifies the cluster.

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

Look up an Existing RegexPatternSet Resource

Get an existing RegexPatternSet 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?: RegexPatternSetState, opts?: CustomResourceOptions): RegexPatternSet
static get(resource_name, id, opts=None, arn=None, description=None, lock_token=None, name=None, regular_expressions=None, scope=None, tags=None, __props__=None);
func GetRegexPatternSet(ctx *Context, name string, id IDInput, state *RegexPatternSetState, opts ...ResourceOption) (*RegexPatternSet, error)
public static RegexPatternSet Get(string name, Input<string> id, RegexPatternSetState? 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

The Amazon Resource Name (ARN) that identifies the cluster.

Description string

A friendly description of the regular expression pattern set.

LockToken string
Name string

A friendly name of the regular expression pattern set.

RegularExpressions List<RegexPatternSetRegularExpressionArgs>

One or more blocks of regular expression patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t. See Regular Expression below for details.

Scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

Tags Dictionary<string, string>

An array of key:value pairs to associate with the resource.

Arn string

The Amazon Resource Name (ARN) that identifies the cluster.

Description string

A friendly description of the regular expression pattern set.

LockToken string
Name string

A friendly name of the regular expression pattern set.

RegularExpressions []RegexPatternSetRegularExpression

One or more blocks of regular expression patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t. See Regular Expression below for details.

Scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

Tags map[string]string

An array of key:value pairs to associate with the resource.

arn string

The Amazon Resource Name (ARN) that identifies the cluster.

description string

A friendly description of the regular expression pattern set.

lockToken string
name string

A friendly name of the regular expression pattern set.

regularExpressions RegexPatternSetRegularExpression[]

One or more blocks of regular expression patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t. See Regular Expression below for details.

scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

tags {[key: string]: string}

An array of key:value pairs to associate with the resource.

arn str

The Amazon Resource Name (ARN) that identifies the cluster.

description str

A friendly description of the regular expression pattern set.

lock_token str
name str

A friendly name of the regular expression pattern set.

regular_expressions List[RegexPatternSetRegularExpression]

One or more blocks of regular expression patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t. See Regular Expression below for details.

scope str

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

tags Dict[str, str]

An array of key:value pairs to associate with the resource.

Supporting Types

RegexPatternSetRegularExpression

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.

RegexString string

The string representing the regular expression, see the AWS WAF documentation for more information.

RegexString string

The string representing the regular expression, see the AWS WAF documentation for more information.

regexString string

The string representing the regular expression, see the AWS WAF documentation for more information.

regexString str

The string representing the regular expression, see the AWS WAF documentation for more information.

Package Details

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