Instance Resizing (By Specifying Instance Package Specification)
Updated at:2025-10-20
This API is used to scale the configuration of a specified BCC instance up or down, currently supporting CPU and memory adjustments by updating the instance's package specifications.
- Scaling operations can only be executed when the instance is in the running or stopped status
- Scaling an instance will trigger an automatic reboot once. Please complete necessary preparations in advance to avoid disrupting operations.
Request structure
Plain Text
1PUT /v{version}/instanceBySpec/{instanceId}?{action}&clientToken={clientToken} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "spec": spec,
6 "enableJumboFrame": enableJumboFrame
7}
Request headers No special headers beyond common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number |
| instanceId | String | Yes | URL parameter | Instance ID |
| action | String | Yes | Query | Operation performed on the instance, current value: resize |
| clientToken | String | Yes | Query | Idempotence Token, which is an ASCII string with a length not exceeding 64 bits. For details, see the [Link](#ClientToken Idempotency Support) |
| spec | String | Yes | Request Body parameters | Target instance specification |
| enableJumboFrame | Boolean | No | Request Body parameters | Indicates whether Jumbo frames are enabled for the instance. True means enabled, and false means disabled. The default is empty. If left empty: When resizing to a specification that does not support Jumbo frames, they will not be enabled; when resizing from a specification that does not support Jumbo frames to one that does, they will also not be enabled; when resizing between specifications that support Jumbo frames, if they were enabled before resizing, they will stay enabled, and if they were not enabled, they will stay disabled. |
Response headers No special headers beyond common headers.
Response parameters There are no special response parameters
Error codes
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| BadRequest | Bad request parameters or illegal request. | 400 | Invalid request parameters |
| Instance.InstanceBeBanned | The instance is banned, contact technical support for assistance. | 403 | Banned |
| NoSuchObject | The specified object is not found or resource do not exist. | 404 | Resource does not exist |
| OperationDenied | Operation not available. | 409 | Operation not allowed |
Request example
Plain Text
1PUT /v2/instanceBySpec/i-YufwpQAe?resize&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fb***
4{
5 "spec": bcc.ic3.c2m2
6}
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Wed, 03 Dec 2014 06:42:19 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
