你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
CustomRule 类
- java.
lang. Object - com.
microsoft. azure. management. cdn. CustomRule
- com.
public class CustomRule
定义可包含在 waf 策略中的自定义规则的通用属性。
构造函数摘要
构造函数 | 说明 | |
---|---|---|
CustomRule() |
方法摘要
修饰符和类型 | 方法和描述 |
---|---|
Action |
action()
Get 描述规则匹配时要应用的操作。 |
Custom |
enabledState()
Get 描述自定义规则处于启用或禁用状态。 |
java.util.List<Match |
matchConditions()
获取匹配条件的列表。 |
java.lang.String |
name()
Get 定义自定义规则的名称。 |
int |
priority()
Get 定义此规则在自定义规则总体列表中的评估顺序。 |
Custom |
withAction(ActionType action)
Set 描述规则匹配时要应用的操作。 |
Custom |
withEnabledState(CustomRuleEnabledState enabledState)
设置描述自定义规则处于启用或禁用状态。 |
Custom |
withMatchConditions(List<MatchCondition> matchConditions)
设置匹配条件的列表。 |
Custom |
withName(String name)
Set 定义自定义规则的名称。 |
Custom |
withPriority(int priority)
Set 定义此规则在自定义规则总体列表中的评估顺序。 |
方法继承自 java.lang.Object
构造函数详细信息
CustomRule
public CustomRule()
方法详细信息
action
public ActionType action()
Get 描述规则匹配时要应用的操作。 可能的值包括:“Allow”、“Block”、“Log”、“Redirect”。
Returns:
enabledState
public CustomRuleEnabledState enabledState()
Get 描述自定义规则处于启用或禁用状态。 如果未指定,则默认为 Enabled。 可能的值包括:“Disabled”、“Enabled”。
Returns:
matchConditions
public List
获取匹配条件的列表。
Returns:
name
public String name()
Get 定义自定义规则的名称。
Returns:
priority
public int priority()
Get 定义此规则在自定义规则总体列表中的评估顺序。
Returns:
withAction
public CustomRule withAction(ActionType action)
Set 描述规则匹配时要应用的操作。 可能的值包括:“Allow”、“Block”、“Log”、“Redirect”。
Parameters:
Returns:
withEnabledState
public CustomRule withEnabledState(CustomRuleEnabledState enabledState)
设置描述自定义规则处于启用或禁用状态。 如果未指定,则默认为 Enabled。 可能的值包括:“Disabled”、“Enabled”。
Parameters:
Returns:
withMatchConditions
public CustomRule withMatchConditions(List
设置匹配条件的列表。
Parameters:
Returns:
withName
public CustomRule withName(String name)
Set 定义自定义规则的名称。
Parameters:
Returns:
withPriority
public CustomRule withPriority(int priority)
Set 定义此规则在自定义规则总体列表中的评估顺序。
Parameters:
Returns:
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈