向指定的虛擬伺服器組中添加後端伺服器。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
slb:AddVServerGroupBackendServers |
create |
Instance
*LoadBalancer
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
Server Load Balancer執行個體的地區 ID。 |
cn-hangzhou |
| VServerGroupId |
string |
是 |
虛擬伺服器組 ID。 |
rsp-cige6****** |
| BackendServers |
string |
是 |
要添加的後端伺服器列表,包含以下參數:
說明
只有效能保障型執行個體支援添加 eni 和 eci 類型的後端伺服器。
樣本說明如下:
說明
必須是狀態為運行中的後端伺服器才可以加入Server Load Balancer執行個體,每次調用最多可添加 20 個後端伺服器。 |
[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Port":"80","Description":"test-113" }] |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| VServerGroupId |
string |
虛擬伺服器組 ID。 |
rsp-cige6j****** |
| RequestId |
string |
請求 ID。 |
9DEC9C28-AB05-4DDF-9A78-6B****** |
| BackendServers |
object |
||
| BackendServer |
array<object> |
後端伺服器列表。 |
|
|
object |
後端伺服器列表。 |
||
| Type |
string |
後端伺服器類型,取值:
|
eni |
| Weight |
integer |
後端伺服器的權重。 |
100 |
| Description |
string |
後端伺服器組描述。 |
後端伺服器組 |
| Port |
integer |
後端伺服器使用的連接埠。 |
70 |
| ServerId |
string |
ECS 執行個體 ID 或者 ENI 的執行個體 ID。 |
eni-hhshhs**** |
樣本
正常返回樣本
JSON格式
{
"VServerGroupId": "rsp-cige6j******",
"RequestId": "9DEC9C28-AB05-4DDF-9A78-6B******",
"BackendServers": {
"BackendServer": [
{
"Type": "eni",
"Weight": 100,
"Description": "後端伺服器組",
"Port": 70,
"ServerId": "eni-hhshhs****"
}
]
}
}
異常返回樣本
JSON格式
{"Code":"InvalidParameter","Message":"The specified parameter is not valid.","HostId":"slb-pop.aliyuncs.com","RequestId":"0669D684-69D8-408E-A4FA-B9011E0F4E66"}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidBackendServers.ServerIpConflict | %s. | |
| 400 | Mismatched.ZoneId | The zone of the server is not matched with the cloud box loadbalancer. | |
| 400 | OperationUnsupported.AddVServerGroupBackendServers | This type of backend server is not allowed to attached to singleTunnel or anyTunnel lb. | |
| 400 | IncorrectStatus.RSByPassToas | %s. | |
| 400 | BackendServer.InvalidType | The specified Type is invalid. | |
| 400 | BackendServer.ServerRegionIdNotEqual | The specified ServerRegionId must be equal. | |
| 400 | OperationFailed.InvalidCen | The cen related with this loadbalancer is invalid. | |
| 400 | IncorrectStatus.CenNotAssociated | The action is invalid because the loadbalancer is not associated with cen. | |
| 400 | InvalidBackendServers.MissingCenBandWidth | The bandwidth is missing between loadbalancer and backendServers in cen. | |
| 400 | InvalidBackendServers.VpcNotInCen | The BackendServers is not in the cen associated with the loadbalancer. | |
| 400 | InvalidServerId.NotExist | The specified ServerId is not exist. | |
| 400 | MissingParameter.ServerRegionId | The parameter ServerRegionId is required. | |
| 400 | MissingParameter.VbrId | The parameter VbrId is required. | |
| 400 | InvalidParameter.ServerRegionId | The parameter ServerRegionId is invalid for crossborder. | |
| 400 | InvalidVbrId.NotInCen | The VbrId is not in the cen associated with the loadbalancer. | |
| 400 | InvalidParameter.ZoneNotSupport | The zone does not support the parameter %s. | |
| 400 | MasterSlaveServerConflict | The servers are conflict for MasterSlaveGroup. | |
| 400 | OperationFailed.ServiceGroupProcessing | The specified service group is processing. | |
| 400 | NetworkConflict | %s. | |
| 400 | SystemBusy | The system is busy. | |
| 400 | SignatureNonceUsed | Specified signature nonce was used already. | |
| 400 | VpcSystemBusy | Invoke vpc system busy, please retry later. | |
| 400 | OperationDeny.LbNotSupportIPv6Server | The specified loadbalancer does not support ipv6 server. | |
| 400 | OperationBusy | The operation is busy. | |
| 404 | ResourceNotFound.vServers | The specified enis %s does not exist. | |
| 404 | ResourceNotFound.Cen | The specified resource Cen %s not Exists. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。