Deletes a VPC.
Declaration Syntax
C# |
DeleteVpcResponse DeleteVpc( DeleteVpcRequest request )
Parameters
- request (DeleteVpcRequest)
- Delete Vpc request
Return Value
Delete Vpc Response from the service
Remarks
You must terminate all running instances and delete
all subnets before deleting the VPC, otherwise Amazon
VPC returns an error.
AWS might delete any VPC if you leave it inactive for
an extended period of time (inactive means that there
are no running Amazon EC2 instances in the VPC).
Exceptions
Exception | Condition |
---|---|
WebException | |
AmazonEC2Exception |