waf__CreatePrivacyRule
Create a privacy masking rule in a WAF policy to hide specified fields from logs. Define the protected URL, field category, and field name to keep sensitive data out of logs.
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": {
"category": "<category>",
"index": "<index>",
"policy_id": "<policy_id>",
"project_id": "<project_id>",
"url": "<url>"
},
"name": "waf__CreatePrivacyRule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | 隐私屏蔽规则防护的url,需要填写标准的url格式,例如/admin/xxx或者/admin/*,以"*"(星号)结尾代表路径前缀 | |
| index | Yes | 屏蔽字段名,根据“屏蔽字段”设置字段名,被屏蔽的字段将不会出现在日志中。屏蔽字段名的长度不能超过2048字节,且只能由数字、字母、下划线和中划线组成。 | |
| category | Yes | 屏蔽字段 | |
| policy_id | Yes | 防护策略id,您可以通过调用查询防护策略列表(ListPolicy)获取策略id | |
| project_id | Yes | 项目ID,对应华为云控制台用户名->我的凭证->项目列表->项目ID | |
| description | No | 规则描述,可选参数,设置该规则的备注信息。 | |
| enterprise_project_id | No | 您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id |