查询预期事件列表
更新时间:2025-11-17
该接口用于查询预期事件信息。
请求结构
Plain Text
1POST /?action={action}
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| action | String | 是 | Query参数 | 对实例执行的动作,本接口中该参数取值:DescribePlannedEvents |
| marker | String | 否 | RequestBody | 批量获取列表的查询的起始事件id |
| maxKeys | Integer | 否 | RequestBody | 每页包含的最大数量,最大数量通常不超过100,缺省值为10 |
| serverEventIds | List<String> | 否 | RequestBody | 维修事件的id列表 |
| instanceIds | List<String> | 否 | RequestBody | 虚机的短id列表 |
| productCategory | String | 否 | RequestBody | 故障实例产品类型 (BBC / BCC / HPAS) |
| serverEventType | String | 否 | RequestBody | 事件类型,支持类型:InstanceRepairBySystemFailureEvent,InstanceRepairOrFastRepairBySystemFailureEvent,LocalDiskInstanceRepairBySystemFailureEvent,LocalDiskInstanceRepairOrFastRepairBySystemFailureEvent |
| serverEventLogTimeFilter | String | 否 | RequestBody | 根据事件操作日志的类型查询periodStartTime和periodEndTime范围内的事件,支持类型:EventCreate、EventAuthorize、EventExecuting、RejectCheckResult |
| periodStartTime | String | 否 | RequestBody | timeFilter类型开始时间, 若为空则只按照periodEndTime限制,符合BCE规范的日期格式 |
| periodEndTime | String | 否 | RequestBody | timeFilter类型结束时间, 若为空则只按照periodStartTime限制,符合BCE规范的日期格式 |
| serverEventStatus | String | 否 | RequestBody | 事件状态,支持状态:Inquiring,Processing,Executing,Executed,Abnormal,DisConfirm |
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| requestId | String | 请求Id |
| isTruncated | Boolean | true表示后面还有数据,false表示已经是最后一页 |
| marker | String | 标记查询的起始位置 |
| maxKeys | Integer | 每页包含的最大数量 |
| nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 |
| plannedMaintenanceEvents | List<PlannedEventResponse> | 非预期事件列表 |
请求示例
Plain Text
1POST /?action=DescribePlannedEvents 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 "maxKeys":1
7}
返回示例
Plain Text
1```
2HTTP/1.1 200 OK
3x-bce-request-id: 8d9a70cb-f82d-44ac-a12f-8bfe130a5602
4Date: Wed, 03 Dec 2014 06:42:19 GMT
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7
8{
9 "requestId": "8d9a70cb-f82d-44ac-a12f-8bfe130a5602",
10 "isTruncated": true,
11 "marker": "",
12 "maxKeys": 1,
13 "nextMarker": "event-UaQsSXg2",
14 "plannedMaintenanceEvents": [
15 {
16 "serverEventId": "event-zE2IDo37",
17 "serverEventType": "CustomScheduleInstanceRebootEvent",
18 "serverEventStatus": "Processing",
19 "instanceId": "i-coGiCHZs",
20 "productCategory": "BCC",
21 "instanceSpec": null,
22 "instanceName": null,
23 "privateIp": null,
24 "tags": [],
25 "serverEventCreatedTime": "2025-10-29T09:18:28Z",
26 "serverEventEndedTime": null,
27 "maintenanceOptions": [
28 "Reboot"
29 ],
30 "supportMaintenanceOptions": [],
31 "authorizedMaintenanceOperation": "Repair",
32 "associatedPlannedMaintenanceServerEventIds": [],
33 "associatedUnplannedMaintenanceServerEventIds": [
34 "event-ATUOTTEJ"
35 ],
36 "executeTime": "2025-10-29T11:24:21Z",
37 "serverEventLogs": [
38 {
39 "name": "EventCreate",
40 "operator": "系统",
41 "operateTime": "2025-10-29T09:18:29Z"
42 },
43 {
44 "name": "EventAuthorize",
45 "operator": "用户",
46 "operateTime": "2025-10-29T11:24:33Z"
47 }
48 ],
49 "risks": [
50 {
51 "issueName": "issueName",
52 "issueAlias": null,
53 "issueEffect": "issueEffect",
54 "issueDescription": "issueDescription",
55 "issueOccurTime": "2025-02-17T20:16:31Z",
56 "issueSource": null
57 }
58 ]
59 }
60 ]
61}
62```
