Class CfnRule.Builder

java.lang.Object
software.amazon.awscdk.services.waf.CfnRule.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRule>
Enclosing class:
CfnRule

@Stability(Stable) public static final class CfnRule.Builder extends Object implements software.amazon.jsii.Builder<CfnRule>
A fluent builder for CfnRule.
  • Method Details

    • create

      @Stability(Stable) public static CfnRule.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 CfnRule.Builder.
    • metricName

      @Stability(Stable) public CfnRule.Builder metricName(String metricName)
      The name of the metrics for this Rule .

      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 Rule .

      Parameters:
      metricName - The name of the metrics for this Rule . This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnRule.Builder name(String name)
      The friendly name or description for the Rule .

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

      Parameters:
      name - The friendly name or description for the Rule . This parameter is required.
      Returns:
      this
    • predicates

      @Stability(Stable) public CfnRule.Builder predicates(IResolvable predicates)
      The Predicates object contains one Predicate element for each ByteMatchSet , IPSet , or SqlInjectionMatchSet object that you want to include in a Rule .

      Parameters:
      predicates - The Predicates object contains one Predicate element for each ByteMatchSet , IPSet , or SqlInjectionMatchSet object that you want to include in a Rule . This parameter is required.
      Returns:
      this
    • predicates

      @Stability(Stable) public CfnRule.Builder predicates(List<? extends Object> predicates)
      The Predicates object contains one Predicate element for each ByteMatchSet , IPSet , or SqlInjectionMatchSet object that you want to include in a Rule .

      Parameters:
      predicates - The Predicates object contains one Predicate element for each ByteMatchSet , IPSet , or SqlInjectionMatchSet object that you want to include in a Rule . This parameter is required.
      Returns:
      this
    • build

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