public class RateLimitingRule extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| RateLimitingRule() | 
| RateLimitingRule(RateLimitingRule 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 精准速率限制的处置方式。取值有:Monitor:观察;Deny:拦截,其中DenyActionParameters.Name支持Deny和ReturnCustomPage;Challenge:挑战,其中ChallengeActionParameters.Name支持JSChallenge和ManagedChallenge;Redirect:重定向至URL; | 
| String | getActionDuration()Get Action 动作的持续时长,单位仅支持:s:秒,取值 1 ~ 120;m:分钟,取值 1 ~ 120;h:小时,取值 1 ~ 48;d:天,取值 1 ~ 30。 | 
| String | getCondition()Get 精准速率限制的具体内容,需符合表达式语法,详细规范参见产品文档。 | 
| String[] | getCountBy()Get 速率阈值请求特征的匹配方式, 当 Enabled 为 on 时,此字段必填。 当条件有多个时,将组合多个条件共同进行统计计算,条件最多不可超过5条。取值有: http.request.ip:客户端 IP;http.request.xff_header_ip:客户端 IP(优先匹配 XFF 头部);http.request.uri.path:请求的访问路径;http.request.cookies['session']:名称为session的Cookie,其中session可替换为自己指定的参数;http.request.headers['user-agent']:名称为user-agent的HTTP头部,其中user-agent可替换为自己指定的参数;http.request.ja3:请求的JA3指纹;http.request.uri.query['test']:名称为test的URL查询参数,其中test可替换为自己指定的参数。 | 
| String | getCountingPeriod()Get 统计的时间窗口,取值有:1s:1秒;5s:5秒;10s:10秒;20s:20秒;30s:30秒;40s:40秒;50s:50秒;1m:1分钟;2m:2分钟;5m:5分钟;10m:10分钟;1h:1小时。 | 
| String | getEnabled()Get 精准速率限制规则是否开启。取值有:on:开启;off:关闭。 | 
| String | getId()Get 精准速率限制的 ID。 通过规则 ID 可支持不同的规则配置操作: 增加新规则:ID 为空或不指定 ID 参数;修改已有规则:指定需要更新/修改的规则 ID;删除已有规则:RateLimitingRules 参数中,Rules 列表中未包含的已有规则将被删除。 | 
| Long | getMaxRequestThreshold()Get 精准速率限制在时间范围内的累计拦截次数,取值范围 1 ~ 100000。 | 
| String | getName()Get 精准速率限制的名称。 | 
| Long | getPriority()Get 精准速率限制的优先级,范围是 0 ~ 100,默认为 0。 | 
| void | setAction(SecurityAction Action)Set 精准速率限制的处置方式。取值有:Monitor:观察;Deny:拦截,其中DenyActionParameters.Name支持Deny和ReturnCustomPage;Challenge:挑战,其中ChallengeActionParameters.Name支持JSChallenge和ManagedChallenge;Redirect:重定向至URL; | 
| void | setActionDuration(String ActionDuration)Set Action 动作的持续时长,单位仅支持:s:秒,取值 1 ~ 120;m:分钟,取值 1 ~ 120;h:小时,取值 1 ~ 48;d:天,取值 1 ~ 30。 | 
| void | setCondition(String Condition)Set 精准速率限制的具体内容,需符合表达式语法,详细规范参见产品文档。 | 
| void | setCountBy(String[] CountBy)Set 速率阈值请求特征的匹配方式, 当 Enabled 为 on 时,此字段必填。 当条件有多个时,将组合多个条件共同进行统计计算,条件最多不可超过5条。取值有: http.request.ip:客户端 IP;http.request.xff_header_ip:客户端 IP(优先匹配 XFF 头部);http.request.uri.path:请求的访问路径;http.request.cookies['session']:名称为session的Cookie,其中session可替换为自己指定的参数;http.request.headers['user-agent']:名称为user-agent的HTTP头部,其中user-agent可替换为自己指定的参数;http.request.ja3:请求的JA3指纹;http.request.uri.query['test']:名称为test的URL查询参数,其中test可替换为自己指定的参数。 | 
| void | setCountingPeriod(String CountingPeriod)Set 统计的时间窗口,取值有:1s:1秒;5s:5秒;10s:10秒;20s:20秒;30s:30秒;40s:40秒;50s:50秒;1m:1分钟;2m:2分钟;5m:5分钟;10m:10分钟;1h:1小时。 | 
| void | setEnabled(String Enabled)Set 精准速率限制规则是否开启。取值有:on:开启;off:关闭。 | 
| void | setId(String Id)Set 精准速率限制的 ID。 通过规则 ID 可支持不同的规则配置操作: 增加新规则:ID 为空或不指定 ID 参数;修改已有规则:指定需要更新/修改的规则 ID;删除已有规则:RateLimitingRules 参数中,Rules 列表中未包含的已有规则将被删除。 | 
| void | setMaxRequestThreshold(Long MaxRequestThreshold)Set 精准速率限制在时间范围内的累计拦截次数,取值范围 1 ~ 100000。 | 
| void | setName(String Name)Set 精准速率限制的名称。 | 
| void | setPriority(Long Priority)Set 精准速率限制的优先级,范围是 0 ~ 100,默认为 0。 | 
| 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, toJsonStringpublic RateLimitingRule()
public RateLimitingRule(RateLimitingRule source)
public String getId()
public void setId(String Id)
Id - 精准速率限制的 ID。public String getName()
public void setName(String Name)
Name - 精准速率限制的名称。public String getCondition()
public void setCondition(String Condition)
Condition - 精准速率限制的具体内容,需符合表达式语法,详细规范参见产品文档。public String[] getCountBy()
public void setCountBy(String[] CountBy)
CountBy - 速率阈值请求特征的匹配方式, 当 Enabled 为 on 时,此字段必填。public Long getMaxRequestThreshold()
public void setMaxRequestThreshold(Long MaxRequestThreshold)
MaxRequestThreshold - 精准速率限制在时间范围内的累计拦截次数,取值范围 1 ~ 100000。public String getCountingPeriod()
public void setCountingPeriod(String CountingPeriod)
CountingPeriod - 统计的时间窗口,取值有:public String getActionDuration()
public void setActionDuration(String ActionDuration)
ActionDuration - Action 动作的持续时长,单位仅支持:public SecurityAction getAction()
public void setAction(SecurityAction Action)
Action - 精准速率限制的处置方式。取值有:public Long getPriority()
public void setPriority(Long Priority)
Priority - 精准速率限制的优先级,范围是 0 ~ 100,默认为 0。public String getEnabled()
public void setEnabled(String Enabled)
Enabled - 精准速率限制规则是否开启。取值有:Copyright © 2025. All rights reserved.