public static final class ConfigWebCCRuleV2Request.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
ConfigWebCCRuleV2Request |
build() |
ConfigWebCCRuleV2Request.Builder |
domain(String domain)
This parameter is required.
|
ConfigWebCCRuleV2Request.Builder |
expires(Long expires)
Expires.
|
ConfigWebCCRuleV2Request.Builder |
regionId(String regionId)
RegionId.
|
ConfigWebCCRuleV2Request.Builder |
ruleList(String ruleList)
The frequency control rule.
|
public ConfigWebCCRuleV2Request.Builder regionId(String regionId)
public ConfigWebCCRuleV2Request.Builder domain(String domain)
This parameter is required.
example:public ConfigWebCCRuleV2Request.Builder expires(Long expires)
public ConfigWebCCRuleV2Request.Builder ruleList(String ruleList)
The frequency control rule. This parameter is a JSON string that contains the following fields:
action: the action that is performed if the rule is matched. This field is required and must be of the string type. Valid values:
name: the name of the rule. This field is required and must be of the string type.
condition: the match conditions. This field is required and must be of the map type. This field contains the following parameters:
**
Note The AND logical operator is used to evaluate multiple match conditions.
field: the match field. This field is required and must be of the string type.
match_method: the logical relation. This field is required and must be of the string type.
**
Note For information about the mappings between the field and match_method parameters, see the "Mappings between the field and match_method parameters" section of this topic.
header_name: the name of the custom HTTP header. This field is optional and must be of the string type.
**
Note This field is required only when field is set to header.
content: the match content. This field is required and must be of the string type.
ratelimit: the frequency control field. This field is optional and must be of the string type. The frequency can be measured based on IP addresses or custom headers. This field contains the following parameters:
status_code: the frequency control field. This field is optional and must be of the string type. Frequency control can be performed based on the quantity or percentage of status codes. This field contains the following parameters:
statistics: specifies whether deduplication is used for statistics. This field is optional and must be of the string type. By default, deduplication is not used for statistics. This field contains the following parameters:
mode: specifies whether deduplication is used for status code statistics. This field is required and must be of the string type. Valid values:
field: the statistical source. This field is required and must be of the string type. Valid values: ip, header, and uri.
header_name: the name of the header. This field is optional and must be of the string type. This field is required only when field is set to header.
This parameter is required.
example:[{"action":"block","name":"trdsss","ratelimit":{"interval":60,"ttl":300,"threshold":70,"target":"ip"},"condition":[{"field":"ip","match_method":"belong","content":"1.1.1.1"}]}]
public ConfigWebCCRuleV2Request build()
Copyright © 2026. All rights reserved.