你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CustomRule 类

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

public class CustomRule

定义可包含在 waf 策略中的自定义规则的通用属性。

构造函数摘要

构造函数 说明
CustomRule()

方法摘要

修饰符和类型 方法和描述
ActionType action()

Get 描述规则匹配时要应用的操作。

CustomRuleEnabledState enabledState()

Get 描述自定义规则处于启用或禁用状态。

java.util.List<MatchCondition> matchConditions()

获取匹配条件的列表。

java.lang.String name()

Get 定义自定义规则的名称。

int priority()

Get 定义此规则在自定义规则总体列表中的评估顺序。

CustomRule withAction(ActionType action)

Set 描述规则匹配时要应用的操作。

CustomRule withEnabledState(CustomRuleEnabledState enabledState)

设置描述自定义规则处于启用或禁用状态。

CustomRule withMatchConditions(List<MatchCondition> matchConditions)

设置匹配条件的列表。

CustomRule withName(String name)

Set 定义自定义规则的名称。

CustomRule withPriority(int priority)

Set 定义此规则在自定义规则总体列表中的评估顺序。

方法继承自 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

构造函数详细信息

CustomRule

public CustomRule()

方法详细信息

action

public ActionType action()

Get 描述规则匹配时要应用的操作。 可能的值包括:“Allow”、“Block”、“Log”、“Redirect”。

Returns:

操作值

enabledState

public CustomRuleEnabledState enabledState()

Get 描述自定义规则处于启用或禁用状态。 如果未指定,则默认为 Enabled。 可能的值包括:“Disabled”、“Enabled”。

Returns:

enabledState 值

matchConditions

public List matchConditions()

获取匹配条件的列表。

Returns:

matchConditions 值

name

public String name()

Get 定义自定义规则的名称。

Returns:

名称值

priority

public int priority()

Get 定义此规则在自定义规则总体列表中的评估顺序。

Returns:

优先级值

withAction

public CustomRule withAction(ActionType action)

Set 描述规则匹配时要应用的操作。 可能的值包括:“Allow”、“Block”、“Log”、“Redirect”。

Parameters:

action - 要设置的操作值

Returns:

CustomRule 对象本身。

withEnabledState

public CustomRule withEnabledState(CustomRuleEnabledState enabledState)

设置描述自定义规则处于启用或禁用状态。 如果未指定,则默认为 Enabled。 可能的值包括:“Disabled”、“Enabled”。

Parameters:

enabledState - 要设置的 enabledState 值

Returns:

CustomRule 对象本身。

withMatchConditions

public CustomRule withMatchConditions(List matchConditions)

设置匹配条件的列表。

Parameters:

matchConditions - 要设置的 matchConditions 值

Returns:

CustomRule 对象本身。

withName

public CustomRule withName(String name)

Set 定义自定义规则的名称。

Parameters:

name - 要设置的名称值

Returns:

CustomRule 对象本身。

withPriority

public CustomRule withPriority(int priority)

Set 定义此规则在自定义规则总体列表中的评估顺序。

Parameters:

priority - 要设置的优先级值

Returns:

CustomRule 对象本身。

适用于