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 aRateBasedRule
. 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 theRateBasedRule
.name (
str
) – A friendly name or description for aRateBasedRule
. You can’t change the name of aRateBasedRule
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 forRateKey
isIP
.IP
indicates that requests arriving from the same IP address are subject to theRateLimit
that is specified in theRateBasedRule
.rate_limit (
Union
[int
,float
]) – The maximum number of requests, which have an identical value in the field specified by theRateKey
, allowed in a five-minute period. If the number of requests exceeds theRateLimit
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
]) – ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet>
object that you want to include in aRateBasedRule
.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.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 onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet>
object that you want to include in aRateBasedRule
.
- 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
.
- name
A friendly name or description for a
RateBasedRule
.You can’t change the name of a
RateBasedRule
after you create it.
- 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
isIP
.IP
indicates that requests arriving from the same IP address are subject to theRateLimit
that is specified in theRateBasedRule
.
- 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.