public final class RateLimitRule extends CustomRule
| Constructor and Description |
|---|
RateLimitRule() |
| Modifier and Type | Method and Description |
|---|---|
int |
rateLimitDurationInMinutes()
Get the rateLimitDurationInMinutes property: Defines rate limit duration.
|
int |
rateLimitThreshold()
Get the rateLimitThreshold property: Defines rate limit threshold.
|
void |
validate()
Validates the instance.
|
RateLimitRule |
withAction(ActionType action)
Set the action property: Describes what action to be applied when rule matches.
|
RateLimitRule |
withEnabledState(CustomRuleEnabledState enabledState)
Set the enabledState property: Describes if the custom rule is in enabled or disabled state.
|
RateLimitRule |
withMatchConditions(List<MatchCondition> matchConditions)
Set the matchConditions property: List of match conditions.
|
RateLimitRule |
withName(String name)
Set the name property: Defines the name of the custom rule.
|
RateLimitRule |
withPriority(int priority)
Set the priority property: Defines in what order this rule be evaluated in the overall list of custom rules.
|
RateLimitRule |
withRateLimitDurationInMinutes(int rateLimitDurationInMinutes)
Set the rateLimitDurationInMinutes property: Defines rate limit duration.
|
RateLimitRule |
withRateLimitThreshold(int rateLimitThreshold)
Set the rateLimitThreshold property: Defines rate limit threshold.
|
action, enabledState, matchConditions, name, prioritypublic int rateLimitThreshold()
public RateLimitRule withRateLimitThreshold(int rateLimitThreshold)
rateLimitThreshold - the rateLimitThreshold value to set.public int rateLimitDurationInMinutes()
public RateLimitRule withRateLimitDurationInMinutes(int rateLimitDurationInMinutes)
rateLimitDurationInMinutes - the rateLimitDurationInMinutes value to set.public RateLimitRule withName(String name)
withName in class CustomRulename - the name value to set.public RateLimitRule withEnabledState(CustomRuleEnabledState enabledState)
withEnabledState in class CustomRuleenabledState - the enabledState value to set.public RateLimitRule withPriority(int priority)
withPriority in class CustomRulepriority - the priority value to set.public RateLimitRule withMatchConditions(List<MatchCondition> matchConditions)
withMatchConditions in class CustomRulematchConditions - the matchConditions value to set.public RateLimitRule withAction(ActionType action)
withAction in class CustomRuleaction - the action value to set.public void validate()
validate in class CustomRuleIllegalArgumentException - thrown if the instance is not valid.Copyright © 2020 Microsoft Corporation. All rights reserved.