Query recycle bin instance list
Updated at:2025-10-20
This API retrieves the list of BCC instances residing in the recycle bin.
Request structure
Plain Text
1POST /v{version}/recycle/instance?clientToken={clientToken} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "marker": "marker",
6 "maxKeys" : maxKeys,
7 "instanceId" : "instanceId",
8 "name": "name",
9 "paymentTiming": "paymentTiming",
10 "recycleBegin": "recycleBegin",
11 "recycleEnd": "recycleEnd"
12}
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number. |
| clientToken | String | Yes | Query | Idempotence Token, which is an ASCII string with a length not exceeding 64 bits. For details, see the [Idempotence ](BCC/API Reference/General Description.md#Idempotence). |
| marker | String | No | RequestBody | The starting position of the batch list query is a system-generated string |
| maxKeys | int | No | RequestBody | Maximum number of items per page: 1,000 (default: 1,000). |
| instanceId | String | No | RequestBody | Virtual machine ID |
| name | String | No | RequestBody | Virtual machine name |
| paymentTiming | String | No | RequestBody | Payment method, including subscription (prepaid) and pay-as-you-go (postpaid) |
| recycleBegin | String | No | RequestBody | Query instances that entered the recycle bin on or after this start time, format: yyyy-MM-ddTHH:mm:ssZ |
| recycleEnd | String | No | RequestBody | Query instances that entered the recycle bin on or before this end time, format: yyyy-MM-ddTHH:mm:ssZ. |
Response headers
There are no special headers required beyond the common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| marker | String | Mark the starting position of the query. |
| isTruncated | boolean | true indicates there is more data later, false indicates it is the last page |
| nextMarker | String | The marker value needed to fetch the next page. This field is absent when isTruncated is false. |
| maxKeys | int | Maximum number of items included per page |
| instances | List<[ResourceBo](BCC/API Reference/Appendix.md#ResourceBo)> | Virtual machine list information. For details, see [ResourceBo](BCC/API Reference/Appendix.md#ResourceBo) |
Request example
Plain Text
1POST http://bcc.bj.baidubce.com/v2/recycle/instance?clientToken=3A8d84403d-a94b-40ce-9d6a-f6225dd26676
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5 "recycleBegin":"2023-03-20T00:00:00Z",
6 "recycleEnd":"2023-03-22T00:00:00Z"
7}
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 "marker": "",
8 "isTruncated": false,
9 "maxKeys": 1000,
10 "instances": [
11 {
12 "id": "i-4sWEnqCC",
13 "serialNumber": "a16ae78f-2d98-4037-b71f-b36a99e313ad",
14 "name": "instance-g2ug3wrz",
15 "recycleTime": "2023-03-20T19:57:59Z",
16 "deleteTime": "2023-03-27T19:57:59Z",
17 "paymentTiming": "Prepaid",
18 "serviceName": "cloud server",
19 "serviceType": "BCC",
20 "configItem": {
21 "cpu": 1,
22 "memory": 1,
23 "type": "N6",
24 "specId": "ic5",
25 "spec": "bcc.ic5.c1m1",
26 "zoneName": "cn-bj-a"
27 },
28 "configItems": [
29 "cpu:1",
30 "memory:1",
31 "type:N6",
32 "specId:ic5",
33 "spec: bcc.ic5.c1m1",
34 "zoneName: cn-bj-a"
35 ]
36 },
37 {
38 "id": "i-Cygj2uN7",
39 "serialNumber": "b3d58c5b-c0f6-44d4-bca7-afb7b78b2fb4",
40 "name": "instance-3yce4ts0",
41 "recycleTime": "2023-03-20T19:57:49Z",
42 "deleteTime": "2023-03-27T19:57:50Z",
43 "paymentTiming": "Prepaid",
44 "serviceName": "cloud server",
45 "serviceType": "BCC",
46 "configItem": {
47 "cpu": 1,
48 "memory": 1,
49 "type": "N6",
50 "specId": "ic5",
51 "spec": "bcc.ic5.c1m1",
52 "zoneName": "cn-bj-a"
53 },
54 "configItems": [
55 "cpu:1",
56 "memory:1",
57 "type:N6",
58 "specId:ic5",
59 "spec: bcc.ic5.c1m1",
60 "zoneName: cn-bj-a"
61 ]
62 }
63 ]
64}
