華為云計算 云知識 查詢云服務(wù)器操作行為列表NovaListServerActions
查詢云服務(wù)器操作行為列表NovaListServerActions

 

功能介紹

查詢彈性 云服務(wù)器 的所有歷史操作,顯示操作行為列表。

調(diào)試

您可以在API Explorer中調(diào)試該接口。

URI

GET /v2.1/{project_id}/servers/{server_id}/os-instance-actions

參數(shù)說明請參見表1。
表1 路徑參數(shù)

參數(shù)

是否必選

描述

project_id

項目ID。

獲取方法請參見獲取項目ID

server_id

云服務(wù)器ID。

表2 查詢參數(shù)

參數(shù)

是否必選

描述

limit

查詢返回server action數(shù)量限制。

微版本2.58及以上版本支持。

marker

從marker指定的server action的下一條數(shù)據(jù)開始查詢,取值為request_id。

微版本2.58及以上版本支持。

changes-since

根據(jù)server action的更新時間過濾返回結(jié)果。

格式符合ISO 8601,CCYY-MM-DDThh:mm:ss+/-hh:mm。

例如:2018-01-17T03:03:32Z 。

微版本2.58及以上版本支持。

請求消息

響應(yīng)消息

響應(yīng)參數(shù)如表3所示。

表3 響應(yīng)參數(shù)

參數(shù)

參數(shù)類型

描述

instanceActions

Array of Object

云服務(wù)器操作行為列表,詳情請參見表4。

表4 instanceActions字段數(shù)據(jù)結(jié)構(gòu)說明

參數(shù)

是否必選

參數(shù)類型

描述

action

String

行為動作

取值范圍:

create , delete , evacuate , restore , stop , start , reboot , rebuild , revertResize , confirmResize , detach_volume , attach_volume , attach_interface , detach_interface , lock , unlock , resize , migrate , pause , unpause , rescue , unrescue , changePassword , shelve ,unshelve , live-migration , live_migration_cancel , live_migration_force_complete , trigger_crash_dump, extend_volume

instance_uuid

String

彈性云服務(wù)器ID,UUID格式

message

String

行為完成狀態(tài)信息

project_id

String

項目ID

request_id

String

請求ID

start_time

String

行為開始時間

user_id

String

用戶ID

請求示例

查詢指定云服務(wù)器的所有歷史操作,顯示操作行為列表。

GET https://{endpoint}/v2.1/89655fe61c4c4a08b9f3e7f9095441b8/servers/e723eb40-f56e-40f9-8c8c-caa517fe06ba/os-instance-actions

響應(yīng)示例

{
    "instanceActions": [
        {
            "instance_uuid": "e723eb40-f56e-40f9-8c8c-caa517fe06ba",
            "user_id": "752be40780484291a9cc7ae50fff3e6d",
            "start_time": "2014-12-16T10:58:14.000000",
            "request_id": "req-ee56c2b5-d33b-4749-ae83-09281dbbb716",
            "action": "resize",
            "message": "Error",
            "project_id": "89655fe61c4c4a08b9f3e7f9095441b8"
        },
        {
            "instance_uuid": "e723eb40-f56e-40f9-8c8c-caa517fe06ba",
            "user_id": "752be40780484291a9cc7ae50fff3e6d",
            "start_time": "2014-12-16T10:57:56.000000",
            "request_id": "req-23cfd57f-c58a-45cd-86a6-eab3e38f3753",
            "action": "resize",
            "message": "Error",
            "project_id": "89655fe61c4c4a08b9f3e7f9095441b8"
        },
    ]
}

返回值

請參考通用請求返回值