Class RateLimitRule


  • public final class RateLimitRule
    extends CustomRule
    Defines a rate limiting rule that can be included in a waf policy.
    • Constructor Detail

      • RateLimitRule

        public RateLimitRule()
    • Method Detail

      • rateLimitThreshold

        public int rateLimitThreshold()
        Get the rateLimitThreshold property: Defines rate limit threshold.
        Returns:
        the rateLimitThreshold value.
      • withRateLimitThreshold

        public RateLimitRule withRateLimitThreshold​(int rateLimitThreshold)
        Set the rateLimitThreshold property: Defines rate limit threshold.
        Parameters:
        rateLimitThreshold - the rateLimitThreshold value to set.
        Returns:
        the RateLimitRule object itself.
      • rateLimitDurationInMinutes

        public int rateLimitDurationInMinutes()
        Get the rateLimitDurationInMinutes property: Defines rate limit duration. Default is 1 minute.
        Returns:
        the rateLimitDurationInMinutes value.
      • withRateLimitDurationInMinutes

        public RateLimitRule withRateLimitDurationInMinutes​(int rateLimitDurationInMinutes)
        Set the rateLimitDurationInMinutes property: Defines rate limit duration. Default is 1 minute.
        Parameters:
        rateLimitDurationInMinutes - the rateLimitDurationInMinutes value to set.
        Returns:
        the RateLimitRule object itself.
      • withName

        public RateLimitRule withName​(String name)
        Set the name property: Defines the name of the custom rule.
        Overrides:
        withName in class CustomRule
        Parameters:
        name - the name value to set.
        Returns:
        the CustomRule object itself.
      • withEnabledState

        public RateLimitRule withEnabledState​(CustomRuleEnabledState enabledState)
        Set the enabledState property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
        Overrides:
        withEnabledState in class CustomRule
        Parameters:
        enabledState - the enabledState value to set.
        Returns:
        the CustomRule object itself.
      • withPriority

        public RateLimitRule withPriority​(int priority)
        Set the priority property: Defines in what order this rule be evaluated in the overall list of custom rules.
        Overrides:
        withPriority in class CustomRule
        Parameters:
        priority - the priority value to set.
        Returns:
        the CustomRule object itself.
      • withMatchConditions

        public RateLimitRule withMatchConditions​(List<MatchCondition> matchConditions)
        Set the matchConditions property: List of match conditions.
        Overrides:
        withMatchConditions in class CustomRule
        Parameters:
        matchConditions - the matchConditions value to set.
        Returns:
        the CustomRule object itself.
      • withAction

        public RateLimitRule withAction​(ActionType action)
        Set the action property: Describes what action to be applied when rule matches.
        Overrides:
        withAction in class CustomRule
        Parameters:
        action - the action value to set.
        Returns:
        the CustomRule object itself.