Resource Center/Resource Pool/VM Instance Operations
GETVM Instance OperationsSince 2.1SynchronousAuth Required
GetCandidatePrimaryStoragesForCreatingVm
GetCandidatePrimaryStoragesForCreatingVm
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Query Parameters
Request Inputs
Query Parameters
imageUuidStringRequiredThe image UUID.
l3NetworkUuidsListRequiredThe L3 network UUID.
rootDiskOfferingUuidStringOptional. The UUID of the disk offering used by the root volume. This parameter is required if the image type is ISO.
rootDiskSizeLongOptional. The size of the root volume. You need to specify this parameter only when you set imageUuid to ISO and do not specify rootDiskOfferingUuid.
dataDiskOfferingUuidsListOptional. The UUID of the disk offering used by the data volume.
Responses
Endpoint
GET/zstack/v1/vm-instances/candidate-storages
/zstack/v1/vm-instances/candidate-storages
Request Example
curl -X GET 'http://{host}/zstack/v1/vm-instances/candidate-storages?imageUuid=<imageUuid>&l3NetworkUuids=<l3NetworkUuids>&rootDiskOfferingUuid=<rootDiskOfferingUuid>&rootDiskSize=1&dataDiskOfferingUuids=<dataDiskOfferingUuids>&dataDiskSizes=<dataDiskSizes>&zoneUuid=<zoneUuid>&clusterUuid=<clusterUuid>&defaultL3NetworkUuid=<defaultL3NetworkUuid>&systemTags=<systemTags>&userTags=<userTags>&instanceOfferingUuid=<instanceOfferingUuid>' -H 'Authorization: OAuth {sessionUuid}'
Response Example
200{ "rootVolumePrimaryStorages": [ { "uuid": "90087c635c70381baf16eb6dd5f8cfdc", "name": "example", "url": "/zstack_ps", "description": "example", "totalCapacity": 322122547200, "availableCapacity": 214748364800, "totalPhysicalCapacity": 322122547200, "availablePhysicalCapacity": 214748364800, "type": "LocalStorage", "state": "Enabled", "status": "Connected", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "attachedClusterUuids": [ "f1d9f91b4b8b35f7b4435f86b79793be" ] } ], "dataVolumePrimaryStorages": { "d180546cd56b3677bffd7d338ba2666c": [ { "uuid": "b5e92f8dbf223a1eac8fd101f63112b6", "name": "example", "url": "/opt/zstack/nfsprimarystorage/prim-b5e92f8dbf223a1eac8fd101f63112b6", "description": "example", "totalCapacity": 322122547200, "availableCapacity": 214748364800, "totalPhysicalCapacity": 322122547200, "availablePhysicalCapacity": 214748364800, "type": "NFS", "state": "Enabled", "status": "Connected", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "attachedClusterUuids": [ "1d76e995472839f989472c71dbb450c0" ] } ] } }Change History
This API has no change history records yet.
