批量更新转发规则属性。
接口说明
UpdateRulesAttribute 接口属于异步接口,即系统返回一个请求 ID,但该转发规则属性尚未批量更新成功,系统后台的更新任务仍在进行。您可以调用 ListRules 查询转发规则属性的更新状态:
-
当多条转发规则属性处于 Configuring 状态时,表示转发规则属性正在批量更新中。
-
当多条转发规则属性处于 Available 状态时,表示转发规则属性批量更新成功。
-
一条转发规则最多支持添加的条件数(RuleConditions)和动作数(RuleActions)如下:
条件数:基础版 5 条,标准版 10 条,WAF 增强版 10 条。
动作数:基础版 3 条,标准版 5 条,WAF 增强版 5 条。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
alb:UpdateRulesAttribute |
update |
*LoadBalancer
*ServerGroup
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 由客户端生成该参数值,要保证在不同请求间唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-42665544*** |
Rules |
array<object> |
是 |
转发规则列表 |
|
array<object> |
是 |
转发规则 |
||
Priority |
integer |
否 |
转发规则优先级 |
80 |
RuleName |
string |
否 |
转发规则名称 |
rule_111 |
RuleActions |
array |
否 |
转发规则动作列表 |
|
array<object> |
是 |
转发规则动作 |
||
FixedResponseConfig |
object |
否 |
返回固定内容动作配置 |
|
Content |
string |
否 |
内容 |
dssacav |
ContentType |
string |
否 |
内容类型 |
text/plain |
HttpCode |
string |
否 |
HTTP 响应码 |
200 |
ForwardGroupConfig |
object |
否 |
转发组动作配置 |
|
ServerGroupTuples |
array |
否 |
转发到的目的服务器组列表 |
|
object |
否 |
转发到的目的服务器组 |
||
ServerGroupId |
string |
否 |
服务器组标识 |
sgp-3kbj35ay7cvi****** |
Weight |
integer |
否 |
权重 |
100 |
ServerGroupStickySession |
object |
否 |
服务器组之间会话保持 |
|
Enabled |
boolean |
否 |
是否开启会话保持 |
true |
Timeout |
integer |
否 |
超时时间 |
100 |
InsertHeaderConfig |
object |
否 |
插入头部动作配置 |
|
CoverEnabled |
boolean |
否 |
是否覆盖请求中的值 |
False |
Key |
string |
否 |
HTTP 标头 |
key |
Value |
string |
否 |
HTTP 标头内容 |
value |
ValueType |
string |
否 |
取值类型 |
SystemDefined |
Order |
integer |
是 |
优先级 |
1 |
RedirectConfig |
object |
否 |
重定向动作配置 |
|
Host |
string |
否 |
要跳转的主机地址 |
test.alb.com |
HttpCode |
string |
否 |
跳转方式 |
301 |
Path |
string |
否 |
要跳转的路径 |
/ |
Port |
string |
否 |
要跳转的端口 |
443 |
Protocol |
string |
否 |
要跳转的协议 |
HTTPS |
Query |
string |
否 |
要跳转的查询字符串 |
${query} |
RewriteConfig |
object |
否 |
内部重定向动作配置 |
|
Host |
string |
否 |
主机名 |
${host} |
Path |
string |
否 |
路径 |
/ |
Query |
string |
否 |
查询 |
${query} |
Type |
string |
是 |
转发规则动作类型 |
ForwardGroup |
TrafficLimitConfig |
object |
否 |
流量限速 |
|
QPS |
integer |
否 |
每秒请求次数。 |
1000 |
PerIpQps |
integer |
否 |
单 IP 每秒请求次数。 |
100 |
TrafficMirrorConfig |
object |
否 |
流量镜像 |
|
TargetType |
string |
否 |
镜像目标类型 |
ForwardGroupMirror |
MirrorGroupConfig |
object |
否 |
镜像至服务器组 |
|
ServerGroupTuples |
array |
否 |
流量镜像至服务器组。 |
|
object |
否 |
流量镜像至服务器组。 |
||
ServerGroupId |
string |
否 |
服务器组 ID。 |
sgp-vlnjo1rhw0vc****** |
RemoveHeaderConfig |
object |
否 |
去除 HTTP 标头 |
|
Key |
string |
否 |
HTTP 标头键 |
key |
CorsConfig |
object |
否 |
跨域 |
|
AllowOrigin |
array |
否 |
允许的访问来源 |
|
string |
否 |
允许的访问来源 |
* |
|
AllowMethods |
array |
否 |
选择跨域访问时允许的 HTTP 方法 |
|
string |
否 |
选择跨域访问时允许的 HTTP 方法。取值:
|
GET |
|
AllowHeaders |
array |
否 |
允许跨域的 Header 列表 |
|
string |
否 |
允许跨域的 Header |
test |
|
ExposeHeaders |
array |
否 |
允许暴露的 Header 列表 |
|
string |
否 |
允许暴露的 Header |
test |
|
AllowCredentials |
string |
否 |
是否允许携带凭证信息 |
off |
MaxAge |
integer |
否 |
预检请求在浏览器的最大缓存时间 |
60 |
RuleConditions |
array |
否 |
转发规则条件列表 |
|
array<object> |
是 |
转发规则条件 |
||
CookieConfig |
object |
否 |
Cookie 条件配置 |
|
Values |
array |
否 |
Cookie 键值对列表 |
|
object |
否 |
Cookie 键值对 |
||
Key |
string |
否 |
Cookie 条件键 |
key |
Value |
string |
否 |
Cookie 条件值 |
value |
HeaderConfig |
object |
否 |
HTTP 标头条件配置 |
|
Key |
string |
否 |
HTTP 标头键 |
key |
Values |
array |
否 |
HTTP 标头值列表 |
|
string |
否 |
HTTP 标头值 |
value |
|
HostConfig |
object |
否 |
主机名条件配置 |
|
Values |
array |
否 |
主机名列表 |
|
string |
否 |
主机名 |
www.example.com |
|
MethodConfig |
object |
否 |
HTTP 请求方法条件配置 |
|
Values |
array |
否 |
HTTP 请求方法列表 |
|
string |
否 |
HTTP 请求方法 |
PUT |
|
PathConfig |
object |
否 |
查询字符串条件配置 |
|
Values |
array |
否 |
路径条件列表 |
|
string |
否 |
路径条件 |
/test |
|
QueryStringConfig |
object |
否 |
查询字符串条件配置 |
|
Values |
array |
否 |
查询字符串条件键值对列表 |
|
object |
否 |
查询字符串条件键值对 |
||
Key |
string |
否 |
查询字符串条件键 |
account |
Value |
string |
否 |
查询字符串条件值 |
on |
ResponseHeaderConfig |
object |
否 |
返回 HTTP 标头 |
|
Key |
string |
否 |
返回 HTTP 标头键 |
test |
Values |
array |
否 |
返回 HTTP 标头值 |
|
string |
否 |
返回 HTTP 标头值 |
value |
|
ResponseStatusCodeConfig |
object |
否 |
返回状态码条件 |
|
Values |
array |
否 |
返回状态码条件 |
|
string |
否 |
返回状态码条件 |
200 |
|
Type |
string |
否 |
条件类型 |
Header |
SourceIpConfig |
object |
否 |
基于源 IP 业务流量匹配 |
|
Values |
array |
否 |
添加一个或多个 IP 地址或者 IP 地址段。 |
|
string |
否 |
添加一个或多个 IP 地址或者 IP 地址段。 |
192.168.1.1 |
|
RuleId |
string |
是 |
转发规则 ID |
rule-n4hfecmmtmfl****** |
DryRun |
boolean |
否 |
是否只预检此次请求,取值:
|
false |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
Schema of Response |
||
RequestId |
string |
请求 ID。 |
365F4154-92F6-4AE4-92F8-7FF34B540710 |
JobId |
string |
异步任务 ID。 |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
示例
正常返回示例
JSON
格式
{
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | OperationDenied.IpGroupCanNotUsedForMirrorAction | The operation is not allowed because of %s. | 操作被拒绝,原因是%s。 |
400 | IncorrectStatus.Rule | The status of %s [%s] is incorrect. | 转发规则的当前状态不支持本次操作。 |
400 | OperationDenied.SameGroupForForwardAndMirrorAction | The operation is not allowed because of %s. | 操作被拒绝,原因是%s。 |
400 | OperationDenied.GRPCServerGroup | The operation is not allowed because of %s. | 操作被拒绝,原因是存在绑定本GRPC服务器组的监听没有启用HTTP2.0。 |
400 | Conflict.Priority | There is already %s having the same configuration with %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. | 配额%s已超额度限制,目前已使用%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. | 配额%s已超额度限制,目前已使用%s,配额为%s。 |
400 | Mismatch.Protocol | The %s is mismatched for %s and %s. | %s在%s和%s中不匹配。 |
400 | Mismatch.VpcId | The %s is mismatched for %s and %s. | %s在%s和%s中不匹配。 |
400 | OperationDenied.ServiceManagedResource | The operation is not allowed because the current resource of %s is managed resource. | 操作被拒绝,原因是资源%s为托管资源。 |
400 | OperationDenied.ListenerIdInconsistent | The operation is not allowed because of ListenerIdInconsistent. | 操作被拒绝,原因是当前转发规则属于不同的监听。 |
400 | IllegalParam.Priority | The param of Priority is illegal. | 参数Priority非法 |
400 | OperationDenied.MirrorActionSupportHttpGroupOnly | The operation is not allowed because of MirrorActionSupportHttpGroupOnly. | 操作被拒绝,原因是流量镜像动作只支持HTTP类型的服务器组。 |
400 | OperationDenied.ProtocolMustSameForForwardGroupAction | The operation is not allowed because of ProtocolMustSameForForwardGroupAction. | 操作被禁止,原因:必须是相同的协议 |
404 | ResourceNotFound.Rule | The specified resource %s is not found. | 资源%s不存在。 |
404 | ResourceNotFound.ServerGroup | The specified resource %s is not found. | 后端服务器组不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。