删除云主机控制台密码(DeleteVmConsolePassword)

删除一个云主机的控制台密码。

API请求

URLs
DELETE zstack/v1/vm-instances/{uuid}/console-password
Headers
Authorization: OAuth the-session-uuid
Curl示例
curl -H "Content-Type: application/json" \
-H "Authorization: OAuth 91e9a99b7b23405e9b841f5b20ab5645" \
-X DELETE http://localhost:8080/zstack/v1/vm-instances/971c0188520145f682c32079f83108ff/console-password?
参数列表
名字 类型 位置 描述 可选值 起始版本
uuid String url 云主机UUID 0.6
systemTags (可选) List body 系统标签 0.6
userTags (可选) List body 用户标签 0.6

API返回

返回示例
{
  "inventory": {
    "uuid": "69217bbc6ec440ea9c4d0f30403ddab9",
    "name": "Test-VM",
    "description": "web server VM",
    "zoneUuid": "49b47c3d1358407581450d1bff8a619b",
    "clusterUuid": "7c500334d3af42b683103b3ab09b9527",
    "imageUuid": "d515053df20b466cb98104ef939f48bb",
    "hostUuid": "e3c12c2c157946a9adb28870eb2e1884",
    "lastHostUuid": "55be742a1c4442fc8cd2401baebde106",
    "instanceOfferingUuid": "f561cb2a365f484f9a93f87aaafa8d03",
    "rootVolumeUuid": "4e07afc3a7c3471797f2cda5b0655d74",
    "platform": "Linux",
    "defaultL3NetworkUuid": "6b7c934ecaec4ffabfc7a111d1c4a262",
    "type": "UserVm",
    "hypervisorType": "KVM",
    "memorySize": 8.589934592E9,
    "cpuNum": 1.0,
    "allocatorStrategy": "LastHostPreferredAllocatorStrategy",
    "createDate": "May 11, 2017 1:22:35 PM",
    "lastOpDate": "May 11, 2017 1:22:35 PM",
    "state": "Running",
    "vmNics": [
      {
        "uuid": "e4cf2283c77d4183938f3d535523df0e",
        "vmInstanceUuid": "69217bbc6ec440ea9c4d0f30403ddab9",
        "usedIpUuid": "4ab173662e184155bdcc30d55ba83e99",
        "l3NetworkUuid": "6b7c934ecaec4ffabfc7a111d1c4a262",
        "ip": "192.168.1.10",
        "mac": "00:0c:29:bd:99:fc",
        "netmask": "255.255.255.0",
        "gateway": "192.168.1.1",
        "deviceId": 0.0,
        "createDate": "May 11, 2017 1:22:35 PM",
        "lastOpDate": "May 11, 2017 1:22:35 PM"
      }
    ],
    "allVolumes": [
      {
        "uuid": "4e07afc3a7c3471797f2cda5b0655d74",
        "name": "Root-Volume-For-VM-69217bbc6ec440ea9c4d0f30403ddab9",
        "primaryStorageUuid": "9915c3b248d1407892e214eb67217caa",
        "vmInstanceUuid": "69217bbc6ec440ea9c4d0f30403ddab9",
        "diskOfferingUuid": "a819905e63774a7981bafc947b7fbbcb",
        "rootImageUuid": "d515053df20b466cb98104ef939f48bb",
        "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/\
vol-4e07afc3a7c3471797f2cda5b0655d74/4e07afc3a7c3471797f2cda5b0655d74.qcow2",
        "type": "Root",
        "format": "qcow2",
        "size": 1.073741824E11,
        "actualSize": 2.147483648E10,
        "deviceId": 0.0,
        "state": "Enabled",
        "status": "Ready",
        "createDate": "May 11, 2017 1:22:35 PM",
        "lastOpDate": "May 11, 2017 1:22:35 PM"
      }
    ]
  }
}
名字 类型 描述 起始版本
error ErrorCode 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error 0.6
#error
名字 类型 描述 起始版本
code String 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 0.6
description String 错误的概要描述 0.6
details String 错误的详细信息 0.6
elaboration String 保留字段,默认为null 0.6
opaque LinkedHashMap 保留字段,默认为null 0.6
cause ErrorCode 根错误,引发当前错误的源错误,若无原错误,该字段为null 0.6

SDK示例

Java SDK
DeleteVmConsolePasswordAction action = new DeleteVmConsolePasswordAction();
action.uuid = "ac34ea877bc24c0bb36e8d52d1046479";
action.sessionId = "dbd8f0f101bf4318bd44814c7f3b03da";
DeleteVmConsolePasswordAction.Result res = action.call();
Python SDK
DeleteVmConsolePasswordAction action = DeleteVmConsolePasswordAction()
action.uuid = "9cefd9cf5c2a409f91ff902931eade7b"
action.sessionId = "9514a4d5eacd4c4f9a5dccdcc7bd99e3"
DeleteVmConsolePasswordAction.Result res = action.call()