Class CfnWebACL.ActivatedRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.waf.CfnWebACL.ActivatedRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACL.ActivatedRuleProperty>
- Enclosing interface:
- CfnWebACL.ActivatedRuleProperty
@Stability(Stable)
public static final class CfnWebACL.ActivatedRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnWebACL.ActivatedRuleProperty>
A builder for
CfnWebACL.ActivatedRuleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaction
(IResolvable action) Sets the value ofCfnWebACL.ActivatedRuleProperty.getAction()
action
(CfnWebACL.WafActionProperty action) Sets the value ofCfnWebACL.ActivatedRuleProperty.getAction()
build()
Builds the configured instance.Sets the value ofCfnWebACL.ActivatedRuleProperty.getPriority()
Sets the value ofCfnWebACL.ActivatedRuleProperty.getRuleId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
priority
Sets the value ofCfnWebACL.ActivatedRuleProperty.getPriority()
- Parameters:
priority
- Specifies the order in which theRules
in aWebACL
are evaluated. This parameter is required. Rules with a lower value forPriority
are evaluated beforeRules
with a higher value. The value must be a unique integer. If you add multipleRules
to aWebACL
, the values don't need to be consecutive.- Returns:
this
-
ruleId
Sets the value ofCfnWebACL.ActivatedRuleProperty.getRuleId()
- Parameters:
ruleId
- TheRuleId
for aRule
. This parameter is required. You useRuleId
to get more information about aRule
, update aRule
, insert aRule
into aWebACL
or delete a one from aWebACL
, or delete aRule
from AWS WAF .RuleId
is returned byCreateRule
and byListRules
.- Returns:
this
-
action
Sets the value ofCfnWebACL.ActivatedRuleProperty.getAction()
- Parameters:
action
- Specifies the action that Amazon CloudFront or AWS WAF takes when a web request matches the conditions in theRule
. Valid values forAction
include the following:ALLOW
: CloudFront responds with the requested object.BLOCK
: CloudFront responds with an HTTP 403 (Forbidden) status code.COUNT
: AWS WAF increments a counter of requests that match the conditions in the rule and then continues to inspect the web request based on the remaining rules in the web ACL.
ActivatedRule|OverrideAction
applies only when updating or adding aRuleGroup
to aWebACL
. In this case, you do not useActivatedRule|Action
. For all other update requests,ActivatedRule|Action
is used instead ofActivatedRule|OverrideAction
.- Returns:
this
-
action
@Stability(Stable) public CfnWebACL.ActivatedRuleProperty.Builder action(CfnWebACL.WafActionProperty action) Sets the value ofCfnWebACL.ActivatedRuleProperty.getAction()
- Parameters:
action
- Specifies the action that Amazon CloudFront or AWS WAF takes when a web request matches the conditions in theRule
. Valid values forAction
include the following:ALLOW
: CloudFront responds with the requested object.BLOCK
: CloudFront responds with an HTTP 403 (Forbidden) status code.COUNT
: AWS WAF increments a counter of requests that match the conditions in the rule and then continues to inspect the web request based on the remaining rules in the web ACL.
ActivatedRule|OverrideAction
applies only when updating or adding aRuleGroup
to aWebACL
. In this case, you do not useActivatedRule|Action
. For all other update requests,ActivatedRule|Action
is used instead ofActivatedRule|OverrideAction
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnWebACL.ActivatedRuleProperty>
- Returns:
- a new instance of
CfnWebACL.ActivatedRuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-