建立虛擬伺服器組並向指定的伺服器組中添加後端伺服器。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
slb:CreateVServerGroup |
create |
Instance
*LoadBalancer
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Tag |
array<object> |
否 |
標籤列表。 |
|
|
object |
否 |
標籤列表。 |
||
| Key |
string |
否 |
資源的標籤鍵。N 的取值範圍:1~20。一旦輸入該值,則不允許為空白字串。 最多支援 64 個字元,不能以 |
TestKey |
| Value |
string |
否 |
資源的標籤值。N 的取值範圍:1~20。一旦輸入該值,可以為空白字串。
最多支援 128 個字元,不能以 |
TestValue |
| RegionId |
string |
是 |
傳統型負載平衡地區 ID。 |
cn-hangzhou |
| LoadBalancerId |
string |
是 |
傳統型Server Load Balancer執行個體 ID。 |
lb-bp1qjwo61pqz3ahl****** |
| VServerGroupName |
string |
否 |
虛擬伺服器組名稱。 長度限制為 1~80 個字元,支援中文、字母、數字、短劃線(-)、正斜線(/)、英文句點(.)和底線(_)。 |
Group1 |
| 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-cige6****** |
| RequestId |
string |
請求 ID。 |
9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C |
| 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-cige6******",
"RequestId": "9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
"BackendServers": {
"BackendServer": [
{
"Type": "eni",
"Weight": 100,
"Description": "後端伺服器組",
"Port": 70,
"ServerId": "eni-hhshhs****"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | LBNotSupportIpv6Backend | The specified loadbalancer does not support ipv6 backend. | |
| 400 | Mismatched.ZoneId | The zone of the server is not matched with the cloud box loadbalancer. | |
| 400 | InvalidBackendServers.ServerIpConflict | %s. | |
| 400 | OperationUnsupported.CreateVServerGroup | 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 | NetworkConflict | %s. | |
| 400 | InvalidParam.TagValue | %s. | |
| 400 | InvalidParam.TagKey | %s. | |
| 400 | SizeLimitExceeded.Tag | %s. | |
| 400 | MissingParam.TagKey | The param MissingParam.TagKey is missing. | |
| 400 | VpcSystemBusy | Invoke vpc system busy, please retry later. | |
| 400 | OperationFailed.Endpoint | The operation failed because of the RegionId is unavailable in this endpoint. | |
| 403 | UnauthorizedRegion | The specified region of is not authorized. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。