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
Constructors -
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 theRulesin aWebACLare evaluated. This parameter is required. Rules with a lower value forPriorityare evaluated beforeRuleswith a higher value. The value must be a unique integer. If you add multipleRulesto aWebACL, the values don't need to be consecutive.- Returns:
this
-
ruleId
Sets the value ofCfnWebACL.ActivatedRuleProperty.getRuleId()- Parameters:
ruleId- TheRuleIdfor aRule. This parameter is required. You useRuleIdto get more information about aRule, update aRule, insert aRuleinto aWebACLor delete a one from aWebACL, or delete aRulefrom AWS WAF .RuleIdis returned byCreateRuleand 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 forActioninclude 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|OverrideActionapplies only when updating or adding aRuleGroupto aWebACL. In this case, you do not useActivatedRule|Action. For all other update requests,ActivatedRule|Actionis 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 forActioninclude 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|OverrideActionapplies only when updating or adding aRuleGroupto aWebACL. In this case, you do not useActivatedRule|Action. For all other update requests,ActivatedRule|Actionis used instead ofActivatedRule|OverrideAction.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnWebACL.ActivatedRuleProperty>- Returns:
- a new instance of
CfnWebACL.ActivatedRuleProperty - Throws:
NullPointerException- if any required attribute was not provided
-