AWS SDK for .NET Documentation
DeleteVpc Method (request)
Amazon ► Amazon.EC2 ► AmazonEC2Client ► DeleteVpc(DeleteVpcRequest)
Did this page help you? Yes No Tell us about it...
Deletes a VPC.
Declaration Syntax

C#

    public 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 |

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)