AWS::WAFRegional::RegexPatternSet
The RegexPatternSet
specifies the regular expression (regex) pattern that you want AWS WAF to search for, such as B[a@]dB[o0]t
. You can then configure AWS WAF to reject those requests.
Note that you can only create regex pattern sets using a AWS CloudFormation template. To add the regex pattern sets created through AWS CloudFormation to a RegexMatchSet, use the AWS WAF console, API, or command line interface (CLI). For more information, see UpdateRegexMatchSet.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::WAFRegional::RegexPatternSet", "Properties" : { "Name" :
String
, "RegexPatternStrings" :[ String, ... ]
} }
YAML
Type: AWS::WAFRegional::RegexPatternSet Properties: Name:
String
RegexPatternStrings:- String
Properties
Name
-
A friendly name or description of the AWS::WAFRegional::RegexPatternSet. You can't change
Name
after you create aRegexPatternSet
.Required: Yes
Type: String
Pattern:
.*\S.*
Minimum:
1
Maximum:
128
Update requires: Replacement
RegexPatternStrings
-
Specifies the regular expression (regex) patterns that you want AWS WAF to search for, such as
B[a@]dB[o0]t
.Required: Yes
Type: Array of String
Maximum:
10
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the resource physical ID, such as 1234a1a-a1b1-12a1-abcd-a123b123456.
For more information about using the Ref
function, see Ref
.