Deletes one of your security groups. Make sure the security group is not authorized by other security groups (DescribeSecurityGroupReferences, and the security group manages no instance. Otherwise, the DeleteSecurityGroup action fails.

Request parameters

Name Type Required Description
Action String Yes The name of this interface. Value: DeleteSecurityGroup.
SecurityGroupId String Yes The security group ID.
RegionId String Yes The ID of the region to which the security group belongs. For more information, call DescribeRegions to obtain the latest region list.

Response parameters

All parameters are common response parameters. For more information, see Common parameters.


Request example
&<Common Request Parameters>
Response example

XML format

JSON format

Error codes

The following error codes are specific to this interface. For more error codes, see API Error Center.

Error code Error message HTTP status code Meaning
DependencyViolation There is still instance(s) in the specified security group. 403 The specified security group is managing instances.
DependencyViolation The specified security group has been authorized in another one. 403 The specified security group is authorized by other security groups.
InvalidRegionId.NotFound The specified RegionId does not exist. 404 The specified RegionId does not exist.