全部产品
Search
文档中心

边缘安全加速:UpdateUserWafRuleset - 更新用户WAF规则集

更新时间:Jan 15, 2026

用于修改指定实例下的WAF规则集配置,包括位置、名称等信息。

接口说明

请求说明

  • 本接口允许用户对已有的 WAF 规则集进行更新操作,支持修改规则集的位置、名称、描述、状态以及表达式。

  • 只需传入需要修改的参数字段;如果某个参数不需要修改,则不必传递对应的参数 key。

  • 注意:确保在调用此 API 前已经获取了正确的InstanceIdId值,否则可能导致请求失败。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

esa:UpdateUserWafRuleset

none

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

InstanceId

string

实例 ID。

esa-xxxxxxx

Id

integer

WAF 规则集 ID。

10000001

Position

integer

WAF 规则集位置。

1

Name

string

WAF 规则集名称。

example

Description

string

WAF 规则集描述。

example

Status

string

WAF 规则集状态。

on

Expression

string

WAF 规则集表达式。

ip.src == 1.1.1.1

Shared WafBatchRuleShared

WAF 规则集共享配置。

Rules

array

WAF 规则集下的规则配置列表。

[ { "Id": 20000001, "Name": "rule1", "Expression": "ip.src eq 1.1.1.1", "Action": "deny" }

WafRuleConfig

WAF 规则集下的规则配置。

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

请求 ID。

xxxx-xxxx-xxxx-xxxx

示例

正常返回示例

JSON格式

{
  "RequestId": "xxxx-xxxx-xxxx-xxxx"
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidParameter The specified parameter is invalid. 输入参数规范校验失败。
400 InstanceNotExist The instance does not exist. Check whether the specified instance ID is correct or whether the instance belongs to your account. 实例不存在,请检查提供的实例ID是否正确或该实例是否属于您的账户。
400 InternalException Failed to call the service. Try again later or contact technical support. 调用服务失败,请稍后重试或联系客服咨询详情。
403 Rule.Config.Noncompliance The specified rule configuration does not meet the compliance requirements.Check and adjust your configurations. 指定的规则配置未满足既定的合规性标准。请检查规则设置,查找任何不符合或违反预期标准的差异,并进行必要的调整,以确保所有规则均得到正确验证。
403 Rule.Config.Malformed The format of the rule configuration is invalid.Check the configuration for syntax errors or structural inconsistencies and correct them to meet the requirements. 指定的规则配置格式错误或未按要求格式编写。请检查规则配置中是否存在语法错误或结构不一致,并予以纠正,以符合预期的配置架构。
403 %s.NotSupport The specified resource type %s is not supported. 不支持指定的资源类型。如需使用该类型资源,请与我们联系。
403 %s.OverQuota The quantity of %s exceeds the quota. 该资源的数量超出了配额所规定的范围,如需申请更多的额度,请与我们联系。
403 %s.WrongValueMatched The value of specified parameter %s can not pass the matching check. 指定的参数对应的值不能通过匹配校验。如果您确定需要使用该参数值,请与我们联系。
403 Ruleset.NotExist The specified rule set does not exist or has not been registered in the system.Check whether the specified rule set identifier is valid and matches a rule set that has been correctly defined and maintained by the system's rule set registry.If you want to add a new rule set, make sure that the creation and registration process is complete to bring the rule set into effect. 指定的规则集不存在或尚未在当前系统配置中注册。请确认规则集标识符是否正确,并且指向一个已经正确定义并在系统的规则集注册表中维护的规则集。如果该规则集是一个新实体,请确保其创建和注册的必要步骤已经成功执行,以便其可用。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情