VM Related Interfaces

Delete VM Template

DELETE/zstack/v1/vm-instances/templatedVmInstance/{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/vm-instances/templatedVmInstance/1f59e345b0193482aac6c4f3454b1f28

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlUUID of the resource, uniquely identifying the resource 4.2.6
deleteMode (Optional)StringbodyDelete Mode (Permissive / Enforcing, Permissive) 4.2.6
systemTags (Optional)ListbodySystem Tag 4.2.6
userTags (Optional)ListbodyUser Tag 4.2.6

API Response

When the API succeeds, it returns an empty JSON structure {}. When an error occurs, the returned JSON structure 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

DeleteTemplatedVmInstanceAction action = new DeleteTemplatedVmInstanceAction();
action.uuid = "1f59e345b0193482aac6c4f3454b1f28";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteTemplatedVmInstanceAction.Result res = action.call();

Python SDK

DeleteTemplatedVmInstanceAction action = DeleteTemplatedVmInstanceAction()
action.uuid = "1f59e345b0193482aac6c4f3454b1f28"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DeleteTemplatedVmInstanceAction.Result res = action.call()