delete_vpc
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.delete_vpc(
VpcId='string',
DryRun=True|False
)
[REQUIRED]
The ID of the VPC.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.None
Examples
This example deletes the specified VPC.
response = client.delete_vpc(
VpcId='vpc-a01106c2',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}