Class CfnRule.Builder
java.lang.Object
software.amazon.awscdk.services.waf.CfnRule.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRule>
- Enclosing class:
CfnRule
@Stability(Stable)
public static final class CfnRule.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRule>
A fluent builder for
CfnRule
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static CfnRule.Builder
metricName
(String metricName) The name of the metrics for thisRule
.The friendly name or description for theRule
.predicates
(List<? extends Object> predicates) ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet
object that you want to include in aRule
.predicates
(IResolvable predicates) ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet
object that you want to include in aRule
.
-
Method Details
-
create
@Stability(Stable) public static CfnRule.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnRule.Builder
.
-
metricName
The name of the metrics for thisRule
.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 theRule
.- Parameters:
metricName
- The name of the metrics for thisRule
. This parameter is required.- Returns:
this
- See Also:
-
name
The friendly name or description for theRule
.You can't change the name of a
Rule
after you create it.- Parameters:
name
- The friendly name or description for theRule
. This parameter is required.- Returns:
this
- See Also:
-
predicates
ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet
object that you want to include in aRule
.- Parameters:
predicates
- ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet
object that you want to include in aRule
. This parameter is required.- Returns:
this
- See Also:
-
predicates
ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet
object that you want to include in aRule
.- Parameters:
predicates
- ThePredicates
object contains onePredicate
element for eachByteMatchSet
,IPSet
, orSqlInjectionMatchSet
object that you want to include in aRule
. This parameter is required.- Returns:
this
- See Also:
-
build
-