DeleteSecurityGroup

The DeleteSecurityGroup operation deletes a security group.

[Note]Note

If you attempt to delete a security group that contains instances, a fault is returned.

If you attempt to delete a security group that is referenced by another security group, a fault is returned. For example, if security group B has a rule that allows access from security group A, security group A cannot be deleted until the allow rule is removed.

The following table describes the request parameters for DeleteSecurityGroup. Parameter names are case sensitive.

NameDescriptionRequired

groupName

Name of the security group to delete.

Type: xsd:string

Yes

The following table describes the default response tags included in DeleteSecurityGroup responses.

NameDescription

return

true if the group is deleted. Otherwise, false.

Type: xsd:boolean

<DeleteSecurityGroup xmlns="http://ec2.amazonaws.com/doc/2007-08-29">
    <groupName>RangedPortsBySource</groupName>
</DeleteSecurityGroup>
<DeleteSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2007-08-29">
  <return>true</return>
</DeleteSecurityGroupResponse>