paws.compute (version 0.1.0)

ec2_delete_security_group: Deletes a security group

Description

Deletes a security group.

Usage

ec2_delete_security_group(GroupId, GroupName, DryRun)

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
)

Details

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.

Examples

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

Run the code above in your browser using DataLab