批量更新弹性公网IP
更新时间:2024-12-30
接口描述
本接口用来批量更新弹性公网IP(EIP)。
请求结构
JSON
1PUT /v1/eip/batch/update{?clientToken} HTTP/1.1
2Host: bec.baidubce.com
3Authorization: authorization string
4
5{
6 "name": "test",
7 "newBandwidthInMbps": "newBandwidthInMbps",
8 "eipIds": ["ip-xxxxxxxx", "ip-xxxxxxxx"]
9}
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
eipIds | List<String> | 是 | Request Body参数 | 指定的EIP ID列表 |
name | String | 否 | Request Body参数 | EIP name |
newBandwidthInMbps | Integer | 否 | Request Body参数 | 公网带宽,单位为Mbps |
clientToken | String | 否 | Query参数 | 幂等性Token,是一个长度不超过64位的ASCII字符串 |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
result | Boolean | 操作是否成功,true表示成功;false表示失败 |
details | BecBatchUpdateEipResponse | 返回EIP对象列表 |
请求示例
JSON
1 PUT /v1/eip/batch/update{?clientToken} HTTP/1.1
2 Host: bec.baidubce.com
3 Authorization: authorization string
4
5{
6 "name": "test",
7 "eipIds": ["ip-nkr4m5jt"]
8}
返回示例
JSON
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50
3 Date: Thu, 16 Mar 2022 06:29:48 GMT
4 Content Type: application/json;charset=UTF 8
5 Server: BWS
6
7{
8 "result": true,
9 "details": {
10 "eipIds": [
11 "ip-nkr4m5jt"
12 ],
13 "errEipIds": []
14 }
15}
Modal对象定义
BecBatchUpdateEipResponse
参数名称 | 类型 | 描述 |
---|---|---|
eipIds | List<String> | 更新成功的弹性公网ID列表 |
errEipIds | List<String> | 更新失败的弹性公网ID列表 |