Class CfnRuleGroup.RuleProperty.Builder

java.lang.Object
software.amazon.awscdk.services.wafv2.CfnRuleGroup.RuleProperty.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleGroup.RuleProperty>
Enclosing interface:
CfnRuleGroup.RuleProperty

@Stability(Stable) public static final class CfnRuleGroup.RuleProperty.Builder extends Object implements software.amazon.jsii.Builder<CfnRuleGroup.RuleProperty>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder name(String name)
      Parameters:
      name - The name of the rule. This parameter is required. If you change the name of a Rule after you create it and you want the rule's metric name to reflect the change, update the metric name in the rule's VisibilityConfig settings. AWS WAF doesn't automatically update the metric name when you update the rule name.
      Returns:
      this
    • priority

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder priority(Number priority)
      Parameters:
      priority - If you define more than one Rule in a WebACL , AWS WAF evaluates each request against the Rules in order based on the value of Priority . This parameter is required. AWS WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.
      Returns:
      this
    • statement

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder statement(IResolvable statement)
      Parameters:
      statement - The AWS WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement . This parameter is required.
      Returns:
      this
    • statement

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder statement(CfnRuleGroup.StatementProperty statement)
      Parameters:
      statement - The AWS WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement . This parameter is required.
      Returns:
      this
    • visibilityConfig

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder visibilityConfig(IResolvable visibilityConfig)
      Parameters:
      visibilityConfig - Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required. If you change the name of a Rule after you create it and you want the rule's metric name to reflect the change, update the metric name as well. AWS WAF doesn't automatically update the metric name.
      Returns:
      this
    • visibilityConfig

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder visibilityConfig(CfnRuleGroup.VisibilityConfigProperty visibilityConfig)
      Parameters:
      visibilityConfig - Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required. If you change the name of a Rule after you create it and you want the rule's metric name to reflect the change, update the metric name as well. AWS WAF doesn't automatically update the metric name.
      Returns:
      this
    • action

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder action(IResolvable action)
      Parameters:
      action - The action that AWS WAF should take on a web request when it matches the rule statement. Settings at the web ACL level can override the rule action setting.
      Returns:
      this
    • action

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder action(CfnRuleGroup.RuleActionProperty action)
      Parameters:
      action - The action that AWS WAF should take on a web request when it matches the rule statement. Settings at the web ACL level can override the rule action setting.
      Returns:
      this
    • captchaConfig

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder captchaConfig(IResolvable captchaConfig)
      Parameters:
      captchaConfig - Specifies how AWS WAF should handle CAPTCHA evaluations. If you don't specify this, AWS WAF uses the CAPTCHA configuration that's defined for the web ACL.
      Returns:
      this
    • captchaConfig

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder captchaConfig(CfnRuleGroup.CaptchaConfigProperty captchaConfig)
      Parameters:
      captchaConfig - Specifies how AWS WAF should handle CAPTCHA evaluations. If you don't specify this, AWS WAF uses the CAPTCHA configuration that's defined for the web ACL.
      Returns:
      this
    • challengeConfig

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder challengeConfig(IResolvable challengeConfig)
      Parameters:
      challengeConfig - Specifies how AWS WAF should handle Challenge evaluations. If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.
      Returns:
      this
    • challengeConfig

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder challengeConfig(CfnRuleGroup.ChallengeConfigProperty challengeConfig)
      Parameters:
      challengeConfig - Specifies how AWS WAF should handle Challenge evaluations. If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.
      Returns:
      this
    • ruleLabels

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder ruleLabels(IResolvable ruleLabels)
      Parameters:
      ruleLabels - Labels to apply to web requests that match the rule match statement. AWS WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

      Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement .

      For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

      • Separate each component of the label with a colon.
      • Each namespace or name can have up to 128 characters.
      • You can specify up to 5 namespaces in a label.
      • Don't use the following reserved words in your label specification: aws , waf , managed , rulegroup , webacl , regexpatternset , or ipset .

      For example, myLabelName or nameSpace1:nameSpace2:myLabelName .

      Returns:
      this
    • ruleLabels

      @Stability(Stable) public CfnRuleGroup.RuleProperty.Builder ruleLabels(List<? extends Object> ruleLabels)
      Parameters:
      ruleLabels - Labels to apply to web requests that match the rule match statement. AWS WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

      Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement .

      For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

      • Separate each component of the label with a colon.
      • Each namespace or name can have up to 128 characters.
      • You can specify up to 5 namespaces in a label.
      • Don't use the following reserved words in your label specification: aws , waf , managed , rulegroup , webacl , regexpatternset , or ipset .

      For example, myLabelName or nameSpace1:nameSpace2:myLabelName .

      Returns:
      this
    • build

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