CfnRuleProps

class aws_cdk.aws_wafregional.CfnRuleProps(*, metric_name, name, predicates=None)

Bases: object

Properties for defining a CfnRule.

Parameters:
  • metric_name (str) – A name for the metrics for this Rule . 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 Rule .

  • name (str) – The friendly name or description for the Rule . You can’t change the name of a Rule after you create it.

  • predicates (Union[IResolvable, Sequence[Union[IResolvable, PredicateProperty, Dict[str, Any]]], None]) – The Predicates object contains one Predicate element for each ByteMatchSet , IPSet , or SqlInjectionMatchSet object that you want to include in a Rule .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-rule.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_wafregional as wafregional

cfn_rule_props = wafregional.CfnRuleProps(
    metric_name="metricName",
    name="name",

    # the properties below are optional
    predicates=[wafregional.CfnRule.PredicateProperty(
        data_id="dataId",
        negated=False,
        type="type"
    )]
)

Attributes

metric_name

A name for the metrics for this Rule .

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 Rule .

See:

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

name

The friendly name or description for the Rule .

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

See:

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

predicates

The Predicates object contains one Predicate element for each ByteMatchSet , IPSet , or SqlInjectionMatchSet object that you want to include in a Rule .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-rule.html#cfn-wafregional-rule-predicates