Help Center > Elastic Cloud Server > API Reference > ECS Status Management > Removing a Security Group (Native OpenStack API)

Removing a Security Group (Native OpenStack API)

Function Description

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

Interface Format

Method

URI

Description

POST

/v2/{tenant_id}/servers/{server_id}/action

Removes a security group from an ECS.

Extension Description

N/A

Request parameter

Table 1 Request parameter

Parameter

Type

Mandatory

Description

removeSecurityGroup

Dict

Yes

Removes a security group from an ECS.

removeSecurityGroup parameter description

Parameter

Type

Mandatory

Description

name

String

Yes

Specifies the name or ID of the security group to be removed. The name or ID takes effect for the NICs on the ECS.

Response Parameter

N/A

Returned Value

See General Request Returned Values.

Example Request

{ 
    "removeSecurityGroup": { 
        "name": "sg-test"
    }
}

Error Code

Table 2 Task error code

Error Code

Description

404

The requested ECS or security group does not exist.

Registration