waf__UpdateCcRule
Updates an existing CC protection rule in Huawei Cloud WAF by rule ID, setting rate-limit conditions, thresholds, actions, and blocking periods within a policy.
Instructions
[WAF] 更新cc防护规则
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>",
"conditions": "<conditions>",
"limit_num": "<limit_num>",
"limit_period": "<limit_period>",
"mode": "<mode>",
"policy_id": "<policy_id>",
"project_id": "<project_id>",
"rule_id": "<rule_id>",
"tag_type": "<tag_type>"
},
"name": "waf__UpdateCcRule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | 需要防护的域名路径,当cc防护规则为标准模式(mode参数值为0)时,该参数必填。 | |
| mode | Yes | cc规则防护模式,对应console上的mode,现在只支持创建高级cc规则防护模式。 | |
| name | No | 规则名称 | |
| action | Yes | 请求次数限制到达后采取的防护动作 | |
| rule_id | Yes | ID of the cc rule. It can be obtained by calling the **ListCcRules** API. | |
| tag_type | Yes | 限速模式: | |
| limit_num | Yes | 限制频率,单位为次,范围为1~2147483647 | |
| lock_time | No | 阻断时间,单位为秒,范围为0~65535。当“防护动作”选择“阻断”时,可设置阻断后恢复正常访问页面的时间。 | |
| policy_id | Yes | 策略id(策略id从查询防护策略列表接口获取) | |
| tag_index | No | 用户标识,当限速模式为用户限速(cookie或header)时,需要传该参数。 | |
| conditions | Yes | cc规则防护规则限速条件,当cc防护规则为高级模式(mode参数值为1)时,该参数必填。 | |
| project_id | Yes | 项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID | |
| unlock_num | No | 放行频率,单位为次,范围为0~2147483647。只有当防护动作类型为dynamic_block时,才需要传该参数。 | |
| description | No | 规则描述 | |
| limit_period | Yes | 限速周期,单位为秒,范围1~3600 | |
| tag_condition | No | 用户标识,当限速模式为other时,需要传该参数。根据Referer(自定义请求访问的来源)字段区分单个Web访问者 | |
| domain_aggregation | No | 是否开启域名聚合统计。 | |
| region_aggregation | No | 是否开启全局计数。 | |
| enterprise_project_id | No | 您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id |