Document navigation

GetVmConsolePassword

API Request

URLs

GET zstack/v1/vm-instances/{uuid}/console-passwords

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 64bdb6ac8c3044d589ab6a0e96745fc2" \
-X GET http://localhost:8080/zstack/v1/vm-instances/3bc9f63f0de6492991c59bef96b27565/console-passwords

Request Parameters

Name Type Location Description Optional Value Starting Version
uuid String url The VM instance UUID. 0.6
systemTags List query Optional. The system tags. 0.6
userTags List query Optional. The user tags. 0.6

API Response

Sample Response

{
  "consolePassword": "password"
}
Name Type Description Starting Version
password String The console password. 0.6
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 0.6

#error

Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 0.6
description String The brief description of the error. 0.6
details String The details about the error. 0.6
elaboration String The reserved field. Default value: null. 0.6
opaque LinkedHashMap The reserved field. Default value: null. 0.6
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 0.6

SDK Sample

Java SDK

GetVmConsolePasswordAction action = new GetVmConsolePasswordAction();
action.uuid = "b06703c5616e4c29ba4d080ea6b3d760";
action.sessionId = "4cf31da078ce44348e0d77af4269c756";
GetVmConsolePasswordAction.Result res = action.call();

Python SDK

action = GetVmConsolePasswordAction()
action.uuid = "73b0881a95c0456ca9d20f2896ea6b76"
action.sessionId = "d568904f39914ffbaf6245aa3c949b37"
res = action.call()