GetVmStartingCandidateClustersHosts

API Request

URLs
GET zstack/v1/vm-instances/{uuid}/starting-target-hosts
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth: a2a9ac093ee64f669665aff2807bbe8a" \
-X GET http://localhost:8080/zstack/v1/vm-instances/d8cfc97f5099454bb3eed367a79d4e4c/starting-target-hosts
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
{
  "hostInventories": [
    {
      "zoneUuid": "1650e7c372ab4d43aa1b16e3a48f5f05",
      "name": "example",
      "uuid": "3b659b741cc743a5840aaab5a2c366d1",
      "clusterUuid": "5ecdcc0a2823494daa0c85a7889a7890",
      "description": "example",
      "managementIp": "192.168.0.1",
      "hypervisorType": "KVM",
      "state": "Enabled",
      "status": "Connected",
      "totalCpuCapacity": 4.0,
      "availableCpuCapacity": 2.0,
      "totalMemoryCapacity": 4.0,
      "availableMemoryCapacity": 4.0,
      "createDate": "Apr 24, 2017 7:11:02 PM",
      "lastOpDate": "Apr 24, 2017 7:11:02 PM"
    }
  ],
  "clusterInventories": [
    {
      "name": "cluster1",
      "uuid": "2ecd7d0ddad649e4a36a7f47e43dae1a",
      "hypervisorType": "KVM",
      "createDate": "Apr 24, 2017 7:11:02 PM",
      "lastOpDate": "Apr 24, 2017 7:11:02 PM",
      "zoneUuid": "268a180f9a7d4ebe9f5a0e7ad558d523"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 0.6
hosts List See hosts. 0.6
clusters List See clusters. 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
#hosts
Name Type Description Starting Version
zoneUuid String The zone UUID. 0.6
name String The resource name. 0.6
uuid String The resource UUID. 0.6
clusterUuid String The cluster UUID. 0.6
description String The detailed description of the resource. 0.6
managementIp String 0.6
hypervisorType String 0.6
state String 0.6
status String 0.6
totalCpuCapacity Long 0.6
availableCpuCapacity Long 0.6
cpuSockets Integer 0.6
totalMemoryCapacity Long 0.6
availableMemoryCapacity Long 0.6
cpuNum Integer 0.6
createDate Timestamp The creation date. 0.6
lastOpDate Timestamp The last operation date. 0.6
#clusters
Name Type Description Starting Version
name String The resource name. 0.6
uuid String The resource UUID. 0.6
description String The detailed description of the resource. 0.6
state String The cluster state. 0.6
hypervisorType String The hypervisor type. 0.6
createDate Timestamp The creation date. 0.6
lastOpDate Timestamp The last operation date. 0.6
zoneUuid String The zone UUID. 0.6
type String The reserved field. 0.6

SDK Sample

Java SDK
GetVmStartingCandidateClustersHostsAction action = new GetVmStartingCandidateClustersHostsAction();
action.uuid = "a591b94c66d6452284f9940e7807425a";
action.sessionId = "5630397e6ade47e9bd73569f5177957e";
GetVmStartingCandidateClustersHostsAction.Result res = action.call();
Python SDK
GetVmStartingCandidateClustersHostsAction action = GetVmStartingCandidateClustersHostsAction()
action.uuid = "0cb8127bcfb8431497562f7464ee9920"
action.sessionId = "9320fb483c3c4926a7870ffa045088b2"
GetVmStartingCandidateClustersHostsAction.Result res = action.call()