RegexPatternSetReferenceStatementProperty Struct
A rule statement used to search web request components for matches with regular expressions.
To use this, create a RegexPatternSet that specifies the expressions that you want to detect, then use that set in this statement. A web request matches the pattern set rule statement if the request component matches any of the patterns in the set.
Each regex pattern set rule statement references a regex pattern set. You create and maintain the set independent of your rules. This allows you to use the single set in multiple rules. When you update the referenced set, AWS WAF automatically updates all rules that reference it.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wafv2 as wafv2 } from 'aws-cdk-lib';
declare const all: any;
declare const allQueryArguments: any;
declare const method: any;
declare const queryString: any;
declare const singleHeader: any;
declare const singleQueryArgument: any;
declare const uriPath: any;
const regexPatternSetReferenceStatementProperty: wafv2.CfnWebACL.RegexPatternSetReferenceStatementProperty = {
arn: 'arn',
fieldToMatch: {
allQueryArguments: allQueryArguments,
body: {
oversizeHandling: 'oversizeHandling',
},
cookies: {
matchPattern: {
all: all,
excludedCookies: ['excludedCookies'],
includedCookies: ['includedCookies'],
},
matchScope: 'matchScope',
oversizeHandling: 'oversizeHandling',
},
headerOrder: {
oversizeHandling: 'oversizeHandling',
},
headers: {
matchPattern: {
all: all,
excludedHeaders: ['excludedHeaders'],
includedHeaders: ['includedHeaders'],
},
matchScope: 'matchScope',
oversizeHandling: 'oversizeHandling',
},
ja3Fingerprint: {
fallbackBehavior: 'fallbackBehavior',
},
ja4Fingerprint: {
fallbackBehavior: 'fallbackBehavior',
},
jsonBody: {
matchPattern: {
all: all,
includedPaths: ['includedPaths'],
},
matchScope: 'matchScope',
// the properties below are optional
invalidFallbackBehavior: 'invalidFallbackBehavior',
oversizeHandling: 'oversizeHandling',
},
method: method,
queryString: queryString,
singleHeader: singleHeader,
singleQueryArgument: singleQueryArgument,
uriFragment: {
fallbackBehavior: 'fallbackBehavior',
},
uriPath: uriPath,
},
textTransformations: [{
priority: 123,
type: 'type',
}],
// the properties below are optional
preParseTextTransformations: [{
priority: 123,
type: 'type',
}],
};
Properties
fieldToMatchIResolvable | CfnWebACL.FieldToMatchPropertyfield_to_matchtyping.Union[IResolvable, FieldToMatchProperty]fieldToMatchIResolvableFieldToMatchIResolvableFieldToMatchinterface{}required#preParseTextTransformationsoptionalIResolvable | IResolvable | CfnWebACL.PreParseTextTransformationProperty[]pre_parse_text_transformationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PreParseTextTransformationProperty]]]preParseTextTransformationsoptionalIResolvablePreParseTextTransformationsoptionalIResolvablePreParseTextTransformationsoptionalinterface{}#textTransformationsIResolvable | IResolvable | CfnWebACL.TextTransformationProperty[]text_transformationstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TextTransformationProperty]]]textTransformationsIResolvableTextTransformationsIResolvableTextTransformationsinterface{}required#notes
If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by FieldToMatch , starting from the lowest priority setting, before inspecting the content for a match.