替換虛擬伺服器組中的後端伺服器。
介面說明
該介面只用於替換虛擬伺服器組中的後端伺服器,如果您需要修改後端伺服器的權重等配置,請參見 SetVServerGroupAttribute 。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
slb:ModifyVServerGroupBackendServers |
update |
*instance
*loadbalancer
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
Server Load Balancer執行個體的地區 ID。 |
cn-hangzhou |
| VServerGroupId |
string |
是 |
伺服器組 ID。 |
rsp-cige6j**** |
| OldBackendServers |
string |
否 |
要被替換的後端伺服器列表,包含以下參數:
說明
只有效能保障型執行個體支援添加 eni 和 eci 類型的後端伺服器。
樣本說明如下:
說明
必須是狀態為運行中的後端伺服器才可以加入Server Load Balancer執行個體,每次調用最多可添加 20 個後端伺服器。 |
[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }] |
| NewBackendServers |
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-6B08****** |
| BackendServers |
object |
||
| BackendServer |
array<object> |
後端伺服器列表。 |
|
|
object |
後端伺服器列表。 |
||
| Type |
string |
後端伺服器類型,取值:
|
ecs |
| Weight |
integer |
後端伺服器的權重。 |
100 |
| Description |
string |
後端伺服器描述。 |
後端伺服器描述。 |
| Port |
integer |
後端伺服器使用的連接埠。 |
70 |
| ServerId |
string |
ECS 執行個體 ID 或 ENI 的執行個體 ID。 |
i-bp1ge5hrp**** |
樣本
正常返回樣本
JSON格式
{
"VServerGroupId": "rsp-cige6j****",
"RequestId": "9DEC9C28-AB05-4DDF-9A78-6B08******",
"BackendServers": {
"BackendServer": [
{
"Type": "ecs",
"Weight": 100,
"Description": "後端伺服器描述。",
"Port": 70,
"ServerId": "i-bp1ge5hrp****"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | The specified BackendServers contain duplicated value of ServerID and Port. | 指定的後端伺服器包含重複的服務ID和連接埠值。 |
| 400 | Mismatched.ZoneId | The zone of the server is not matched with the cloud box loadbalancer. | 當前伺服器的可用性區域與雲盒執行個體可用性區域不匹配。 |
| 400 | InvalidBackendServers.ServerIpConflict | %s. | 存在相同TunnelId和RsIp配置的後端伺服器。 |
| 400 | OperationUnsupported.ModifyVServerGroupBackendServers | This type of backend server is not allowed to attached to singleTunnel or anyTunnel lb. | 這種類型的後端伺服器不允許附加到 singleTunnel 或 anyTunnel lb。 |
| 400 | IncorrectStatus.RSByPassToas | %s. | 指定後端伺服器的BypassToa配置無效。 |
| 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. | 操作失敗,原因是指定Server Load Balancer執行個體關聯的Cen資訊缺失。 |
| 400 | IncorrectStatus.CenNotAssociated | The action is invalid because the loadbalancer is not associated with cen. | 該操作無效,因為當前Server Load Balancer執行個體未與cen關聯。 |
| 400 | InvalidBackendServers.MissingCenBandWidth | The bandwidth is missing between loadbalancer and backendServers in cen. | Cen中的Server Load Balancer執行個體所在的地區和掛載的目標地區之間要有頻寬包。 |
| 400 | InvalidBackendServers.VpcNotInCen | The BackendServers is not in the cen associated with the loadbalancer. | 後端伺服器不在與負載平衡關聯的cen中。 |
| 400 | InvalidServerId.NotExist | The specified ServerId is not exist. | 指定的後端伺服器不存在。 |
| 400 | MissingParameter.ServerRegionId | The parameter ServerRegionId is required. | 參數ServerRegionId缺失。 |
| 400 | MissingParameter.VbrId | The parameter VbrId is required. | 參數VbrId缺失。 |
| 400 | InvalidParameter.ServerRegionId | The parameter ServerRegionId is invalid for crossborder. | 指定的ServerRegionId無效。請檢查參數約束,並在修改後重試。 |
| 400 | InvalidVbrId.NotInCen | The VbrId is not in the cen associated with the loadbalancer. | 指定的Vbr不在執行個體關聯的Cen內。 |
| 400 | InvalidParameter.ZoneNotSupport | The zone does not support the parameter %s. | 當前可用性區域不支援指定參數。 |
| 400 | MasterSlaveServerConflict | The servers are conflict for MasterSlaveGroup. | 主備伺服器組的後端伺服器衝突。 |
| 400 | NetworkConflict | %s. | 虛擬伺服器組和ECS配置資訊不一致。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。