50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

paws.compute (version 0.1.12)

ec2_delete_security_group: Deletes a security group

Description

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.

Usage

ec2_delete_security_group(GroupId, GroupName, DryRun)

Value

An empty list.

Arguments

GroupId

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

GroupName

[EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.

DryRun

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.

Request syntax

svc$delete_security_group(
  GroupId = "string",
  GroupName = "string",
  DryRun = TRUE|FALSE
)

Examples

Run this code
if (FALSE) {
# This example deletes the specified security group.
svc$delete_security_group(
  GroupId = "sg-903004f8"
)
}

Run the code above in your browser using DataLab