Image Storage Related InterfacesImage Related Interfaces
Get Candidate Backup Storage for Creating Image
Get candidate Image Storage for creating an Image.
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/images/candidate-backup-storage?volumeUuid=599c51abe51a320d842584f90984a6f4&volumeSnapshotUuid=2deb33e07a90373ea4fa7bd3a0352e0dcurl -H "Content-Type: application/json" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/images/volumes/599c51abe51a320d842584f90984a6f4/candidate-backup-storage?volumeUuid=599c51abe51a320d842584f90984a6f4&volumeSnapshotUuid=2deb33e07a90373ea4fa7bd3a0352e0dcurl -H "Content-Type: application/json" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/images/volume-snapshots/2deb33e07a90373ea4fa7bd3a0352e0d/candidate-backup-storage?volumeUuid=599c51abe51a320d842584f90984a6f4&volumeSnapshotUuid=2deb33e07a90373ea4fa7bd3a0352e0dParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| volumeUuid (Optional) | String | query | Disk UUID. Note: volumeUuid and volumeSnapshotUuid are mutually exclusive | 0.6 | |
| volumeSnapshotUuid (Optional) | String | query | Disk Snapshot UUID. Note: volumeUuid and volumeSnapshotUuid are mutually exclusive | 0.6 | |
| systemTags (Optional) | List | query | System Tags | 0.6 | |
| userTags (Optional) | List | query | User Tags | 0.6 |
API Response
This API returns an empty JSON object {} on success. On error, the returned JSON contains an error field, for example:
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Examples
Java SDK
GetCandidateBackupStorageForCreatingImageAction action = new GetCandidateBackupStorageForCreatingImageAction();
action.volumeUuid = "77e77779b5f94617af0a8b08b4a50129";
action.volumeSnapshotUuid = "4a5220b5b1f044f8826520eb506d0f98";
action.sessionId = "45b0a87571c2476ba2fe6623daaa79cf";
GetCandidateBackupStorageForCreatingImageAction.Result res = action.call();Python SDK
GetCandidateBackupStorageForCreatingImageAction action = GetCandidateBackupStorageForCreatingImageAction()
action.volumeUuid = "83792660358b4e14b266c5d0920b8b21"
action.volumeSnapshotUuid = "3d562e4325cc42ce8bd3115b48f79ae4"
action.sessionId = "2ba3d333ac284a20adc782766f597330"
GetCandidateBackupStorageForCreatingImageAction.Result res = action.call()