UpdateServerGroupAttribute_应用型负载均衡_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.

接口说明

UpdateServerGroupAttribute 接口属于异步接口,即系统返回一个请求 ID,但该服务器组的配置尚未更新成功,系统后台的更新任务仍在进行。您可以调用 ListServerGroups 查询服务器组的配置的更新状态:

  • 当服务器组的配置处于 Configuring 状态时,表示服务器组的配置正在更新中。
  • 当服务器组的配置处于 Available 状态时,表示服务器组的配置更新成功。

流控信息

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

授权信息

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

具体说明如下:展开详情

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

请求参数

字段名称字段详情
ServerGroupNamestring

服务器组名称。展开详情

示例值:test参考取值来源:
    CreateServerGroup
    ListServerGroups
Schedulerstring

调度算法。取值:展开详情

示例值:Wrr
ClientTokenstring

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

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

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

示例值:true
HealthCheckConfigobject

健康检查相关配置结构体。

StickySessionConfigobject

会话保持配置结构体

ServerGroupIdstring

服务器组 ID。

示例值:sgp-atstuj3rtop****参考取值来源:
    ListServerGroups
    CreateServerGroup
    AddServersToServerGroup
UpstreamKeepaliveEnabledboolean

是否开启后端长连接。展开详情

ServiceNamestring

仅适用于 ALB Ingress 场景,表示服务器组对应的K8s Service名称。

示例值:test2
UchConfigobject

url 一致性 hash 参数配置。

ConnectionDrainConfigobject

连接优雅中断相关配置。展开详情

SlowStartConfigobject

慢启动相关配置。展开详情

CrossZoneEnabledboolean

服务器组是否开启跨 AZ 负载均衡。取值:展开详情

示例值:true

返回参数

字段名称字段详情
JobIdstring

异步任务 ID。

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

请求 ID。

示例值:365F4154-92F6-4AE4-92F8-7FF3*****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
IncorrectStatus.ServerGroup
The status of %s [%s] is incorrect.诊断
400
Mismatch.LoadBalancerEditionAndConnectionDrain
The %s and %s are mismatched.诊断
400
Mismatch.ServerGroupSchedulerAndSlowStartEnable
The %s and %s are mismatched.诊断
400
QuotaExceeded.ConnectionDrainTimeout
The quota of %s is exceeded, usage %s/%s.诊断
400
UnsupportedFeature.ConnectionDrain
The feature of %s is not supported.诊断
400
QuotaExceeded.SlowStartDuration
The quota of %s is exceeded, usage %s/%s.诊断
400
UnsupportedFeature.SlowStart
The feature of %s is not supported.诊断
400
Mismatch.LoadBalancerEditionAndSlowStartEnable
The %s and %s are mismatched.诊断
400
OperationDenied.UpstreamKeepaliveDisabled
The operation is not allowed because of UpstreamKeepaliveDisabled.诊断
400
OperationDenied.UpstreamKeepaliveEnabled
The operation is not allowed because of UpstreamKeepaliveEnabled.诊断
400
CloseUpstreamKeepaliveNotSupport
The param of UpstreamKeepalive is not Support.诊断
404
ResourceNotFound.ServerGroup
The specified resource %s is not found.诊断

变更历史

变更时间变更内容概要操作
2024-11-28
变更错误码400
新增请求参数CrossZoneEnabled
2024-02-23
变更错误码400
新增请求参数ConnectionDrainConfig
新增请求参数SlowStartConfig
2023-11-03
新增请求参数UpstreamKeepaliveEnabled
2023-04-11
新增请求参数UchConfig

相关示例

创建一个服务器组并进行查询,然后向该服务器组添加服务器
2021-09-26
2024年08月20日