Deletes a security group that you own.

C# |
public DeleteSecurityGroupResponse DeleteSecurityGroup( DeleteSecurityGroupRequest request )

- request (DeleteSecurityGroupRequest)
- Delete Security Group request

Delete Security Group Response from the service

If you attempt to delete a security group that contains instances, an
error is returned.
If you attempt to delete a security group that is referenced by
another security group, an error 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.

Exception | Condition |
---|---|
WebException | |
AmazonEC2Exception |