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>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • priority

      @Stability(Stable) public CfnWebACL.ActivatedRuleProperty.Builder priority(Number priority)
      Parameters:
      priority - Specifies the order in which the Rules in a WebACL are evaluated. This parameter is required. Rules with a lower value for Priority are evaluated before Rules with a higher value. The value must be a unique integer. If you add multiple Rules to a WebACL , the values don't need to be consecutive.
      Returns:
      this
    • ruleId

      @Stability(Stable) public CfnWebACL.ActivatedRuleProperty.Builder ruleId(String ruleId)
      Parameters:
      ruleId - The RuleId for a Rule . This parameter is required. You use RuleId to get more information about a Rule , update a Rule , insert a Rule into a WebACL or delete a one from a WebACL , or delete a Rule from AWS WAF .

      RuleId is returned by CreateRule and by ListRules .

      Returns:
      this
    • action

      @Stability(Stable) public CfnWebACL.ActivatedRuleProperty.Builder action(IResolvable action)
      Parameters:
      action - Specifies the action that Amazon CloudFront or AWS WAF takes when a web request matches the conditions in the Rule . Valid values for Action 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 a RuleGroup to a WebACL . In this case, you do not use ActivatedRule|Action . For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction .

      Returns:
      this
    • action

      @Stability(Stable) public CfnWebACL.ActivatedRuleProperty.Builder action(CfnWebACL.WafActionProperty action)
      Parameters:
      action - Specifies the action that Amazon CloudFront or AWS WAF takes when a web request matches the conditions in the Rule . Valid values for Action 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 a RuleGroup to a WebACL . In this case, you do not use ActivatedRule|Action . For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction .

      Returns:
      this
    • build

      @Stability(Stable) public CfnWebACL.ActivatedRuleProperty build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnWebACL.ActivatedRuleProperty>
      Returns:
      a new instance of CfnWebACL.ActivatedRuleProperty
      Throws:
      NullPointerException - if any required attribute was not provided