RegexMatchSet
Provides a WAF Regional Regex Match Set Resource
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var exampleRegexPatternSet = new Aws.WafRegional.RegexPatternSet("exampleRegexPatternSet", new Aws.WafRegional.RegexPatternSetArgs
{
RegexPatternStrings =
{
"one",
"two",
},
});
var exampleRegexMatchSet = new Aws.WafRegional.RegexMatchSet("exampleRegexMatchSet", new Aws.WafRegional.RegexMatchSetArgs
{
RegexMatchTuples =
{
new Aws.WafRegional.Inputs.RegexMatchSetRegexMatchTupleArgs
{
FieldToMatch = new Aws.WafRegional.Inputs.RegexMatchSetRegexMatchTupleFieldToMatchArgs
{
Data = "User-Agent",
Type = "HEADER",
},
RegexPatternSetId = exampleRegexPatternSet.Id,
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 {
exampleRegexPatternSet, err := wafregional.NewRegexPatternSet(ctx, "exampleRegexPatternSet", &wafregional.RegexPatternSetArgs{
RegexPatternStrings: pulumi.StringArray{
pulumi.String("one"),
pulumi.String("two"),
},
})
if err != nil {
return err
}
_, err = wafregional.NewRegexMatchSet(ctx, "exampleRegexMatchSet", &wafregional.RegexMatchSetArgs{
RegexMatchTuples: wafregional.RegexMatchSetRegexMatchTupleArray{
&wafregional.RegexMatchSetRegexMatchTupleArgs{
FieldToMatch: &wafregional.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.wafregional.RegexPatternSet("exampleRegexPatternSet", regex_pattern_strings=[
"one",
"two",
])
example_regex_match_set = aws.wafregional.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.wafregional.RegexPatternSet("example", {
regexPatternStrings: [
"one",
"two",
],
});
const exampleRegexMatchSet = new aws.wafregional.RegexMatchSet("example", {
regexMatchTuples: [{
fieldToMatch: {
data: "User-Agent",
type: "HEADER",
},
regexPatternSetId: exampleRegexPatternSet.id,
textTransformation: "NONE",
}],
});Create a RegexMatchSet Resource
new RegexMatchSet(name: string, args?: RegexMatchSetArgs, opts?: CustomResourceOptions);def RegexMatchSet(resource_name, opts=None, name=None, regex_match_tuples=None, __props__=None);func NewRegexMatchSet(ctx *Context, name string, args *RegexMatchSetArgs, opts ...ResourceOption) (*RegexMatchSet, error)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.
- Regex
Match List<RegexTuples Match Set Regex Match Tuple Args> 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.
- Regex
Match []RegexTuples Match Set Regex Match Tuple 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.
- regex
Match RegexTuples Match Set Regex Match Tuple[] 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_ List[Regextuples Match Set Regex Match Tuple] 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:
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): RegexMatchSetstatic get(resource_name, id, opts=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:
- Name string
The name or description of the Regex Match Set.
- Regex
Match List<RegexTuples Match Set Regex Match Tuple Args> 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.
- Regex
Match []RegexTuples Match Set Regex Match Tuple 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.
- regex
Match RegexTuples Match Set Regex Match Tuple[] 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_ List[Regextuples Match Set Regex Match Tuple] 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
- Field
To RegexMatch Match Set Regex Match Tuple Field To Match Args The part of a web request that you want to search, such as a specified header or a query string.
- Regex
Pattern stringSet Id The ID of a
WAF Regex Pattern Set.- Text
Transformation 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_DECODEorNONE. See docs for all supported values.
- Field
To RegexMatch Match Set Regex Match Tuple Field To Match The part of a web request that you want to search, such as a specified header or a query string.
- Regex
Pattern stringSet Id The ID of a
WAF Regex Pattern Set.- Text
Transformation 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_DECODEorNONE. See docs for all supported values.
- field
To RegexMatch Match Set Regex Match Tuple Field To Match The part of a web request that you want to search, such as a specified header or a query string.
- regex
Pattern stringSet Id The ID of a
WAF Regex Pattern Set.- text
Transformation 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_DECODEorNONE. See docs for all supported values.
- field
To Dict[RegexMatch Match Set Regex Match Tuple Field To Match] The part of a web request that you want to search, such as a specified header or a query string.
- regex
Pattern strSet Id The ID of a
WAF Regex Pattern Set.- text
Transformation 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_DECODEorNONE. See docs for all supported values.
RegexMatchSetRegexMatchTupleFieldToMatch
- Type string
The part of the web request that you want AWS WAF to search for a specified string. e.g.
HEADER,METHODorBODY. See docs for all supported values.- Data string
When
typeisHEADER, enter the name of the header that you want to search, e.g.User-AgentorReferer. Iftypeis 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,METHODorBODY. See docs for all supported values.- Data string
When
typeisHEADER, enter the name of the header that you want to search, e.g.User-AgentorReferer. Iftypeis 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,METHODorBODY. See docs for all supported values.- data string
When
typeisHEADER, enter the name of the header that you want to search, e.g.User-AgentorReferer. Iftypeis 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,METHODorBODY. See docs for all supported values.- data str
When
typeisHEADER, enter the name of the header that you want to search, e.g.User-AgentorReferer. Iftypeis 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
awsTerraform Provider.