Image Storage Related InterfacesImage Related Interfaces

Delete Image Package

DELETE/zstack/v1/image-packages/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/image-packages/e7660c815f483befb15905bf6c776781?

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

uuid

String

url

Resource UUID, uniquely identifies the resource

 

4.4.6

deleteMode (Optional)

String

body

Delete mode

  • Permissive
  • Enforcing

4.4.6

systemTags (Optional)

List

body

System Tags

 

4.4.6

userTags (Optional)

List

body

User Tags

 

4.4.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

DeleteImagePackageAction action = new DeleteImagePackageAction();
action.uuid = "e7660c815f483befb15905bf6c776781";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteImagePackageAction.Result res = action.call();

Python SDK

DeleteImagePackageAction action = DeleteImagePackageAction()
action.uuid = "e7660c815f483befb15905bf6c776781"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteImagePackageAction.Result res = action.call()