Image Storage Related InterfacesImage Related Interfaces
Update Image Package
Headers
Authorization: OAuth the-session-uuidBody
{
"updateImagePackage": {
"name": "ova-update",
"description": "description-update"
},
"systemTags": [],
"userTags": []
}In the above example, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/image-packages/eeed157556d2328c9c3aeec71ab75463Parameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Resource UUID, uniquely identifies the resource | 4.4.6 | |
| name (Optional) | String | body (contained in updateImagePackage structure) | Resource name | 4.4.6 | |
| description (Optional) | String | body (contained in updateImagePackage structure) | Detailed description of the resource | 4.4.6 | |
| systemTags (Optional) | List | body | System Tags | 4.4.6 | |
| userTags (Optional) | List | body | User Tags | 4.4.6 |
API Response
Response Example
{
"inventory": {
"uuid": "ecdea1f236a13e74a5712edabb4cfe9e",
"name": "ova",
"description": "description",
"vmUuid": "21c4183acbf737128aba034313e1f909",
"backupStorageUuid": "99630920a09138ab93823380286efc57",
"state": "Exported",
"exportUrl": "http://bs-host-name/path/to/ova.ova",
"md5Sum": "sampleMd5Sum",
"format": "OVA",
"size": 10737418240.0,
"createDate": "May 10, 2022 5:27:16 AM",
"lastOpDate": "May 10, 2022 5:27:16 AM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.4.6 | |
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. See error | 4.4.6 |
| inventory | ImagePackageInventory | See inventory | 4.4.6 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 | 4.4.6 |
| description | String | Brief description of the error | 4.4.6 |
| details | String | Detailed error information | 4.4.6 |
| elaboration | String | Reserved field, defaults to null | 4.4.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 4.4.6 |
| cause | ErrorCode | Root cause. The source error that triggered the current error. This field is null if there is no original error | 4.4.6 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 4.4.6 |
| name | String | Resource name | 4.4.6 |
| description | String | Detailed description of the resource | 4.4.6 |
| vmUuid | String | Source VM UUID | 4.4.6 |
| backupStorageUuid | String | Image Storage UUID where the Image Package file is located | 4.4.6 |
| exportUrl | String | Download URL | 4.4.6 |
| md5Sum | String | Image Package file MD5 checksum | 4.4.6 |
| format | String | Image Package file format | 4.4.6 |
| size | Long | Image Package file size | 4.4.6 |
| createDate | Timestamp | Creation time | 4.4.6 |
| lastOpDate | Timestamp | Last modification time | 4.4.6 |
| state | ImagePackageState | See state | 4.4.6 |
state
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Exporting | ImagePackageState | Exporting | 4.4.6 |
| Exported | ImagePackageState | Exported | 4.4.6 |
SDK Examples
Java SDK
QueryImagePackageAction action = new QueryImagePackageAction();
action.conditions = asList("uuid=5319396fe8f0393d998ac6c0939e780e");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryImagePackageAction.Result res = action.call();Python SDK
QueryImagePackageAction action = QueryImagePackageAction()
action.conditions = ["uuid=99435bfd7903372289db27c8a2b1038c"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryImagePackageAction.Result res = action.call()