CleanupAllVmInstanceMetadata

Cleanup All Virtual Machine Instance Metadata

API Request

URLs
DELETE zstack/v1/vm-instances/metadata
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/metadata?primaryStorageUuids=01cc0bb1fafe3e6fb8971b72ad0f3b1a&primaryStorageUuids=ab71bdefa93c31d1afa724a41364e230
Parameter List
Name Type Location Description Allowed Values Starting Version
primaryStorageUuids (Optional) List query List of data storage UUIDs whose virtual machine metadata needs to be cleaned up. If empty, metadata is cleaned up on all data storage resources in the Enabled and Connected states 5.1.0
systemTags (Optional) List query System tags 5.1.0
userTags (Optional) List query User tags 5.1.0

API Response

Response Example
{
  "failedPrimaryStorageUuids": []
}
Name Type Description Starting Version
failedPrimaryStorageUuids List List of data storage UUIDs for which cleanup failed. See the error field for a summary of the causes and the management node or agent logs for individual details 5.1.0
success boolean Whether the operation succeeded. This value is false if cleanup fails on any data storage 5.1.0
error ErrorCode For details, see error 5.1.0
#error
Name Type Description Starting Version
code String Error code, which globally and uniquely identifies the error, for example, SYS.1000 or HOST.1001 0.6
description String Summary description of the error 0.6
details String Details of the error 0.6
elaboration String Reserved field. The default value is null 0.6
opaque LinkedHashMap Reserved field. The default value is null 0.6
cause ErrorCode Root error that caused the current error. This field is null if there is no source error 0.6

SDK Examples

Java SDK
CleanupAllVmInstanceMetadataAction action = new CleanupAllVmInstanceMetadataAction();
action.primaryStorageUuids = asList("01cc0bb1fafe3e6fb8971b72ad0f3b1a","ab71bdefa93c31d1afa724a41364e230");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CleanupAllVmInstanceMetadataAction.Result res = action.call();
Python SDK
action = CleanupAllVmInstanceMetadataAction()
action.primaryStorageUuids = [01cc0bb1fafe3e6fb8971b72ad0f3b1a, ab71bdefa93c31d1afa724a41364e230]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center