waf__CreateCustomRule
Create a precise WAF protection rule in a policy with custom match conditions, priority, action, and effective time.
Instructions
[WAF] 创建精准防护规则
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>",
"name": "<name>",
"policy_id": "<policy_id>",
"priority": "<priority>",
"project_id": "<project_id>",
"time": "<time>"
},
"name": "waf__CreateCustomRule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 规则名称 | |
| time | Yes | 精准防护规则生效时间: | |
| start | No | 精准防护规则生效的起始时间戳(秒)。当time=true,才需要填写该参数。 | |
| action | Yes | 精准防护规则命中后操作对象 | |
| priority | Yes | 执行该规则的优先级,值越小,优先级越高,值相同时,规则创建时间早,优先级越高。取值范围:0到1000。 | |
| terminal | No | 精准防护规则生效的终止时间戳(秒)。当time=true,才需要填写该参数。 | |
| policy_id | Yes | 防护策略id,通过指定防护策略id来指明查询该防护策略下的防护规则,您可以通过调用查询防护策略列表(ListPolicy)获取策略id | |
| conditions | Yes | 匹配条件列表 | |
| project_id | Yes | 项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID | |
| description | No | 规则描述 | |
| enterprise_project_id | No | 您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id |