Early Release of Prepaid Instances
Updated at:2025-10-20
This API is used to release a single subscribed (prepaid) cloud server instance. Once released, the physical resources are reclaimed, and all related data will be permanently lost and cannot be recovered.
For details on prepaid release refund rules, please see Refund Instructions
Request structure
Plain Text
1 POST /v{version}/instance/delete HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
4 {
5 "instanceId": instanceId,
6 "relatedReleaseFlag": relatedReleaseFlag,
7 "deleteCdsSnapshotFlag":deleteCdsSnapshotFlag,
8 "deleteRelatedEnisFlag" : deleteRelatedEnisFlag
9 }
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 |
| instanceId | String | Yes | URL parameter | Instance ID |
| relatedReleaseFlag | boolean | No | RequestBody | Specify whether to release the EIPs and data disks attached to the instance at the same time. Default: false, meaning associated resources will not be released. Note: Prepaid CDS disks linked to the instance will be forcibly released along with the instance. |
| deleteCdsSnapshotFlag | boolean | No | RequestBody | Determine whether to release cloud disk server snapshots. Default: false, meaning associated resources will not be released. |
| deleteRelatedEnisFlag | boolean | No | RequestBody | Determine whether to delete the associated ENI when an instance is released. Default: false, meaning associated resources will not be deleted. |
Response headers
There are no special headers required beyond the common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| successResources | [InstanceDeleteResultModel](BCC/API Reference/Appendix.md#InstanceDeleteResultModel) | Collection of successfully deleted resources |
| failResources | [InstanceDeleteResultModel](BCC/API Reference/Appendix.md#InstanceDeleteResultModel) | Collection of failed deletion resources |
| instanceRefundFlag | boolean | Whether the instance was successfully released |
Error codes
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| Instance.DeletionProtection | Instance can not release with DeletionProtection. | 403 | Releasing virtual machines under deletion protection is not allowed |
| InsufficientCreditException | Insufficient user refund quota | 400 | Insufficient quota for user refunds |
Request example
Plain Text
1POST /v2/instance/delete 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 "instanceId": "instanceId",
7 "relatedReleaseFlag": true,
8 "deleteCdsSnapshotFlag":true,
9 "deleteRelatedEnisFlag" : true
10}
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
6{
7 "successResources": {
8 "instanceId": "instanceId",
9 "eip": "eipId",
10 "insnapIds": ["insnapId1", "insnapId2"],
11 "snapshotIds": ["snapshotId1", "snapshotId2"],
12 "volumeIds": ["volumeId1", "volumeId2"]
13 },
14 "failResources": {
15 "instanceId": "",
16 "eip": "",
17 "insnapIds": ["insnapId3"],
18 "snapshotIds": ["snapshotId3"],
19 "volumeIds": ["volumeId3"]
20 },
21 "instanceRefundFlag": true
22 }
