Class CfnWebACL.Builder
java.lang.Object
software.amazon.awscdk.services.waf.CfnWebACL.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACL>
- Enclosing class:
CfnWebACL
@Stability(Stable)
public static final class CfnWebACL.Builder
extends Object
implements software.amazon.jsii.Builder<CfnWebACL>
A fluent builder for
CfnWebACL
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static CfnWebACL.Builder
defaultAction
(IResolvable defaultAction) The action to perform if none of theRules
contained in theWebACL
match.defaultAction
(CfnWebACL.WafActionProperty defaultAction) The action to perform if none of theRules
contained in theWebACL
match.metricName
(String metricName) The name of the metrics for thisWebACL
.A friendly name or description of theWebACL
.An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.rules
(IResolvable rules) An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnWebACL.Builder
.
-
defaultAction
The action to perform if none of theRules
contained in theWebACL
match.The action is specified by the
WafAction
object.- Parameters:
defaultAction
- The action to perform if none of theRules
contained in theWebACL
match. This parameter is required.- Returns:
this
-
defaultAction
@Stability(Stable) public CfnWebACL.Builder defaultAction(CfnWebACL.WafActionProperty defaultAction) The action to perform if none of theRules
contained in theWebACL
match.The action is specified by the
WafAction
object.- Parameters:
defaultAction
- The action to perform if none of theRules
contained in theWebACL
match. This parameter is required.- Returns:
this
-
metricName
The name of the metrics for thisWebACL
.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 theWebACL
.- Parameters:
metricName
- The name of the metrics for thisWebACL
. This parameter is required.- Returns:
this
-
name
A friendly name or description of theWebACL
.You can't change the name of a
WebACL
after you create it.- Parameters:
name
- A friendly name or description of theWebACL
. This parameter is required.- Returns:
this
-
rules
An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Parameters:
rules
- An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
. This parameter is required.- Returns:
this
-
rules
An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Parameters:
rules
- An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
. This parameter is required.- Returns:
this
-
build
-