Adjust reserved instance
Updated at:2025-10-20
This API allows for the adjustment of reserved instances.
- Simultaneous modification of the availability zone and reserved instance name is not supported.
Request structure
Plain Text
1PUT /v{version}/instance/reserved/modify HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "reservedInstances": [
6 {
7 "reservedInstanceId": "reservedInstanceId",
8 "zoneName": "zoneName",
9 "ehcClusterId": "ehcClusterId"
10 }
11 ]
12}
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number |
| clientToken | String | No | Query | Idempotence Token, which is an ASCII string with a length not exceeding 64 bits. For details, see the [Link](#ClientToken Idempotency Support) |
| reservedInstanceId | String | Yes | requestBody parameters | ID of reserved instance to be adjusted |
| zoneName | String | No | requestBody parameters | Specify the target availability zone for adjustment, such as "cn-bj-b". Simultaneously modifying the reservedInstanceName is not supported. |
| reservedInstanceName | String | No | requestBody parameters | Provide the instance name to be adjusted. Rules: It supports uppercase and lowercase letters, numbers, Chinese characters, and special characters (-_ /.). The name must start with a Chinese character or a letter, have a length of 1-65 characters, and can be repeated. If not named by the user, it will default to "reservedInstance-${randomly generated}" following the same naming rules. Simultaneous modification of zoneName is not supported. |
| ehcClusterId | String | No | requestBody parameters | Optional for changing a RoCE reserved instance; if empty, the default EHC cluster will be used. |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| modifyReservedInstanceOrders | Array | Return collection for adjusting reserved instances |
| reservedInstanceId | String | Reserved instance IDs |
| orderId | String | Order ID for changing reserved instance |
Error codes
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| BadRequest | request is invalid | 400 | Invalid request parameters |
Request example
Plain Text
1PUT http://bcc.bj.baidubce.com/v2/instance/reserved/modify
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4
5{
6 "reservedInstances": [
7 {
8 "reservedInstanceId": "r-yeeVFWyn",
9 "zoneName": "cn-bj-b"
10 }
11 ]
12}
Response example
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{
9 "modifyReservedInstanceOrders": [
10 {
11 "reservedInstanceId": "test_b0e3d7387d0b",
12 "orderId": "test_5cf7663b10de"
13 }
14 ]
15}
