DeleteSecurityGroup

API Request

URLs
DELETE zstack/v1/security-groups/{uuid}?deleteMode={deleteMode}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 6674ae438b8646d3b4a99a7fe7a48719" \
-X DELETE http://localhost:8080/zstack/v1/security-groups/6791f54e4fb147d1b26030723efe03bd?deleteMode=Permissive
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 0.6
deleteMode String body Optional. The delete mode. Options: Permissive | Enforcing. Default mode: Permissive.
  • Permissive: If an error occurs, or if the delete operation is refused, ZStack Cloud will stop the delete operation. In this mode, an error code that contains the failure reason will be returned.
  • Enforcing: ZStack Cloud will ignore all errors and permissions to delete directly the resource. In this mode, the delete operation will always succeed.
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
DeleteSecurityGroupAction action = new DeleteSecurityGroupAction();
action.uuid = "86efff16586b4d82bfea66deba85cc50";
action.deleteMode = "Permissive";
action.sessionId = "079653952584401b997df37fd7044433";
DeleteSecurityGroupAction.Result res = action.call();
Python SDK
DeleteSecurityGroupAction action = DeleteSecurityGroupAction()
action.uuid = "59098134c4214c79a48ced0ed7952ecd"
action.deleteMode = "Permissive"
action.sessionId = "2fb58330c68d46f6aa700740d52b02c0"
DeleteSecurityGroupAction.Result res = action.call()