Delete Security Group
DELETE
/v2.0/security-groups/{security_group_id}Deletes a security group together with its rules. The group must not be attached to any port.
info
Source: delete-security-group
Request
Parameters
security_group_idstringrequiredThe ID of the security group.
Sample Request
curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:9696/v2.0/security-groups/{security_group_id}
Response
Status Code
Success
| Status Code | Description |
|---|---|
| 204 - No Content | The security group was deleted. |
Error
| Status Code | Description |
|---|---|
| 401 - Unauthorized | User must authenticate before making a request. |
| 403 - Forbidden | Policy does not allow current user to do this operation, or the group is the default group of the project. |
| 404 - Not Found | The security group does not exist. |
| 409 - Conflict | The group is still attached to a port. |
note
To delete a group that is in use, first move its ports to another group, or delete the VMs that own those ports. The default group cannot be deleted.