CfnWebACLProps

class aws_cdk.aws_waf.CfnWebACLProps(*, default_action, metric_name, name, rules=None)

Bases: object

Properties for defining a CfnWebACL.

Parameters:
  • default_action (Union[IResolvable, WafActionProperty, Dict[str, Any]]) – The action to perform if none of the Rules contained in the WebACL match. The action is specified by the WafAction object.

  • metric_name (str) – 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 (str) – A friendly name or description of the WebACL . You can’t change the name of a WebACL after you create it.

  • rules (Union[IResolvable, Sequence[Union[IResolvable, ActivatedRuleProperty, Dict[str, Any]]], None]) – An array that contains the action for each Rule in a WebACL , the priority of the Rule , and the ID of the Rule .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-webacl.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_waf as waf

cfn_web_aCLProps = waf.CfnWebACLProps(
    default_action=waf.CfnWebACL.WafActionProperty(
        type="type"
    ),
    metric_name="metricName",
    name="name",

    # the properties below are optional
    rules=[waf.CfnWebACL.ActivatedRuleProperty(
        priority=123,
        rule_id="ruleId",

        # the properties below are optional
        action=waf.CfnWebACL.WafActionProperty(
            type="type"
        )
    )]
)

Attributes

default_action

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

The action is specified by the WafAction object.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-webacl.html#cfn-waf-webacl-defaultaction

metric_name

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-webacl.html#cfn-waf-webacl-metricname

name

A friendly name or description of the WebACL .

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-webacl.html#cfn-waf-webacl-name

rules

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-webacl.html#cfn-waf-webacl-rules