ExpungeVmInstance
API Request
URLs
PUT zstack/v1/vm-instances/{uuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"expungeVmInstance": {},
"systemTags": [],
"userTags": []
}
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"expungeVmInstance":{}}' \
http://localhost:8080/zstack/v1/vm-instances/e57788f713963e98a99a9f6b0bd8482c/actionsRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The VM instance UUID. | 0.6 | |
| systemTags | List | body | Optional. The system tags. | 0.6 | |
| userTags | List | body | Optional. The user tags. | 0.6 |
API Response
When the API succeeded, an empty JSON structure {} is returned. When the API
failed, the returned JSON structure includes 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 Sample
Java
SDK
ExpungeVmInstanceAction action = new ExpungeVmInstanceAction();
action.uuid = "f3b0b9538e6a49a88e189ba2c42b728e";
action.sessionId = "332f2d77997446fbaef62df0411b2635";
ExpungeVmInstanceAction.Result res = action.call();Python
SDK
ExpungeVmInstanceAction action = ExpungeVmInstanceAction()
action.uuid = "1cc86ac86211480485a251a48bc1928e"
action.sessionId = "6af024d8e8bf44709b42ffa623e96073"
ExpungeVmInstanceAction.Result res = action.call()