WEB应用防火墙 WAF-更新精准防护规则:请求示例

时间:2024-01-26 15:43:50

请求示例

修改项目id为project_id和防护策略id为policy_id的规则id为rule_id的精准防护策略规则。修改规则的名称为test55,精准防护规则命中后防护动作为拦截,执行该规则的优先级为50,匹配条件为header中发现demo2字段包含“demo“,精准防护规则生效时间为立即生效。

PUT https://{Endpoint}/v1/{project_id}/waf/policy/{policy_id}/custom/{rule_id}?

{
  "name" : "test55",
  "description" : "",
  "action" : {
    "category" : "block"
  },
  "priority" : 50,
  "conditions" : [ {
    "category" : "header",
    "logic_operation" : "contain",
    "index" : "demo2",
    "contents" : [ "demo" ]
  } ],
  "time" : false
}
support.huaweicloud.com/api-waf/UpdateCustomRule.html