Class CfnRule.Builder
java.lang.Object
software.amazon.awscdk.services.waf.regional.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) A name for the metrics for this `Rule` .The friendly name or description for the `Rule` .predicates
(List<? extends Object> predicates) The `Predicates` object contains one `Predicate` element for each `ByteMatchSet` , `IPSet` , or `SqlInjectionMatchSet` object that you want to include in a `Rule` .predicates
(IResolvable predicates) The `Predicates` object contains one `Predicate` element for each `ByteMatchSet` , `IPSet` , or `SqlInjectionMatchSet` object that you want to include in a `Rule` .
-
Method Details
-
create
- Parameters:
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.- Returns:
- a new instance of
CfnRule.Builder
.
-
metricName
A name for the metrics for this `Rule` .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
- A name for the metrics for this `Rule` . This parameter is required.- Returns:
this
-
name
The friendly name or description for the `Rule` .You can't change the name of a
Rule
after you create it.- Parameters:
name
- The friendly name or description for the `Rule` . This parameter is required.- Returns:
this
-
predicates
The `Predicates` object contains one `Predicate` element for each `ByteMatchSet` , `IPSet` , or `SqlInjectionMatchSet` object that you want to include in a `Rule` .- Parameters:
predicates
- The `Predicates` object contains one `Predicate` element for each `ByteMatchSet` , `IPSet` , or `SqlInjectionMatchSet` object that you want to include in a `Rule` . This parameter is required.- Returns:
this
-
predicates
The `Predicates` object contains one `Predicate` element for each `ByteMatchSet` , `IPSet` , or `SqlInjectionMatchSet` object that you want to include in a `Rule` .- Parameters:
predicates
- The `Predicates` object contains one `Predicate` element for each `ByteMatchSet` , `IPSet` , or `SqlInjectionMatchSet` object that you want to include in a `Rule` . This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRule>
-