AWS SDK for .NET Documentation
DeleteSecurityGroup Method (request)
AmazonAmazon.EC2AmazonEC2DeleteSecurityGroup(DeleteSecurityGroupRequest) Did this page help you?   Yes   No    Tell us about it...
Deletes a security group that you own.
Declaration Syntax
Parameters
request (DeleteSecurityGroupRequest)
Delete Security Group request
Return Value
Delete Security Group Response from the service
Remarks
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.
Exceptions

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)