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
new RegexPatternSet(name: string, args: RegexPatternSetArgs, opts?: CustomResourceOptions);def RegexPatternSet(resource_name, opts=None, description=None, name=None, regular_expressions=None, scope=None, tags=None, __props__=None);func NewRegexPatternSet(ctx *Context, name string, args RegexPatternSetArgs, opts ...ResourceOption) (*RegexPatternSet, error)public RegexPatternSet(string name, RegexPatternSetArgs args, CustomResourceOptions? opts = null)- 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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the regionus-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.
- Regular
Expressions List<RegexPattern Set Regular Expression Args> 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.- 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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the regionus-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.
- Regular
Expressions []RegexPattern Set Regular Expression 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.- 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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the regionus-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.
- regular
Expressions RegexPattern Set Regular Expression[] 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.- {[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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the regionus-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[RegexPattern Set Regular Expression] 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.- 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:
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): RegexPatternSetstatic 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.
- Lock
Token string - Name string
A friendly name of the regular expression pattern set.
- Regular
Expressions List<RegexPattern Set Regular Expression Args> 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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the regionus-east-1(N. Virginia) on the AWS provider.- 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.
- Lock
Token string - Name string
A friendly name of the regular expression pattern set.
- Regular
Expressions []RegexPattern Set Regular Expression 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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the regionus-east-1(N. Virginia) on the AWS provider.- 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.
- lock
Token string - name string
A friendly name of the regular expression pattern set.
- regular
Expressions RegexPattern Set Regular Expression[] 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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the regionus-east-1(N. Virginia) on the AWS provider.- {[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[RegexPattern Set Regular Expression] 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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the regionus-east-1(N. Virginia) on the AWS provider.- Dict[str, str]
An array of key:value pairs to associate with the resource.
Supporting Types
RegexPatternSetRegularExpression
- Regex
String string The string representing the regular expression, see the AWS WAF documentation for more information.
- Regex
String string The string representing the regular expression, see the AWS WAF documentation for more information.
- regex
String string The string representing the regular expression, see the AWS WAF documentation for more information.
- regex
String 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
awsTerraform Provider.