• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Security Group Management
  6. Deleting a Security Group

Deleting a Security Group

Function Description

This interface is used to remove a security group from an ECS.

URI

POST /v2/{project_id}/servers/{server_id}/action

POST /v2.1/{project_id}/servers/{server_id}/action

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

server_id

Yes

Specifies the ECS ID.

Request

Request parameters

Table 2 describes the request parameters.

Table 2 Request parameter

Parameter

Type

Mandatory

Description

removeSecurityGroup

Dict

Yes

Removes a security group from an ECS.

Table 3 removeSecurityGroup parameter description

Parameter

Type

Mandatory

Description

name

String

Yes

Specifies the name of the security group from which the ECS is removed. The name takes effect for the NICs on the ECS.

Response

N/A

Examples

  • Example request
    { 
        "removeSecurityGroup": { 
            "name": "sg-test"
        }
    }

Returned Values

See General Request Returned Values.