1. Packages
  2. AWS Classic
  3. API Docs
  4. wafregional
  5. RegexPatternSet

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.wafregional.RegexPatternSet

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a WAF Regional Regex Pattern Set Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.wafregional.RegexPatternSet("example", {
        name: "example",
        regexPatternStrings: [
            "one",
            "two",
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.wafregional.RegexPatternSet("example",
        name="example",
        regex_pattern_strings=[
            "one",
            "two",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/wafregional"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := wafregional.NewRegexPatternSet(ctx, "example", &wafregional.RegexPatternSetArgs{
    			Name: pulumi.String("example"),
    			RegexPatternStrings: pulumi.StringArray{
    				pulumi.String("one"),
    				pulumi.String("two"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.WafRegional.RegexPatternSet("example", new()
        {
            Name = "example",
            RegexPatternStrings = new[]
            {
                "one",
                "two",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.wafregional.RegexPatternSet;
    import com.pulumi.aws.wafregional.RegexPatternSetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new RegexPatternSet("example", RegexPatternSetArgs.builder()
                .name("example")
                .regexPatternStrings(            
                    "one",
                    "two")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:wafregional:RegexPatternSet
        properties:
          name: example
          regexPatternStrings:
            - one
            - two
    

    Create RegexPatternSet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RegexPatternSet(name: string, args?: RegexPatternSetArgs, opts?: CustomResourceOptions);
    @overload
    def RegexPatternSet(resource_name: str,
                        args: Optional[RegexPatternSetArgs] = None,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def RegexPatternSet(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        name: Optional[str] = None,
                        regex_pattern_strings: Optional[Sequence[str]] = None)
    func NewRegexPatternSet(ctx *Context, name string, args *RegexPatternSetArgs, opts ...ResourceOption) (*RegexPatternSet, error)
    public RegexPatternSet(string name, RegexPatternSetArgs? args = null, CustomResourceOptions? opts = null)
    public RegexPatternSet(String name, RegexPatternSetArgs args)
    public RegexPatternSet(String name, RegexPatternSetArgs args, CustomResourceOptions options)
    
    type: aws:wafregional:RegexPatternSet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    args RegexPatternSetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args RegexPatternSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsRegexPatternSetResource = new Aws.WafRegional.RegexPatternSet("awsRegexPatternSetResource", new()
    {
        Name = "string",
        RegexPatternStrings = new[]
        {
            "string",
        },
    });
    
    example, err := wafregional.NewRegexPatternSet(ctx, "awsRegexPatternSetResource", &wafregional.RegexPatternSetArgs{
    	Name: pulumi.String("string"),
    	RegexPatternStrings: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var awsRegexPatternSetResource = new RegexPatternSet("awsRegexPatternSetResource", RegexPatternSetArgs.builder()
        .name("string")
        .regexPatternStrings("string")
        .build());
    
    aws_regex_pattern_set_resource = aws.wafregional.RegexPatternSet("awsRegexPatternSetResource",
        name="string",
        regex_pattern_strings=["string"])
    
    const awsRegexPatternSetResource = new aws.wafregional.RegexPatternSet("awsRegexPatternSetResource", {
        name: "string",
        regexPatternStrings: ["string"],
    });
    
    type: aws:wafregional:RegexPatternSet
    properties:
        name: string
        regexPatternStrings:
            - string
    

    RegexPatternSet Resource Properties

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

    Inputs

    The RegexPatternSet resource accepts the following input properties:

    Name string
    The name or description of the Regex Pattern Set.
    RegexPatternStrings List<string>
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    Name string
    The name or description of the Regex Pattern Set.
    RegexPatternStrings []string
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    name String
    The name or description of the Regex Pattern Set.
    regexPatternStrings List<String>
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    name string
    The name or description of the Regex Pattern Set.
    regexPatternStrings string[]
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    name str
    The name or description of the Regex Pattern Set.
    regex_pattern_strings Sequence[str]
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    name String
    The name or description of the Regex Pattern Set.
    regexPatternStrings List<String>
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RegexPatternSet 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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            regex_pattern_strings: Optional[Sequence[str]] = None) -> RegexPatternSet
    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)
    public static RegexPatternSet get(String name, Output<String> id, RegexPatternSetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    Name string
    The name or description of the Regex Pattern Set.
    RegexPatternStrings List<string>
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    Name string
    The name or description of the Regex Pattern Set.
    RegexPatternStrings []string
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    name String
    The name or description of the Regex Pattern Set.
    regexPatternStrings List<String>
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    name string
    The name or description of the Regex Pattern Set.
    regexPatternStrings string[]
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    name str
    The name or description of the Regex Pattern Set.
    regex_pattern_strings Sequence[str]
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.
    name String
    The name or description of the Regex Pattern Set.
    regexPatternStrings List<String>
    A list of regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t.

    Import

    Using pulumi import, import WAF Regional Regex Pattern Set using the id. For example:

    $ pulumi import aws:wafregional/regexPatternSet:RegexPatternSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi