Resource Center/Resource Pool/VM Instance Operations
GETVM Instance OperationsSince 3.10.0SynchronousAuth Required
GetCandidateZonesClustersHostsForCreatingVm
GetCandidateZonesClustersHostsForCreatingVm
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Query Parameters
Request Inputs
Query Parameters
instanceOfferingUuidStringOptional. The instance offering UUID.
imageUuidStringRequiredThe image UUID.
l3NetworkUuidsListRequiredThe L3 network list.
rootDiskOfferingUuidStringOptional. The disk offering of the root volume. This parameter is required only when the image type specified in imageUuid is ISO.
dataDiskOfferingUuidsListOptional. The disk offering list.
Body Fields
cpuNumintOptional. The CPU count.
memorySizelongOptional. The memory size. Unit: Byte.
Responses
Endpoint
GET/zstack/v1/vm-instances/candidate-destinations
/zstack/v1/vm-instances/candidate-destinations
Request Example
curl -X GET 'http://{host}/zstack/v1/vm-instances/candidate-destinations?instanceOfferingUuid=<instanceOfferingUuid>&imageUuid=<imageUuid>&l3NetworkUuids=<l3NetworkUuids>&rootDiskOfferingUuid=<rootDiskOfferingUuid>&dataDiskOfferingUuids=<dataDiskOfferingUuids>&zoneUuid=<zoneUuid>&clusterUuid=<clusterUuid>&defaultL3NetworkUuid=<defaultL3NetworkUuid>&systemTags=<systemTags>&userTags=<userTags>' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"cpuNum":1,"memorySize":1}'
Response Example
200{ "zones": [ { "uuid": "b145bc2ad8f14810a6eec0f28508ca14", "name": "zone" } ], "clusters": [ { "name": "cluster1", "uuid": "49adbf0f48a14b899b0e6f7928556313", "hypervisorType": "KVM", "createDate": "May 11, 2017 1:23:06 PM", "lastOpDate": "May 11, 2017 1:23:06 PM", "zoneUuid": "b68fec24ba0f492c94c2e046072c16f0" } ], "hosts": [ { "zoneUuid": "b145bc2ad8f14810a6eec0f28508ca14", "name": "example", "uuid": "e1a5cb10bcbc48b4ab6dd4e648ef5960", "clusterUuid": "d5b32ea0ae1444d3b8b5a6b9d759af54", "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": "May 11, 2017 1:23:06 PM", "lastOpDate": "May 11, 2017 1:23:06 PM" } ] }Change History
This API has no change history records yet.
