GetPrimaryStorageCandidatesForVmMigration
API Request
URLs
GET zstack/v1/vm-instances/{vmInstanceUuid}/storage-migration-candidates
Headers
Authorization: OAuth the-session-uuid
Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/2ac3852f503a339f857c9381d881bd91/storage-migration-candidates
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
vmInstanceUuid | String | url | The VM instance UUID. | 3.1.0 | |
withDataVolumes | boolean | body (contained in the primaryStorageMigrateVm structure) | Optional. Migrates the VM instance with its data volumes. | 3.7.0 | |
systemTags | List | query | Optional. The system tags. | 3.1.0 | |
userTags | List | query | Optional. The user tags. | 3.1.0 |
API Response
Sample
Response
{
"inventories": [
{
"uuid": "19e075320ee9327182fcb82a8b0a078b",
"name": "PS-1"
}
]
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.1.0 |
inventories | List | See inventories. | 3.1.0 |
#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. | 3.1.0 |
description | String | The detailed description of the error. | 3.1.0 |
details | String | The details about the error. | 3.1.0 |
elaboration | String | The reserved field. Default value: null. | 3.1.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 3.1.0 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 3.1.0 |
#inventories
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.1.0 |
zoneUuid | String | The zone UUID. | 3.1.0 |
name | String | The resource name. | 3.1.0 |
url | String | 3.1.0 | |
description | String | The detailed description of the resource. | 3.1.0 |
totalCapacity | Long | 3.1.0 | |
availableCapacity | Long | 3.1.0 | |
totalPhysicalCapacity | Long | 3.1.0 | |
availablePhysicalCapacity | Long | 3.1.0 | |
systemUsedCapacity | Long | 3.1.0 | |
type | String | 3.1.0 | |
state | String | 3.1.0 | |
status | String | 3.1.0 | |
mountPath | String | 3.1.0 | |
createDate | Timestamp | The creation date. | 3.1.0 |
lastOpDate | Timestamp | The last operation date. | 3.1.0 |
attachedClusterUuids | List | 3.1.0 |
SDK Sample
Java
SDK
GetPrimaryStorageCandidatesForVmMigrationAction action = new GetPrimaryStorageCandidatesForVmMigrationAction();
action.vmInstanceUuid = "2ac3852f503a339f857c9381d881bd91";
action.withDataVolumes = true;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetPrimaryStorageCandidatesForVmMigrationAction.Result res = action.call();
Python
SDK
GetPrimaryStorageCandidatesForVmMigrationAction action = GetPrimaryStorageCandidatesForVmMigrationAction()
action.vmInstanceUuid = "2ac3852f503a339f857c9381d881bd91"
action.withDataVolumes = true
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetPrimaryStorageCandidatesForVmMigrationAction.Result res = action.call()