Class CustomRule
java.lang.Object
com.microsoft.azure.management.cdn.CustomRule
- Direct Known Subclasses:
RateLimitRule
Defines the common attributes for a custom rule that can be included in a
waf policy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction()
Get describes what action to be applied when rule matches.Get describes if the custom rule is in enabled or disabled state.Get list of match conditions.name()
Get defines the name of the custom rule.int
priority()
Get defines in what order this rule be evaluated in the overall list of custom rules.withAction
(ActionType action) Set describes what action to be applied when rule matches.withEnabledState
(CustomRuleEnabledState enabledState) Set describes if the custom rule is in enabled or disabled state.withMatchConditions
(List<MatchCondition> matchConditions) Set list of match conditions.Set defines the name of the custom rule.withPriority
(int priority) Set defines in what order this rule be evaluated in the overall list of custom rules.
-
Constructor Details
-
CustomRule
public CustomRule()
-
-
Method Details
-
name
Get defines the name of the custom rule.- Returns:
- the name value
-
withName
Set defines the name of the custom rule.- Parameters:
name
- the name value to set- Returns:
- the CustomRule object itself.
-
enabledState
Get describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'Disabled', 'Enabled'.- Returns:
- the enabledState value
-
withEnabledState
Set describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'Disabled', 'Enabled'.- Parameters:
enabledState
- the enabledState value to set- Returns:
- the CustomRule object itself.
-
priority
public int priority()Get defines in what order this rule be evaluated in the overall list of custom rules.- Returns:
- the priority value
-
withPriority
Set defines in what order this rule be evaluated in the overall list of custom rules.- Parameters:
priority
- the priority value to set- Returns:
- the CustomRule object itself.
-
matchConditions
Get list of match conditions.- Returns:
- the matchConditions value
-
withMatchConditions
Set list of match conditions.- Parameters:
matchConditions
- the matchConditions value to set- Returns:
- the CustomRule object itself.
-
action
Get describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'.- Returns:
- the action value
-
withAction
Set describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'.- Parameters:
action
- the action value to set- Returns:
- the CustomRule object itself.
-