获取虚拟机虚拟化技术类型

GET/zstack/v1/hosts/hypervisor-types

Headers

Authorization: OAuth the-session-uuid

Curl示例

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth fa53caa553b8446e9bb1c3ccae31cfcd" \
-X GET http://localhost:8080/zstack/v1/hosts/hypervisor-types

参数列表

名字类型位置描述可选值起始版本
systemTags (可选)Listquery系统标签 0.6
userTags (可选)Listquery用户标签 0.6

API返回

该API成功时返回一个空的JSON结构**{}**,出错时返回的JSON结构包含一个error字段,例如:

{
  "error": {
    "code": "SYS.1001",
    "description": "A message or a operation timeout",
    "details": "Create VM on KVM timeout after 300s"
  }
}

SDK示例

Java SDK

GetHypervisorTypesAction action = new GetHypervisorTypesAction();
action.sessionId = "6e32c684aeab461db30fb6631a1ac898";
GetHypervisorTypesAction.Result res = action.call();

Python SDK

GetHypervisorTypesAction action = GetHypervisorTypesAction()
action.sessionId = "48f0a488d41d4f84b77c343a24e206e4"
GetHypervisorTypesAction.Result res = action.call()