VM Related Interfaces
Delete VM Template
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/vm-instances/templatedVmInstance/1f59e345b0193482aac6c4f3454b1f28Parameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | UUID of the resource, uniquely identifying the resource | 4.2.6 | |
| deleteMode (Optional) | String | body | Delete Mode (Permissive / Enforcing, Permissive) | 4.2.6 | |
| systemTags (Optional) | List | body | System Tag | 4.2.6 | |
| userTags (Optional) | List | body | User 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()