Deleting security groups
DELETE /v2.0/security-groups/{security_group_id}
Delete a security group and its associated security group rules, provided that a port is not associated with the security group. If a port is associated with the security group, 409 - Conflict
is returned.
Source: https://docs.openstack.org/api-ref/network/v2/index.html#delete-security-group
Request
Parameters
Name | In | Type | Description |
---|---|---|---|
security_group_id
|
path | string | The ID of the security group. |
Example
# curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \ https://<node_IP_addr>:9696/v2.0/security-groups/e7489f02-f846-46f2-9edf-cc5a2640041a
Response
Status codes
Success
Code | Reason |
---|---|
204 - No Content
|
The server has fulfilled the request. |
Error
Code | Reason |
---|---|
401 - Unauthorized
|
User must authenticate before making a request. |
404 - Not Found
|
The requested resource could not be found. |
409 - Conflict
|
This operation conflicted with another operation on this resource. |
412 - Precondition Failed
|
The server does not meet one of the preconditions that the requester put on the request header fields. |