waf__UpdatePolicyRuleStatus
Enable or disable a single WAF policy rule by updating its status, such as turning off a specific precise protection rule. Use policy ID, rule ID, and rule type to target the rule.
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": {
"policy_id": "<policy_id>",
"project_id": "<project_id>",
"rule_id": "<rule_id>",
"ruletype": "<ruletype>"
},
"name": "waf__UpdatePolicyRuleStatus"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | 状态(开启:1,关闭:0) | |
| rule_id | Yes | 规则id,根据不同的规则类型(ruletype)调用规则列表接口获取规则id,例如黑白名单(whiteblackip)规则id,您可以通过调用查询黑白名单规则列表(ListWhiteblackipRule)获取规则id | |
| ruletype | Yes | 策略类型 | |
| policy_id | Yes | 策略id(策略id从查询防护策略列表接口获取) | |
| project_id | Yes | 项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID | |
| enterprise_project_id | No | 您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id |