Class CustomRule
java.lang.Object
com.azure.resourcemanager.frontdoor.models.CustomRule
Defines contents of a web application rule.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaction()
Get the action property: Describes what action to be applied when rule matches.Get the enabledState property: Describes if the custom rule is in enabled or disabled state.Get the matchConditions property: List of match conditions.name()
Get the name property: Describes the name of the rule.int
priority()
Get the priority property: Describes priority of the rule.Get the rateLimitDurationInMinutes property: Time window for resetting the rate limit count.Get the rateLimitThreshold property: Number of allowed requests per client within the time window.ruleType()
Get the ruleType property: Describes type of rule.void
validate()
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: Describes the name of the rule.withPriority
(int priority) Set the priority property: Describes priority of the rule.withRateLimitDurationInMinutes
(Integer rateLimitDurationInMinutes) Set the rateLimitDurationInMinutes property: Time window for resetting the rate limit count.withRateLimitThreshold
(Integer rateLimitThreshold) Set the rateLimitThreshold property: Number of allowed requests per client within the time window.withRuleType
(RuleType ruleType) Set the ruleType property: Describes type of rule.
-
Constructor Details
-
CustomRule
public CustomRule()Creates an instance of CustomRule class.
-
-
Method Details
-
name
Get the name property: Describes the name of the rule.- Returns:
- the name value.
-
withName
Set the name property: Describes the name of the rule.- Parameters:
name
- the name value to set.- Returns:
- the CustomRule object itself.
-
priority
public int priority()Get the priority property: Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.- Returns:
- the priority value.
-
withPriority
Set the priority property: Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.- Parameters:
priority
- the priority value to set.- Returns:
- the CustomRule object itself.
-
enabledState
Get the enabledState property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.- Returns:
- the enabledState value.
-
withEnabledState
Set the enabledState property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.- Parameters:
enabledState
- the enabledState value to set.- Returns:
- the CustomRule object itself.
-
ruleType
Get the ruleType property: Describes type of rule.- Returns:
- the ruleType value.
-
withRuleType
Set the ruleType property: Describes type of rule.- Parameters:
ruleType
- the ruleType value to set.- Returns:
- the CustomRule object itself.
-
rateLimitDurationInMinutes
Get the rateLimitDurationInMinutes property: Time window for resetting the rate limit count. Default is 1 minute.- Returns:
- the rateLimitDurationInMinutes value.
-
withRateLimitDurationInMinutes
Set the rateLimitDurationInMinutes property: Time window for resetting the rate limit count. Default is 1 minute.- Parameters:
rateLimitDurationInMinutes
- the rateLimitDurationInMinutes value to set.- Returns:
- the CustomRule object itself.
-
rateLimitThreshold
Get the rateLimitThreshold property: Number of allowed requests per client within the time window.- Returns:
- the rateLimitThreshold value.
-
withRateLimitThreshold
Set the rateLimitThreshold property: Number of allowed requests per client within the time window.- Parameters:
rateLimitThreshold
- the rateLimitThreshold value to set.- Returns:
- the CustomRule object itself.
-
matchConditions
Get the matchConditions property: List of match conditions.- Returns:
- the matchConditions value.
-
withMatchConditions
Set the matchConditions property: List of match conditions.- Parameters:
matchConditions
- the matchConditions value to set.- Returns:
- the CustomRule object itself.
-
action
Get the action property: Describes what action to be applied when rule matches.- Returns:
- the action value.
-
withAction
Set the action property: Describes what action to be applied when rule matches.- Parameters:
action
- the action value to set.- Returns:
- the CustomRule object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-