AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::WAFRegional::RegexPatternSet

CfnRegexPatternSet

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 CloudFormation template. To add the regex pattern sets created through CloudFormation to a RegexMatchSet, use the AWS WAF console, API, or command line interface (CLI). For more information, see [UpdateRegexMatchSet](https://docs.aws.amazon.com/waf/latest/APIReference/API_regional_UpdateRegexMatchSet.html) .

Import

import { CfnRegexPatternSet } from 'aws-cdk-lib/aws-wafregional';

Or use the module namespace:

import * as wafregional from 'aws-cdk-lib/aws-wafregional';
// wafregional.CfnRegexPatternSet

Properties

Configuration passed to the constructor as CfnRegexPatternSetProps.

nameRequired
string

A friendly name or description of the `RegexPatternSet` . You can't change `Name` after you create a `RegexPatternSet` .

regexPatternStringsRequired
string[]

Specifies the regular expression (regex) patterns that you want AWS WAF to search for, such as `B[a@]dB[o0]t` .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-wafregional
CFN TypeAWS::WAFRegional::RegexPatternSet
Properties2

External Links