GET /#Action=DeleteSecurityGroup

Deletes a security group.

If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in EC2-VPC.

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.

Servers

Request headers

Name Type Required Description
X-Amz-Content-Sha256 String No
X-Amz-Credential String No
X-Amz-Date String No
X-Amz-Algorithm String No
X-Amz-SignedHeaders String No
X-Amz-Security-Token String No
X-Amz-Signature String No

Query parameters

Name Type Required Description
Version String Yes

Possible values:

  • "2016-11-15"
GroupName String No

[EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, you must specify the security group ID.

GroupId String No

The ID of the security group. Required for a nondefault VPC.

DryRun Boolean No

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Action String Yes

Possible values:

  • "DeleteSecurityGroup"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.