查询桌面开关机信息 - ListDesktopActions
功能介绍
获取桌面开关机信息。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
GET /v2/{project_id}/desktops/{desktop_id}/actions
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID。 |
desktop_id | 是 | String | 桌面ID。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
offset | 否 | Integer | 每页限制数。 |
limit | 否 | Integer | 起始位置。 |
请求参数
无
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
desktop_actions | Array of DesktopAction objects | 桌面开关列表。 |
total_count | Integer | 总数。 |
参数 | 参数类型 | 描述 |
|---|---|---|
action | String | 行为动作。 |
message | String | 行为完成状态信息。 |
start_time | String | 开始时间。 |
finish_time | String | 结束时间。 |
result | String | 结果。 |
traceback | String | 异常信息。 |
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
请求示例
无
响应示例
状态码:200
正常。
{
"desktop_actions" : [ {
"action" : "stop",
"start_time" : "2022-05-07T07:20:08.341609",
"finish_time" : "2022-05-07T07:20:09.265125",
"result" : "Success"
} ],
"total_count" : 1
} 状态码
状态码 | 描述 |
|---|---|
200 | 正常。 |
400 | 由于包含语法错误,当前请求无法被服务器理解。 |
401 | 鉴权失败。 |
403 | 没有操作权限。 |
404 | 找不到资源。 |
500 | 服务内部错误,具体返回错误码请参见错误码说明。 |
错误码
请参见错误码。

