CustomRule Class

  • java.lang.Object
    • com.microsoft.azure.management.cdn.CustomRule

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
ActionType action()

Get describes what action to be applied when rule matches.

CustomRuleEnabledState enabledState()

Get describes if the custom rule is in enabled or disabled state.

java.util.List<MatchCondition> 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.

CustomRule withAction(ActionType action)

Set describes what action to be applied when rule matches.

CustomRule withEnabledState(CustomRuleEnabledState enabledState)

Set describes if the custom rule is in enabled or disabled state.

CustomRule withMatchConditions(List<MatchCondition> matchConditions)

Set list of match conditions.

CustomRule withName(String name)

Set defines the name of the custom rule.

CustomRule 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

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

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:

the action value

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:

the enabledState value

matchConditions

public List matchConditions()

Get list of match conditions.

Returns:

the matchConditions value

name

public String name()

Get defines the name of the custom rule.

Returns:

the name value

priority

public int priority()

Get defines in what order this rule be evaluated in the overall list of custom rules.

Returns:

the priority value

withAction

public CustomRule withAction(ActionType action)

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.

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:

enabledState - the enabledState value to set

Returns:

the CustomRule object itself.

withMatchConditions

public CustomRule withMatchConditions(List matchConditions)

Set list of match conditions.

Parameters:

matchConditions - the matchConditions value to set

Returns:

the CustomRule object itself.

withName

public CustomRule withName(String name)

Set defines the name of the custom rule.

Parameters:

name - the name value to set

Returns:

the CustomRule object itself.

withPriority

public CustomRule withPriority(int priority)

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.

Applies to