Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.
example
Use a bare-bones client and the command you need to make an API call.
Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, DeleteVpcCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, DeleteVpcCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new DeleteVpcCommand(input); const response = await client.send(command);
DeleteVpcCommandInput for command's
input
shape.DeleteVpcCommandOutput for command's
response
shape.config for EC2Client's
config
shape.