Class CfnWebACLProps.Builder
java.lang.Object
software.amazon.awscdk.services.waf.CfnWebACLProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACLProps>
- Enclosing interface:
CfnWebACLProps
@Stability(Stable)
public static final class CfnWebACLProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnWebACLProps>
A builder for
CfnWebACLProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.defaultAction
(IResolvable defaultAction) Sets the value ofCfnWebACLProps.getDefaultAction()
defaultAction
(CfnWebACL.WafActionProperty defaultAction) Sets the value ofCfnWebACLProps.getDefaultAction()
metricName
(String metricName) Sets the value ofCfnWebACLProps.getMetricName()
Sets the value ofCfnWebACLProps.getName()
Sets the value ofCfnWebACLProps.getRules()
rules
(IResolvable rules) Sets the value ofCfnWebACLProps.getRules()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultAction
Sets the value ofCfnWebACLProps.getDefaultAction()
- Parameters:
defaultAction
- The action to perform if none of theRules
contained in theWebACL
match. This parameter is required. The action is specified by theWafAction
object.- Returns:
this
-
defaultAction
@Stability(Stable) public CfnWebACLProps.Builder defaultAction(CfnWebACL.WafActionProperty defaultAction) Sets the value ofCfnWebACLProps.getDefaultAction()
- Parameters:
defaultAction
- The action to perform if none of theRules
contained in theWebACL
match. This parameter is required. The action is specified by theWafAction
object.- Returns:
this
-
metricName
Sets the value ofCfnWebACLProps.getMetricName()
- Parameters:
metricName
- The name of the metrics for thisWebACL
. 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 theWebACL
.- Returns:
this
-
name
Sets the value ofCfnWebACLProps.getName()
- Parameters:
name
- A friendly name or description of theWebACL
. This parameter is required. You can't change the name of aWebACL
after you create it.- Returns:
this
-
rules
Sets the value ofCfnWebACLProps.getRules()
- Parameters:
rules
- An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Returns:
this
-
rules
Sets the value ofCfnWebACLProps.getRules()
- Parameters:
rules
- An array that contains the action for eachRule
in aWebACL
, the priority of theRule
, and the ID of theRule
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnWebACLProps>
- Returns:
- a new instance of
CfnWebACLProps
- Throws:
NullPointerException
- if any required attribute was not provided
-