CfnRateBasedRuleProps

class aws_cdk.aws_wafregional.CfnRateBasedRuleProps(*, metric_name, name, rate_key, rate_limit, match_predicates=None)

Bases: object

Properties for defining a CfnRateBasedRule.

Parameters:
  • metric_name (str) – A name for the metrics for a RateBasedRule . 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 the name of the metric after you create the RateBasedRule .

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

  • rate_key (str) – The field that AWS WAF uses to determine if requests are likely arriving from single source and thus subject to rate monitoring. The only valid value for RateKey is IP . IP indicates that requests arriving from the same IP address are subject to the RateLimit that is specified in the RateBasedRule .

  • rate_limit (Union[int, float]) – The maximum number of requests, which have an identical value in the field specified by the RateKey , allowed in a five-minute period. If the number of requests exceeds the RateLimit and the other predicates specified in the rule are also met, AWS WAF triggers the action that is specified for this rule.

  • match_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 RateBasedRule .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-ratebasedrule.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_rate_based_rule_props = wafregional.CfnRateBasedRuleProps(
    metric_name="metricName",
    name="name",
    rate_key="rateKey",
    rate_limit=123,

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

Attributes

match_predicates

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

See:

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

metric_name

A name for the metrics for a RateBasedRule .

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 the name of the metric after you create the RateBasedRule .

See:

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

name

A friendly name or description for a RateBasedRule .

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

See:

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

rate_key

The field that AWS WAF uses to determine if requests are likely arriving from single source and thus subject to rate monitoring.

The only valid value for RateKey is IP . IP indicates that requests arriving from the same IP address are subject to the RateLimit that is specified in the RateBasedRule .

See:

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

rate_limit

The maximum number of requests, which have an identical value in the field specified by the RateKey , allowed in a five-minute period.

If the number of requests exceeds the RateLimit and the other predicates specified in the rule are also met, AWS WAF triggers the action that is specified for this rule.

See:

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