Skip to content
v2.275.0

CfnWebACLProps Struct ​

Properties for defining a CfnWebACL.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wafregional as wafregional } from 'aws-cdk-lib';
const cfnWebACLProps: wafregional.CfnWebACLProps = {
  defaultAction: {
    type: 'type',
  },
  metricName: 'metricName',
  name: 'name',

  // the properties below are optional
  rules: [{
    action: {
      type: 'type',
    },
    priority: 123,
    ruleId: 'ruleId',
  }],
};

Properties ​

defaultActionIResolvable | CfnWebACL.ActionPropertydefault_actiontyping.Union[IResolvable, ActionProperty]defaultActionIResolvableDefaultActionIResolvableDefaultActioninterface{}required#
The action to perform if none of the `Rules` contained in the `WebACL` match.

The action is specified by the WafAction object.

metricNamestringmetric_namestrmetricNameStringMetricNamestringMetricName*stringrequired#
A name for the metrics for this `WebACL` .
notes

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 .

namestringnamestrnameStringNamestringName*stringrequired#
A friendly name or description of the `WebACL` .

You can't change the name of a WebACL after you create it.

rulesoptionalIResolvable | IResolvable | CfnWebACL.RuleProperty[]rulesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, RuleProperty]]]rulesoptionalIResolvableRulesoptionalIResolvableRulesoptionalinterface{}#
An array that contains the action for each `Rule` in a `WebACL` , the priority of the `Rule` , and the ID of the `Rule` .