deleteSecurityGroup

Deletes a security group.

If you attempt to delete a security group that is associated with an instance or network interface, is referenced by another security group in the same VPC, or has a VPC association, the operation fails with DependencyViolation.

Samples

// This example deletes the specified security group.
val resp = ec2Client.deleteSecurityGroup {
    groupId = "sg-903004f8"
}