Deletes a security group that you own.
Declaration Syntax
C# |
DeleteSecurityGroupResponse DeleteSecurityGroup( DeleteSecurityGroupRequest request )
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
Exception | Condition |
---|---|
WebException | |
AmazonEC2Exception |