DeleteSecurityGroup
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 6674ae438b8646d3b4a99a7fe7a48719" \
-X DELETE http://localhost:8080/zstack/v1/security-groups/6791f54e4fb147d1b26030723efe03bd?deleteMode=PermissiveParameter List
Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
uuid | String | url | The UUID of the resource, uniquely identifying the resource |
| 0.6 |
deleteMode (Optional) | String | body |
If an error occurs during the deletion or the deletion is not allowed, the virtualization platform stops the deletion. In this case, an error code containing the failure reason is returned.
The virtualization platform ignores all errors and permissions and deletes the resource directly. In this case, the deletion always succeeds. |
| 0.6 |
systemTags (Optional) | List | body | System tags |
| 0.6 |
userTags (Optional) | List | body | User tags |
| 0.6 |
API Response
This API returns a null JSON object {} when it succeeds, and returns a JSON object containing an error field when it fails. 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
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()