Class CfnRateBasedRuleProps.Builder
java.lang.Object
software.amazon.awscdk.services.waf.regional.CfnRateBasedRuleProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRateBasedRuleProps>
- Enclosing interface:
- CfnRateBasedRuleProps
@Stability(Stable)
public static final class CfnRateBasedRuleProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRateBasedRuleProps>
A builder for
CfnRateBasedRuleProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.matchPredicates
(List<? extends Object> matchPredicates) Sets the value ofCfnRateBasedRuleProps.getMatchPredicates()
matchPredicates
(IResolvable matchPredicates) Sets the value ofCfnRateBasedRuleProps.getMatchPredicates()
metricName
(String metricName) Sets the value ofCfnRateBasedRuleProps.getMetricName()
Sets the value ofCfnRateBasedRuleProps.getName()
Sets the value ofCfnRateBasedRuleProps.getRateKey()
Sets the value ofCfnRateBasedRuleProps.getRateLimit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricName
Sets the value ofCfnRateBasedRuleProps.getMetricName()
- Parameters:
metricName
- A name for the metrics for aRateBasedRule
. This parameter is required. 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
.- Returns:
this
-
name
Sets the value ofCfnRateBasedRuleProps.getName()
- Parameters:
name
- A friendly name or description for aRateBasedRule
. This parameter is required. You can't change the name of aRateBasedRule
after you create it.- Returns:
this
-
rateKey
Sets the value ofCfnRateBasedRuleProps.getRateKey()
- Parameters:
rateKey
- The field that AWS WAF uses to determine if requests are likely arriving from single source and thus subject to rate monitoring. This parameter is required. 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
.- Returns:
this
-
rateLimit
Sets the value ofCfnRateBasedRuleProps.getRateLimit()
- Parameters:
rateLimit
- The maximum number of requests, which have an identical value in the field specified by theRateKey
, allowed in a five-minute period. This parameter is required. 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.- Returns:
this
-
matchPredicates
@Stability(Stable) public CfnRateBasedRuleProps.Builder matchPredicates(IResolvable matchPredicates) Sets the value ofCfnRateBasedRuleProps.getMatchPredicates()
- Parameters:
matchPredicates
- ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet>
object that you want to include in aRateBasedRule
.- Returns:
this
-
matchPredicates
@Stability(Stable) public CfnRateBasedRuleProps.Builder matchPredicates(List<? extends Object> matchPredicates) Sets the value ofCfnRateBasedRuleProps.getMatchPredicates()
- Parameters:
matchPredicates
- ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet>
object that you want to include in aRateBasedRule
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRateBasedRuleProps>
- Returns:
- a new instance of
CfnRateBasedRuleProps
- Throws:
NullPointerException
- if any required attribute was not provided
-