创建服务器组
更新时间:2025-04-24
接口描述
本接口用于创建服务器组。
请求结构
Plain Text
1POST /v2/appblb/{blbId}/appservergroup?clientToken={clientToken} HTTP/1.1
2Host: bec.baidubce.com
3Authorization: authorization string
4
5{
6 "backendServerList": [
7 {
8 "instanceId": "",
9 "weight": 0
10 }
11 ],
12 "desc": "",
13 "name": ""
14}
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
blbId | blbId | path | true | string |
request | 创建服务器组请求 | body | true | CreateBlbServerGroupRequest |
backendServerList | 服务器组挂载的成员列表 | false | array | |
instanceId | 实例ID | true | string | |
weight | 权重,取值范围0~100 | true | integer | |
desc | 服务器组描述 | false | string | |
name | 服务器组名称 | true | string |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 参数说明 | 类型 |
---|---|---|
backendServerList | 服务器组挂载的成员列表 | array |
instanceId | 实例ID | string |
weight | 权重,取值范围0~100 | integer(int32) |
desc | 服务器组描述 | string |
id | 服务器组ID | string |
name | 服务器组名称 | string |
错误码
请参照错误返回章节的内容。
请求示例
Plain Text
1POST /v2/appblb/applb-cn-yangzhou-ix-zjri7zxx/appservergroup?clientToken=123456789 HTTP/1.1
2Host: bec.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4
5{
6 "backendServerList": [
7 {
8 "instanceId": "vm-gn1g0s9d-cn-yangzhou-ix-panxx",
9 "weight": 20
10 }
11 ],
12 "desc": "desctest",
13 "name": "name-test"
14}
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3Date: Wed, 08 Jul 2015 03:28:11 GMT
4x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
5Server: BWS
6
7{
8 "id": "svg-d4gyxqh",
9 "name": "name-test",
10 "desc": "desctest",
11 "backendServerList": [
12 {
13 "instanceId": "vm-gn1g0s9d-cn-yangzhou-ix-panxx",
14 "weight": 20
15 }
16 ]
17}