DeleteVmHostname

API Request

URLs
DELETE zstack/v1/vm-instances/{uuid}/hostnames?deleteMode={deleteMode}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth efe37b8868b54c6c93b9f83a04ffe27c" \
-X DELETE http://localhost:8080/zstack/v1/vm-instances/\
55fefc89f98b49f99e96bb01765d42ed/hostnames?deleteMode=Permissive
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The VM instance UUID. 0.6
deleteMode String body Optional. The delete mode. 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
DeleteVmHostnameAction action = new DeleteVmHostnameAction();
action.uuid = "ab14af23812445e891695e0c9ef7b635";
action.deleteMode = "Permissive";
action.sessionId = "25d8bc148fcb4061b0aa340d1e4c68a8";
DeleteVmHostnameAction.Result res = action.call();

Python SDK

DeleteVmHostnameAction action = DeleteVmHostnameAction()
action.uuid = "0f4ad3768b1e4e8bb1ec33646a3067de"
action.deleteMode = "Permissive"
action.sessionId = "fb18f70b6fc24b5f955817aaabbae4cc"
DeleteVmHostnameAction.Result res = action.call()