Rule

class Rule

A single rule, which you can use in a WebACL or RuleGroup to identify web requests that you want to manage in some way. Each rule includes one top-level Statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The action that 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.

Link copied to clipboard

Specifies how WAF should handle CAPTCHA evaluations. If you don't specify this, WAF uses the CAPTCHA configuration that's defined for the web ACL.

Link copied to clipboard

Specifies how WAF should handle Challenge evaluations. If you don't specify this, WAF uses the challenge configuration that's defined for the web ACL.

Link copied to clipboard

The name of the rule.

Link copied to clipboard

The action to use in the place of the action that results from the rule group evaluation. Set the override action to none to leave the result of the rule group alone. Set it to count to override the result to count only.

Link copied to clipboard

If you define more than one Rule in a WebACL, WAF evaluates each request against the Rules in order based on the value of Priority. WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.

Link copied to clipboard

Labels to apply to web requests that match the rule match statement. 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.

Link copied to clipboard

The WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement.

Link copied to clipboard

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Functions

Link copied to clipboard
inline fun copy(block: Rule.Builder.() -> Unit = {}): Rule
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String