实例替换安全组
更新时间:2025-05-16
接口说明
实例替换安全组
请求结构
JSON
1PUT /v{version}/securitygroup/replace?clientToken={clientToken} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "securityGroupType" : "securityGroupType",
6 "instanceIds" : ["instanceIds"],
7 "securityGroupIds" : [ "securityGroupIds"]
8}
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 参数类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
instanceIds | List<String> | 是 | RequestBody | 待替换的虚机的短id列表 |
securityGroupIds | List<String> | 是 | RequestBody | 待替换的安全组的短id列表 |
securityGroupType | String | 是 | RequestBody | 待替换的安全组类型(enterprise/normal) |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 参数类型 | 描述 |
---|---|---|
requestId | String | 请求Id |
请求示例
JSON
1PUT /v2/securitygroup/replace HTTP/1.1
2Host: bcc.bj.baidubce.com
3ContentType: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
5{
6 "instanceIds":["i-LO8XGmwh","i-leK97Gff"],
7 "securityGroupIds":["esg-r8dz9yhm57kk"],
8 "securityGroupType":"enterprise"
9}
响应示例
JSON
1HTTP/1.1 200 OK
2Date: Wed, 03 Dec 2014 06:42:19 GMT
3Content-Type: application/json;charset=UTF-8
4Server: BWS
5{
6 "requestId": "9142e4e7-6e21-42bb-9494-6a60fe321e09"
7}