CustomRule Class
- java.
lang. Object - com.
azure. resourcemanager. cdn. models. CustomRule
- com.
Implements
public class CustomRule
implements JsonSerializable<CustomRule>
Defines the common attributes for a custom rule that can be included in a waf policy.
Constructor Summary
Constructor | Description |
---|---|
CustomRule() |
Creates an instance of Custom |
Method Summary
Modifier and Type | Method and Description |
---|---|
Action |
action()
Get the action property: Describes what action to be applied when rule matches. |
Custom |
enabledState()
Get the enabled |
static
Custom |
fromJson(JsonReader jsonReader)
Reads an instance of Custom |
List<Match |
matchConditions()
Get the match |
String |
name()
Get the name property: Defines the name of the custom rule. |
int |
priority()
Get the priority property: Defines in what order this rule be evaluated in the overall list of custom rules. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Custom |
withAction(ActionType action)
Set the action property: Describes what action to be applied when rule matches. |
Custom |
withEnabledState(CustomRuleEnabledState enabledState)
Set the enabled |
Custom |
withMatchConditions(List<MatchCondition> matchConditions)
Set the match |
Custom |
withName(String name)
Set the name property: Defines the name of the custom rule. |
Custom |
withPriority(int priority)
Set the priority property: 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()
Creates an instance of CustomRule class.
Method Details
action
public ActionType action()
Get the action property: Describes what action to be applied when rule matches.
Returns:
enabledState
public CustomRuleEnabledState enabledState()
Get the enabledState property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
Returns:
fromJson
public static CustomRule fromJson(JsonReader jsonReader)
Reads an instance of CustomRule from the JsonReader.
Parameters:
Returns:
Throws:
matchConditions
public List
Get the matchConditions property: List of match conditions.
Returns:
name
public String name()
Get the name property: Defines the name of the custom rule.
Returns:
priority
public int priority()
Get the priority property: Defines in what order this rule be evaluated in the overall list of custom rules.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAction
public CustomRule withAction(ActionType action)
Set the action property: Describes what action to be applied when rule matches.
Parameters:
Returns:
withEnabledState
public CustomRule withEnabledState(CustomRuleEnabledState enabledState)
Set the enabledState property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
Parameters:
Returns:
withMatchConditions
public CustomRule withMatchConditions(List
Set the matchConditions property: List of match conditions.
Parameters:
Returns:
withName
public CustomRule withName(String name)
Set the name property: Defines the name of the custom rule.
Parameters:
Returns:
withPriority
public CustomRule withPriority(int priority)
Set the priority property: Defines in what order this rule be evaluated in the overall list of custom rules.
Parameters:
Returns: