Skip to content

Delete Subnet

ec2_delete_subnet R Documentation

Deletes the specified subnet

Description

Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.

Usage

ec2_delete_subnet(SubnetId, DryRun)

Arguments

SubnetId

[required] The ID of the subnet.

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.

Value

An empty list.

Request syntax

svc$delete_subnet(
  SubnetId = "string",
  DryRun = TRUE|FALSE
)

Examples

## Not run: 
# This example deletes the specified subnet.
svc$delete_subnet(
  SubnetId = "subnet-9d4a7b6c"
)

## End(Not run)