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

接口说明

AddServersToServerGroup 接口属于异步接口,即系统返回一个请求 ID,但该后端服务器尚未添加成功,系统后台的添加任务仍在进行。

  1. 您可以调用 ListServerGroups 查询服务器组的状态:
  • 当服务器组处于 Configuring 状态时,表示服务器组正在变配中。
  • 当服务器组处于 Available 状态时,表示服务器组运行中。
  1. 您可以调用 ListServerGroupServers 查询后端服务器的状态:
  • 当后端服务器处于 Adding 状态时,表示后端服务器正在加入服务器组。
  • 当后端服务器处于 Available 状态时,表示后端服务器运行中。

流控信息

请求速率为200/60(s)。更多流控信息,请前往配额中心查看

授权信息

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

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
alb:AddServersToServerGroup
Create
ServerGroup
acs:alb:{#regionId}:{#accountId}:servergroup/{#servergroupId}
Instance
acs:alb:{#regionId}:{#accountId}:ecs/{#InstanceId}
NetworkInterface
acs:alb:{#regionId}:{#accountId}:eni/{#NetworkInterfaceId}
ContainerGroup
acs:alb:{#regionId}:{#accountId}:eci/{#ContainerGroupId}

请求参数

字段名称字段详情
ServerGroupIdstring

服务器组 ID。

示例值:sgp-atstuj3rtop****参考取值来源:
    ListServerGroups
    CreateServerGroup
Serversarray<object>

后端服务器列表, 单次调用最多支持添加 200 个服务器。

子级条数 <= 200子级条数 >= 1
ClientTokenstring

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

示例值:593B0448-D13E-4C56-AC0D-FDF0******
DryRunboolean

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

示例值:false

返回参数

字段名称字段详情
JobIdstring

异步任务 ID。

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

请求 ID。

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

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
ResourceQuotaExceeded.ServerAddedNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
IncorrectStatus.ServerGroup
The status of %s [%s] is incorrect.诊断
400
Conflict.BackendServer
There is already %s having the same configuration with %s.诊断
400
OperationDenied.VpcVportNotFound
The operation is not allowed because of %s.诊断
400
IncorrectStatus.Eni
The status of %s [%s] is incorrect.诊断
400
ResourceInUse.IP
The specified resource %s is in use.诊断
400
OperationDenied.NoAvailableVSwitch
The operation is not allowed because of %s.诊断
400
OperationDenied.VgwVipNotFound
The operation is not allowed because of %s.诊断
400
OperationDenied.CloudBox
The operation is not allowed because of %s.诊断
400
Mismatch.Type
The %s is mismatched for %s and %s.诊断
400
Mismatch.VpcId
The %s is mismatched for %s and %s.诊断
400
ResourceQuotaExceeded.LoadBalancerServersNum
The quota of %s is exceeded for resource %s, usage %s/%s.诊断
400
ResourceInConfiguring
The specified resource of %s is being configured. Please try again later.诊断
400
DuplicatedParam.BackendServer
The param of %s is duplicated.诊断
400
OperationDenied.EciNotSupportJobType
The operation is not allowed because of eci not support job type.诊断
400
IllegalParam.ServerIp
The param of ServerIp is illegal.诊断
400
Mismatch.ServerType
The %s is mismatched for %s and %s.诊断
400
ServiceUnavailable
The request has failed due to a temporary failure of the server.诊断
403
Forbidden.ServerGroup
Authentication has failed for ServerGroup.诊断
404
ResourceNotFound.ServerGroup
The specified resource %s is not found.诊断
404
ResourceNotFound.Ecs
The specified resource %s is not found.诊断
404
ResourceNotFound.Eci
The specified resource %s is not found.诊断
404
ResourceNotFound.Eni
The specified resource %s is not found.诊断

变更历史

变更时间变更内容概要操作
2024-01-29
变更错误码400
2024-01-29
变更错误码400
2024-01-29
变更错误码400
2024-01-24
变更错误码400
2024-01-23
变更错误码400
2024-01-17
变更错误码400
新增错误码403
  • 1
  • 2
  • 10 条/页

相关示例

创建一个服务器组并进行查询,然后向该服务器组添加服务器
2021-09-26
替换后端服务器组中的后端服务器(移除已经存在的,添加不存在的)
2021-12-15
2024年08月20日