Delete Data Center

DELETE/zstack/v1/zones/{uuid}?deleteMode={deleteMode}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 05fc0a34be264877a9dc8dfb5f90d619" \
-X DELETE http://localhost:8080/zstack/v1/zones/d3483ca440334af3acc09d8631e814c6?deleteMode=Permissive

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

uuid

String

url

Resource UUID, uniquely identifies the resource

 

0.6

deleteMode (optional)

String

body

  • Permissive: If an error occurs during deletion or deletion is not allowed, the virtualization platform will stop the deletion operation; in this case, the error code containing the failure reason will be returned.
  • Enforcing: The virtualization platform will ignore all errors and permissions and directly delete the resource; in this case, the deletion operation will always succeed.

 

0.6

systemTags (optional)

List

body

System tag

 

0.6

userTags (optional)

List

body

User tag

 

0.6

API Response

On success, this API returns an empty JSON structure {}. On error, 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

DeleteZoneAction action = new DeleteZoneAction();
action.uuid = "8987020fccd14191a5a89dda6f3db81e";
action.deleteMode = "Permissive";
action.sessionId = "835b1b72c4554a7e92c425ad9eaebc6d";
DeleteZoneAction.Result res = action.call();

Python SDK

DeleteZoneAction action = DeleteZoneAction()
action.uuid = "a4bcb439c99a42e197cac90be83e706e"
action.deleteMode = "Permissive"
action.sessionId = "6eaf02e52c884e378a3730ce4267d83a"
DeleteZoneAction.Result res = action.call()