VM Related Interfaces
Get Virtual Machine Console Password
Get the console password of a Virtual Machine.
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 64bdb6ac8c3044d589ab6a0e96745fc2" \
-X GET http://localhost:8080/zstack/v1/vm-instances/3bc9f63f0de6492991c59bef96b27565/console-passwordsParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Virtual Machine UUID | 0.6 | |
| systemTags (Optional) | List | query | System Tag | 0.6 | |
| userTags (Optional) | List | query | User Tag | 0.6 |
API Response
Response Example
{
"consolePassword": "password"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 0.6 | |
| password | String | Console password | 0.6 |
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation is successful. For details, see error | 0.6 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause. The source error that caused the current error. If there is no original error, this field is null | 0.6 |
SDK Examples
Java SDK
GetVmConsolePasswordAction action = new GetVmConsolePasswordAction();
action.uuid = "b06703c5616e4c29ba4d080ea6b3d760";
action.sessionId = "4cf31da078ce44348e0d77af4269c756";
GetVmConsolePasswordAction.Result res = action.call();Python SDK
GetVmConsolePasswordAction action = GetVmConsolePasswordAction()
action.uuid = "73b0881a95c0456ca9d20f2896ea6b76"
action.sessionId = "d568904f39914ffbaf6245aa3c949b37"
GetVmConsolePasswordAction.Result res = action.call()