Updated on 2024-04-15 GMT+08:00

Deleting a Security Group

Function

This API is used to delete a security group.

Constraints

Before deleting a security group, ensure that the security group is not associated with any instance.

URI

DELETE /v3/{project_id}/vpc/security-groups/{security_group_id}

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

For details about how to obtain a project ID, see Obtaining a Project ID.

security_group_id

Yes

String

Security group ID.

Request Parameter

None

Example Request

  • Delete a single security group.
    "DELETE https://{Endpoint}/v3/{project_id}/vpc/security-groups/1d8b19c7-7c56-48f7-a99b-4b40eb390967"

Response Parameter

When the status code is 400, the response parameters are as follows:

Table 2 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

When the status code is 401, the response parameters are as follows:

Table 3 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

When the status code is 403, the response parameters are as follows:

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

When the status code is 404, the response parameters are as follows:

Table 5 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

When the status code is 409, the response parameters are as follows:

Table 6 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

When the status code is 500, the response parameters are as follows:

Table 7 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

error_msg

String

Error message

error_code

String

Error code

Example Response

None

Status Code

See Status Codes.

Error Code

See Error Codes.