CreateRules_应用型负载均衡_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

调用该接口创建转发规则时,请注意以下事项:

  • 配置 Redirect 转发动作时,除了 HttpCode 参数外,其余参数不能都配置默认值。
  • 同一个转发规则配置多个转发动作时,Rewrite 转发动作必须配置 ForwardGroup 的动作类型。
  • CreateRules 接口属于异步接口,即系统返回一个实例 ID,但该多条转发规则尚未创建成功,系统后台的创建任务仍在进行。您可以调用 ListRules 查询多条转发规则的创建状态:
    • 当多条转发规则处于 Provisioning 状态时,表示多条转发规则正在创建中。
    • 当多条转发规则处于 Available 状态时,表示多条转发规则创建成功。
  • 一条转发规则最多支持添加的条件数(RuleConditions)和动作数(RuleActions)如下:
    • 条件数:基础版 5 条,标准版 10 条,WAF 增强版 10 条。
    • 动作数:基础版 3 条,标准版 5 条,WAF 增强版 5 条。

流控信息

请求速率为200/60(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
alb:CreateRules
Create
LoadBalancer
acs:alb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}

请求参数

字段名称字段详情
ListenerIdstring

应用型负载均衡实例监听 ID。

示例值:lsn-l16uo9y******参考取值来源:
    ListListeners
    CreateListener
ClientTokenstring

客户端 Token,用于保证请求的幂等性。展开详情

示例值:5A2CFF0E-5718-45B5-9D4D-70B3FF3898
DryRunboolean

是否只预检此次请求,取值:展开详情

示例值:false
Rulesarray<object>

转发规则列表

子级条数 <= 100子级条数 >= 1

返回参数

字段名称字段详情
JobIdstring

异步任务 ID。

示例值:72dcd26b-f12d-4c27-b3af-18f6aed5****
RequestIdstring

请求 ID。

示例值:365F4154-92F6-4AE4-92F8-7FF34B540710
RuleIdsarray<object>

转发规则列表。

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
IncorrectStatus.Listener
The status of %s [%s] is incorrect.诊断
400
OperationDenied.IpGroupCanNotUsedForMirrorAction
The operation is not allowed because of %s.诊断
400
OperationDenied.SameGroupForForwardAndMirrorAction
The operation is not allowed because of %s.诊断
400
OperationDenied.GRPCServerGroup
The operation is not allowed because of %s.诊断
400
Conflict.Priority
There is already %s having the same configuration with %s.诊断
400
ResourceQuotaExceeded.LoadBalancerRulesNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
ResourceQuotaExceeded.ServerGroupAttachedNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
ResourceQuotaExceeded.LoadBalancerServersNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
ResourceQuotaExceeded.ServerAddedNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
QuotaExceeded.RuleWildcardsNum
The quota of %s is exceeded, usage %s/%s.诊断
400
QuotaExceeded.RuleMatchEvaluationsNum
The quota of %s is exceeded, usage %s/%s.诊断
400
QuotaExceeded.RuleActionsNum
The quota of %s is exceeded, usage %s/%s.诊断
400
Mismatch.VpcId
The %s is mismatched for %s and %s.诊断
400
Mismatch.Protocol
The %s is mismatched for %s and %s.诊断
400
OperationDenied.RewriteMissingForwardGroup
The operation is not allowed because of RewriteMissingForwardGroup.诊断
400
OperationDenied.MirrorActionSupportHttpGroupOnly
The operation is not allowed because of MirrorActionSupportHttpGroupOnly.诊断
400
OperationDenied.ProtocolMustSameForForwardGroupAction
The operation is not allowed because of ProtocolMustSameForForwardGroupAction.诊断
404
ResourceNotFound.Listener
The specified resource %s is not found.诊断
404
ResourceNotFound.ServerGroup
The specified resource %s is not found.诊断

变更历史

变更时间变更内容概要操作
2024-12-11
变更请求参数Rules
2024-11-28
变更请求参数Rules
2024-09-23
变更请求参数Rules
2024-01-17
变更错误码400
2023-11-09
变更请求参数Rules
2021-03-02
变更请求参数Rules
  • 1
  • 2
  • 10 条/页

相关示例

批量创建和删除转发规则
2021-09-26
批量创建批量修改批量删除
2022-03-14
2024年08月20日