Class RateLimitRule
java.lang.Object
com.azure.resourcemanager.cdn.models.CustomRule
com.azure.resourcemanager.cdn.models.RateLimitRule
Defines a rate limiting rule that can be included in a waf policy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the rateLimitDurationInMinutes property: Defines rate limit duration.intGet the rateLimitThreshold property: Defines rate limit threshold.voidvalidate()Validates the instance.withAction(ActionType action) Set the action property: Describes what action to be applied when rule matches.withEnabledState(CustomRuleEnabledState enabledState) Set the enabledState property: Describes if the custom rule is in enabled or disabled state.withMatchConditions(List<MatchCondition> matchConditions) Set the matchConditions property: List of match conditions.Set the name property: Defines the name of the custom rule.withPriority(int priority) Set the priority property: Defines in what order this rule be evaluated in the overall list of custom rules.withRateLimitDurationInMinutes(int rateLimitDurationInMinutes) Set the rateLimitDurationInMinutes property: Defines rate limit duration.withRateLimitThreshold(int rateLimitThreshold) Set the rateLimitThreshold property: Defines rate limit threshold.Methods inherited from class com.azure.resourcemanager.cdn.models.CustomRule
action, enabledState, matchConditions, name, priority
-
Constructor Details
-
RateLimitRule
public RateLimitRule()
-
-
Method Details
-
rateLimitThreshold
public int rateLimitThreshold()Get the rateLimitThreshold property: Defines rate limit threshold.- Returns:
- the rateLimitThreshold value.
-
withRateLimitThreshold
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
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
Set the name property: Defines the name of the custom rule.- Overrides:
withNamein classCustomRule- Parameters:
name- the name value to set.- Returns:
- the CustomRule object itself.
-
withEnabledState
Set the enabledState property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.- Overrides:
withEnabledStatein classCustomRule- Parameters:
enabledState- the enabledState value to set.- Returns:
- the CustomRule object itself.
-
withPriority
Set the priority property: Defines in what order this rule be evaluated in the overall list of custom rules.- Overrides:
withPriorityin classCustomRule- Parameters:
priority- the priority value to set.- Returns:
- the CustomRule object itself.
-
withMatchConditions
Set the matchConditions property: List of match conditions.- Overrides:
withMatchConditionsin classCustomRule- Parameters:
matchConditions- the matchConditions value to set.- Returns:
- the CustomRule object itself.
-
withAction
Set the action property: Describes what action to be applied when rule matches.- Overrides:
withActionin classCustomRule- Parameters:
action- the action value to set.- Returns:
- the CustomRule object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classCustomRule- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-