public class CustomRule extends AbstractModel
header, skipSign
Constructor and Description |
---|
CustomRule() |
CustomRule(CustomRule source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
SecurityAction |
getAction()
Get 自定义规则的执行动作。 SecurityAction 的 Name 取值支持:Deny:拦截;Monitor:观察;ReturnCustomPage:使用指定页面拦截;Redirect:重定向至 URL;BlockIP:IP 封禁;JSChallenge:JavaScript 挑战;ManagedChallenge:托管挑战;Allow:放行。
|
String |
getCondition()
Get 自定义规则的具体内容,需符合表达式语法,详细规范参见产品文档。
|
String |
getEnabled()
Get 自定义规则是否开启。取值有:on:开启off:关闭
|
String |
getId()
Get 自定义规则的 ID。
通过规则 ID 可支持不同的规则配置操作: - 增加新规则:ID 为空或不指定 ID 参数; - 修改已有规则:指定需要更新/修改的规则 ID; - 删除已有规则:CustomRules 参数中,Rules 列表中未包含的已有规则将被删除。 |
String |
getName()
Get 自定义规则的名称。
|
Long |
getPriority()
Get 自定义规则的优先级,范围是 0 ~ 100,默认为 0,仅支持精准匹配规则(PreciseMatchRule)。
|
String |
getRuleType()
Get 自定义规则的类型。取值有:BasicAccessRule:基础访问管控;PreciseMatchRule:精准匹配规则,默认;ManagedAccessRule:专家定制规则,仅出参。
默认为PreciseMatchRule。 |
void |
setAction(SecurityAction Action)
Set 自定义规则的执行动作。 SecurityAction 的 Name 取值支持:Deny:拦截;Monitor:观察;ReturnCustomPage:使用指定页面拦截;Redirect:重定向至 URL;BlockIP:IP 封禁;JSChallenge:JavaScript 挑战;ManagedChallenge:托管挑战;Allow:放行。
|
void |
setCondition(String Condition)
Set 自定义规则的具体内容,需符合表达式语法,详细规范参见产品文档。
|
void |
setEnabled(String Enabled)
Set 自定义规则是否开启。取值有:on:开启off:关闭
|
void |
setId(String Id)
Set 自定义规则的 ID。
通过规则 ID 可支持不同的规则配置操作: - 增加新规则:ID 为空或不指定 ID 参数; - 修改已有规则:指定需要更新/修改的规则 ID; - 删除已有规则:CustomRules 参数中,Rules 列表中未包含的已有规则将被删除。 |
void |
setName(String Name)
Set 自定义规则的名称。
|
void |
setPriority(Long Priority)
Set 自定义规则的优先级,范围是 0 ~ 100,默认为 0,仅支持精准匹配规则(PreciseMatchRule)。
|
void |
setRuleType(String RuleType)
Set 自定义规则的类型。取值有:BasicAccessRule:基础访问管控;PreciseMatchRule:精准匹配规则,默认;ManagedAccessRule:专家定制规则,仅出参。
默认为PreciseMatchRule。 |
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public CustomRule()
public CustomRule(CustomRule source)
public String getName()
public void setName(String Name)
Name
- 自定义规则的名称。public String getCondition()
public void setCondition(String Condition)
Condition
- 自定义规则的具体内容,需符合表达式语法,详细规范参见产品文档。public SecurityAction getAction()
public void setAction(SecurityAction Action)
Action
- 自定义规则的执行动作。 SecurityAction 的 Name 取值支持:public String getEnabled()
public void setEnabled(String Enabled)
Enabled
- 自定义规则是否开启。取值有:public String getId()
public void setId(String Id)
Id
- 自定义规则的 ID。public String getRuleType()
public void setRuleType(String RuleType)
RuleType
- 自定义规则的类型。取值有:public Long getPriority()
public void setPriority(Long Priority)
Priority
- 自定义规则的优先级,范围是 0 ~ 100,默认为 0,仅支持精准匹配规则(PreciseMatchRule)。Copyright © 2025. All rights reserved.