aws-cdk-lib.aws_waf.CfnWebACLProps

interface CfnWebACLProps

LanguageType name
.NETAmazon.CDK.AWS.WAF.CfnWebACLProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awswaf#CfnWebACLProps
Javasoftware.amazon.awscdk.services.waf.CfnWebACLProps
Pythonaws_cdk.aws_waf.CfnWebACLProps
TypeScript aws-cdk-lib » aws_waf » CfnWebACLProps

Properties for defining a CfnWebACL.

Example

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

  // the properties below are optional
  rules: [{
    priority: 123,
    ruleId: 'ruleId',

    // the properties below are optional
    action: {
      type: 'type',
    },
  }],
};

Properties

NameTypeDescription
defaultActionIResolvable | WafActionPropertyThe action to perform if none of the Rules contained in the WebACL match.
metricNamestringThe name of the metrics for this WebACL .
namestringA friendly name or description of the WebACL .
rules?IResolvable | IResolvable | ActivatedRuleProperty[]An array that contains the action for each Rule in a WebACL , the priority of the Rule , and the ID of the Rule .

defaultAction

Type: IResolvable | WafActionProperty

The action to perform if none of the Rules contained in the WebACL match.

The action is specified by the WafAction object.


metricName

Type: string

The name of 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 .


name

Type: string

A friendly name or description of the WebACL .

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


rules?

Type: IResolvable | IResolvable | ActivatedRuleProperty[] (optional)

An array that contains the action for each Rule in a WebACL , the priority of the Rule , and the ID of the Rule .