設定後端伺服器權重。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
slb:SetBackendServers |
update |
instance
*loadbalancer
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
否 |
傳統型Server Load Balancer執行個體的地區 ID。 |
cn-hangzhou |
| LoadBalancerId |
string |
是 |
傳統型Server Load Balancer執行個體 ID。 |
lb-bp1qjwo61pqz3a****** |
| 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 |
|||
| LoadBalancerId |
string |
傳統型Server Load Balancer執行個體 ID。 |
lb-bp1qjwo61pqz3a****** |
| RequestId |
string |
請求 ID。 |
365F4154-92F6-4AE4-92F8-7F****** |
| BackendServers |
object |
||
| BackendServer |
array<object> |
後端伺服器列表。 |
|
|
object |
後端伺服器列表。 |
||
| Type |
string |
後端伺服器類型,取值:
|
eni |
| Weight |
string |
後端伺服器的權重。 |
100 |
| Description |
string |
後端伺服器描述。 |
後端伺服器 |
| ServerId |
string |
後端伺服器 ID。 |
eni-hhshhs**** |
樣本
正常返回樣本
JSON格式
{
"LoadBalancerId": "lb-bp1qjwo61pqz3a******",
"RequestId": "365F4154-92F6-4AE4-92F8-7F******",
"BackendServers": {
"BackendServer": [
{
"Type": "eni",
"Weight": "100",
"Description": "後端伺服器",
"ServerId": "eni-hhshhs****"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Mismatched.ZoneId | The zone of the server is not matched with the cloud box loadbalancer. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。