CustomRule Class
- java.
lang. Object - com.
microsoft. azure. management. cdn. CustomRule
- com.
public class CustomRule
Defines the common attributes for a custom rule that can be included in a waf policy.
Constructor Summary
Constructor | Description | |
---|---|---|
CustomRule() |
Method Summary
Modifier and Type | Method and Description |
---|---|
Action |
action()
Get describes what action to be applied when rule matches. |
Custom |
enabledState()
Get describes if the custom rule is in enabled or disabled state. |
java.util.List<Match |
matchConditions()
Get list of match conditions. |
java.lang.String |
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. |
Custom |
withAction(ActionType action)
Set describes what action to be applied when rule matches. |
Custom |
withEnabledState(CustomRuleEnabledState enabledState)
Set describes if the custom rule is in enabled or disabled state. |
Custom |
withMatchConditions(List<MatchCondition> matchConditions)
Set list of match conditions. |
Custom |
withName(String name)
Set defines the name of the custom rule. |
Custom |
withPriority(int priority)
Set defines in what order this rule be evaluated in the overall list of custom rules. |
Methods inherited from java.lang.Object
Constructor Details
CustomRule
public CustomRule()
Method Details
action
public ActionType action()
Get describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'.
Returns:
enabledState
public CustomRuleEnabledState 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:
matchConditions
public List
Get list of match conditions.
Returns:
name
public String name()
Get defines the name of the custom rule.
Returns:
priority
public int priority()
Get defines in what order this rule be evaluated in the overall list of custom rules.
Returns:
withAction
public CustomRule withAction(ActionType action)
Set describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'.
Parameters:
Returns:
withEnabledState
public CustomRule withEnabledState(CustomRuleEnabledState enabledState)
Set describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'Disabled', 'Enabled'.
Parameters:
Returns:
withMatchConditions
public CustomRule withMatchConditions(List
Set list of match conditions.
Parameters:
Returns:
withName
public CustomRule withName(String name)
Set defines the name of the custom rule.
Parameters:
Returns:
withPriority
public CustomRule withPriority(int priority)
Set defines in what order this rule be evaluated in the overall list of custom rules.
Parameters:
Returns:
Applies to
Azure SDK for Java