CreateWafRuleset - 创建WAF规则集

创建WAF规则集。

调试

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

授权信息

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

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
esa:CreateWafRulesetcreate
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}

请求参数

名称类型必填描述示例值
SiteIdlong

站点 ID,可通过调用 ListSites 接口获取。

1
SiteVersioninteger

站点版本。

0
Phasestring

WAF 运行阶段。

枚举值:
  • http_whitelist白名单规则
  • http_custom自定义规则
  • http_managed托管规则
  • http_anti_scan扫描防护规则
  • http_ratelimit频次控制规则
  • http_bot高级模式Bots
http_custom
Namestring

规则集名称。

example

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求 ID。

36af3fcc-43d0-441c-86b1-428951dc8225
Idlong

规则集 ID。

10000001

示例

正常返回示例

JSON格式

{
  "RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
  "Id": 10000001
}

错误码

HTTP status code错误码错误信息描述
400InvalidParameterThe specified parameter is invalid.输入参数规范校验失败。
400InternalExceptionFailed to call the service. Try again later or contact technical support.调用服务失败,请稍后重试或联系客服咨询详情。
400SpecifiedVersionReadOnlyThe specified version number is read-only and cannot be modified.指定的版本号为只读版本, 无法修改版本配置。
403%s.NotSupportThe specified resource type %s is not supported.不支持指定的资源类型。如需使用该类型资源,请与我们联系。
403%s.OverQuotaThe quantity of %s exceeds the quota.该资源的数量超出了配额所规定的范围,如需申请更多的额度,请与我们联系。
403%s.WrongValueMatchedThe value of specified parameter %s can not pass the matching check.指定的参数对应的值不能通过匹配校验。如果您确定需要使用该参数值,请与我们联系。
403Expression.InvalidThe specified expression is invalid: %s.指定的表达式是无效的。
403Site.NotExistThe specified website does not exist or is not recognized by the system.Check whether the specified website identifier is valid and matches a website that is active, defined, and recognized by the system.If you want to add a new website, make sure that the creation and registration process is complete to integrate the website to the system.指定的站点不存在或当前未被系统识别。请检查站点标识符是否准确,并确保它与一个已定义、当前活跃且在系统公认的站点网络中可访问的站点相匹配。如果该站点是预定新增的,请确保已完成适当的创建或注册流程,以将其整合到系统中。

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