AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::WAFv2::RegexPatternSet

CfnRegexPatternSet

> This is the latest version of *AWS WAF* , named AWS WAF V2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the [AWS WAF developer guide](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) . Use an `RegexPatternSet` to have AWS WAF inspect a web request component for a specific set of regular expression patterns. You use a regex pattern set by providing its Amazon Resource Name (ARN) to the rule statement `RegexPatternSetReferenceStatement` , when you add a rule to a rule group or web ACL.

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as CfnRegexPatternSetProps.

regularExpressionListRequired
string[]

The regular expression patterns in the set.

scopeRequired
string

Specifies whether this is for an Amazon CloudFront distribution or for a regional application. For an AWS Amplify application, use `CLOUDFRONT` . A regional application can be an Application Load Balancer (ALB), an REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` . > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .

descriptionOptional
string

A description of the set that helps with identification.

nameOptional
string

The name of the set. You cannot change the name after you create the set.

tagsOptional
CfnTag[]

Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource. > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.

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