查询回收站实例列表
更新时间:2024-07-02
该接口用于查询处于回收站中的BCC实例列表。
请求结构
POST /v{version}/recycle/instance?clientToken={clientToken} HTTP/1.1
Host: bcc.bj.baidubce.com
Authorization: authorization string
{
"marker": "marker",
"maxKeys" : maxKeys,
"instanceId" : "instanceId",
"name": "name",
"paymentTiming": "paymentTiming",
"recycleBegin": "recycleBegin",
"recycleEnd": "recycleEnd"
}
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号。 |
clientToken | String | 是 | Query参数 | 幂等性Token,是一个长度不超过64位的ASCII字符串,详见 幂等性。 |
marker | String | 否 | RequestBody参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 |
maxKeys | int | 否 | RequestBody参数 | 每页包含的最大数量,最大数量通常不超过1000,缺省值为1000。 |
instanceId | String | 否 | RequestBody参数 | 虚机Id |
name | String | 否 | RequestBody参数 | 虚机名称 |
paymentTiming | String | 否 | RequestBody参数 | 支付方式,包括包年包月(Prepaid)和按量付费(Postpaid) |
recycleBegin | String | 否 | RequestBody参数 | 查询进入回收站时间大于等于该起始时间,格式yyyy-MM-ddTHH:mm:ssZ |
recycleEnd | String | 否 | RequestBody参数 | 查询进入回收站时间小于等于该终止时间,格式yyyy-MM-ddTHH:mm:ssZ |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
marker | String | 标记查询的起始位置 |
isTruncated | boolean | true表示后面还有数据,false表示已经是最后一页 |
nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 |
maxKeys | int | 每页包含的最大数量 |
instances | List<ResourceBo> | 虚机列表信息,详见ResourceBo |
请求示例
POST http://bcc.bj.baidubce.com/v2/recycle/instance?clientToken=3A8d84403d-a94b-40ce-9d6a-f6225dd26676
Host: bcc.bj.baidubce.com
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
{
"recycleBegin":"2023-03-20T00:00:00Z",
"recycleEnd":"2023-03-22T00:00:00Z"
}
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Wed, 08 Jul 2015 03:28:11 GMT
x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
Server: BWS
{
"marker": "",
"isTruncated": false,
"maxKeys": 1000,
"instances": [
{
"id": "i-4sWEnqCC",
"serialNumber": "a16ae78f-2d98-4037-b71f-b36a99e313ad",
"name": "instance-g2ug3wrz",
"recycleTime": "2023-03-20T19:57:59Z",
"deleteTime": "2023-03-27T19:57:59Z",
"paymentTiming": "Prepaid",
"serviceName": "云服务器",
"serviceType": "BCC",
"configItem": {
"cpu": 1,
"memory": 1,
"type": "N6",
"specId": "ic5",
"spec": "bcc.ic5.c1m1",
"zoneName": "cn-bj-a"
},
"configItems": [
"cpu:1",
"memory:1",
"type:N6",
"specId:ic5",
"spec: bcc.ic5.c1m1",
"zoneName: cn-bj-a"
]
},
{
"id": "i-Cygj2uN7",
"serialNumber": "b3d58c5b-c0f6-44d4-bca7-afb7b78b2fb4",
"name": "instance-3yce4ts0",
"recycleTime": "2023-03-20T19:57:49Z",
"deleteTime": "2023-03-27T19:57:50Z",
"paymentTiming": "Prepaid",
"serviceName": "云服务器",
"serviceType": "BCC",
"configItem": {
"cpu": 1,
"memory": 1,
"type": "N6",
"specId": "ic5",
"spec": "bcc.ic5.c1m1",
"zoneName": "cn-bj-a"
},
"configItems": [
"cpu:1",
"memory:1",
"type:N6",
"specId:ic5",
"spec: bcc.ic5.c1m1",
"zoneName: cn-bj-a"
]
}
]
}