Class CfnRuleProps.Builder
java.lang.Object
software.amazon.awscdk.services.waf.regional.CfnRuleProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleProps>
- Enclosing interface:
CfnRuleProps
@Stability(Stable)
public static final class CfnRuleProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRuleProps>
A builder for
CfnRuleProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.metricName
(String metricName) Sets the value ofCfnRuleProps.getMetricName()
Sets the value ofCfnRuleProps.getName()
predicates
(List<? extends Object> predicates) Sets the value ofCfnRuleProps.getPredicates()
predicates
(IResolvable predicates) Sets the value ofCfnRuleProps.getPredicates()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricName
Sets the value ofCfnRuleProps.getMetricName()
- Parameters:
metricName
- A name for the metrics for thisRule
. 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 changeMetricName
after you create theRule
.- Returns:
this
-
name
Sets the value ofCfnRuleProps.getName()
- Parameters:
name
- The friendly name or description for theRule
. This parameter is required. You can't change the name of aRule
after you create it.- Returns:
this
-
predicates
Sets the value ofCfnRuleProps.getPredicates()
- Parameters:
predicates
- ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet
object that you want to include in aRule
.- Returns:
this
-
predicates
Sets the value ofCfnRuleProps.getPredicates()
- Parameters:
predicates
- ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet
object that you want to include in aRule
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRuleProps>
- Returns:
- a new instance of
CfnRuleProps
- Throws:
NullPointerException
- if any required attribute was not provided
-