Class CfnWebACL.Builder

java.lang.Object
software.amazon.awscdk.services.waf.regional.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 Details

    • create

      @Stability(Stable) public static CfnWebACL.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnWebACL.Builder.
    • defaultAction

      @Stability(Stable) public CfnWebACL.Builder defaultAction(IResolvable defaultAction)
      The action to perform if none of the Rules contained in the WebACL match.

      The action is specified by the WafAction object.

      Parameters:
      defaultAction - The action to perform if none of the Rules contained in the WebACL match. This parameter is required.
      Returns:
      this
    • defaultAction

      @Stability(Stable) public CfnWebACL.Builder defaultAction(CfnWebACL.ActionProperty defaultAction)
      The action to perform if none of the Rules contained in the WebACL match.

      The action is specified by the WafAction object.

      Parameters:
      defaultAction - The action to perform if none of the Rules contained in the WebACL match. This parameter is required.
      Returns:
      this
    • metricName

      @Stability(Stable) public CfnWebACL.Builder metricName(String metricName)
      A name for the metrics for this WebACL .

      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 the WebACL .

      Parameters:
      metricName - A name for the metrics for this WebACL . This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnWebACL.Builder name(String name)
      A friendly name or description of the WebACL .

      You can't change the name of a WebACL after you create it.

      Parameters:
      name - A friendly name or description of the WebACL . This parameter is required.
      Returns:
      this
    • rules

      @Stability(Stable) public CfnWebACL.Builder rules(IResolvable rules)
      An array that contains the action for each Rule in a WebACL , the priority of the Rule , and the ID of the Rule .

      Parameters:
      rules - An array that contains the action for each Rule in a WebACL , the priority of the Rule , and the ID of the Rule . This parameter is required.
      Returns:
      this
    • rules

      @Stability(Stable) public CfnWebACL.Builder rules(List<? extends Object> rules)
      An array that contains the action for each Rule in a WebACL , the priority of the Rule , and the ID of the Rule .

      Parameters:
      rules - An array that contains the action for each Rule in a WebACL , the priority of the Rule , and the ID of the Rule . This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnWebACL build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnWebACL>
      Returns:
      a newly built instance of CfnWebACL.