You need to enable JavaScript to run this app.
导航

ModifyServerGroupBackendServers

最近更新时间2024.02.29 14:48:19

首次发布时间2022.05.20 22:33:57

API 说明

API 名称:ModifyServerGroupBackendServers。
API 域名:open.volcengineapi.com 。
API 描述:修改指定服务器组内的后端服务器。

使用限制

节流限制:每秒最多提交 5 个 API 请求。

快速调试

URI 参数

在使用该部分 API 提交请求时必须包含以下 URI 参数。

除了 URI 参数,该 API 请求还需要包含签名参数。关于更多签名参数的信息,参见公共请求参数

名称类型是否必选格式说明
Action
string
[a-zA-Z]+
API 名称,如 ModifyServerGroupBackendServers。
VersionstringYYYY-MM-DDAPI 版本信息。该参数的取值是 2020-04-01 。
X-Expiresint900表示签名的有效时间,单位是秒,默认值是900。

请求正文

在使用该 API 提交请求时,请求正文中可以包含的参数如下。

参数类型是否必选参数说明示例值
ServerGroupId
String
后端服务器组ID。
rsp-bp1o94dp5i6ea********
ServersArray修改服务器的相关信息。详见下表 Servers-

Servers

参数类型是否必选参数说明示例值
Servers.N.ServerId
List of Struct

后端服务器ID。

  • - N:表示后端服务器的序号。取值范围为1 ~ 20。
  • 多个后端服务器ID间使用“&”分隔。
Servers.1.ServerId=rs-3tm2xa50h63vj0x0********&Servers.2.ServerId=rs-l8u2az8md58lltkk********
Servers.N.Weight

List of Struct

后端服务器的权重,取值:0 ~ 100。

  • 如果权重设置为0,表示不会将请求转发给该后端服务器。
  • - N:表示后端服务器的序号。取值范围为1 ~ 20。
Servers.1.Weight=100&Servers.2.Weight=100
Servers.N.Port

List of Struct

后端服务器接收请求的端口号,取值:1-65535。
- N:表示后端服务器的序号。取值范围为1 ~ 20。

Servers.1.Port=88&Servers.2.Port=443
Servers.N.Description

List of Struct

后端服务器描述。

  • - N:表示后端服务器的序号。取值范围为1 ~ 20。
  • 必须以字母或中文开头,可包含数字、英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。
  • 长度限制为1 ~ 255个字符。
Servers.1.Description=ecs1&Servers.2.Description=ecs2

响应正文

参数类型参数说明示例值
RequestId
String
请求ID。
20210811152539010225146063030****

示例

请求示例

GET /?Action=ModifyServerGroupBackendServers&ServerGroupId=rsp-1g1f1g8rwii****uxxxn4h9n&Servers.1.ServerId=rs-3tm2xa50h63vj0x0****&Servers.1.Port=12&Servers.1.Weight=2&Version=2020-04-01 HTTP/1.1
Host: open.volcengineapi.com
Region: cn-beijing
ServiceName: alb

响应示例

{
    "ResponseMetadata": {
        "RequestId": "20210816110638****2514606306AF947C",
        "Action": "ModifyServerGroupBackendServers",
        "Version": "2020-04-01",
        "Service": "alb",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "202108161106****22514606306AF947C",
    }
}

错误码

如果响应正文包含 Error 字段,则表示 API 请求失败。此处仅展示当前 API 的错误码,更多错误码请参见公共错误码

HTTP Code

错误码

错误信息

错误描述

400

OperationDenied.AccountArrears

The request on the specified resource is denied due to the account being in arrears status.

因账号处于欠费状态,对于该资源的操作请求被拒绝。

400

LimitExceed.BackendServer

You've reached the limit on the number of backend servers that you can operate at a time.

已达到单次可操作的后端服务器的数量上限。

400InvalidIndexOrder.MalformedThe specified index order is malformed.指定的索引顺序参数格式不合法。

400

InvalidServers.Weight.Malformed

The specified Servers.Weight is malformed.

指定的 Servers.Weight 参数格式不合法。

400InvalidServers.Port.MalformedThe specified Servers.Port is malformed.指定的 Servers.Port 参数格式不合法。
400InvalidServers.Description.MalformedThe specified Servers.Description is malformed.指定的 Servers.Description 参数格式不合法。

400

InvalidServers.ServerId.Duplicated

The specified Servers.ServerId is duplicated.

指定的 Servers.ServerId 重复。

400

InvalidServers.Port.Duplicated

The specified Servers.Port is duplicated.

指定的服务器端口重复。

400InvalidLoadBalancer.InvalidStatusThe related LoadBalancer is not in the correct status for the request.关联的 ALB 实例所处状态无法响应该请求。

400

InvalidServerGroup.InvalidStatus

The specified ServerGroup is not in the correct status for the request.

指定的服务器组所处状态无法响应该请求。

404InvalidServerGroup.NotFoundThe specified ServerGroup does not exist.指定的服务器组不存在。
404InvalidBackendServer.NotFoundThe specified BackendServer does not exist.指定的后端服务器不存在。
409InvalidServers.Port.ConflictThe specified Servers.Port already exists.指定的服务器端口已存在。