waf__CreatePunishmentRule
Creates a WAF attack punishment rule within a protection policy, specifying the punishment category and block duration to control responses to detected attacks.
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": {
"block_time": "<block_time>",
"category": "<category>",
"policy_id": "<policy_id>",
"project_id": "<project_id>"
},
"name": "waf__CreatePunishmentRule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | 攻击惩罚类别 | |
| policy_id | Yes | 防护策略id,您可以通过调用查询防护策略列表(ListPolicy)获取策略id | |
| block_time | Yes | 拦截时间,如果选择前缀为long的攻击惩罚类别,则block_time时长范围设置为301-1800;选择前缀为short的攻击惩罚类别,则block_time时长范围为0-300之间 | |
| project_id | Yes | 项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID | |
| description | No | 规则描述 | |
| enterprise_project_id | No | 您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id |