AWS::WAFRegional::WebACL> This is *AWS WAF Classic* documentation. For more information, see [AWS WAF Classic](https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) in the developer guide. > > *For the latest version of AWS WAF* , use the AWS WAF V2 API and see the [AWS WAF Developer Guide](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) . With the latest version, AWS WAF has a single set of endpoints for regional and global use. Contains the `Rules` that identify the requests that you want to allow, block, or count. In a `WebACL` , you also specify a default action ( `ALLOW` or `BLOCK` ), and the action for each `Rule` that you add to a `WebACL` , for example, block requests from specified IP addresses or block requests from specified referrers. If you add more than one `Rule` to a `WebACL` , a request needs to match only one of the specifications to be allowed, blocked, or counted. To identify the requests that you want AWS WAF to filter, you associate the `WebACL` with an API Gateway API or an Application Load Balancer.
import { CfnWebACL } from 'aws-cdk-lib/aws-wafregional';Or use the module namespace:
import * as wafregional from 'aws-cdk-lib/aws-wafregional';
// wafregional.CfnWebACLConfiguration passed to the constructor as CfnWebACLProps.
defaultActionRequiredIResolvable | ActionPropertyThe action to perform if none of the `Rules` contained in the `WebACL` match. The action is specified by the `WafAction` object.
metricNameRequiredstringA name for the metrics for this `WebACL` . The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change `MetricName` after you create the `WebACL` .
nameRequiredstringA friendly name or description of the `WebACL` . You can't change the name of a `WebACL` after you create it.
rulesOptionalIResolvable | IResolvable | RuleProperty[]An array that contains the action for each `Rule` in a `WebACL` , the priority of the `Rule` , and the ID of the `Rule` .
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-wafregionalAWS::WAFRegional::WebACL