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

C#

    public DeleteVpnGatewayResponse DeleteVpnGateway(
    	DeleteVpnGatewayRequest request
    )

Parameters

request (DeleteVpnGatewayRequest)
  Delete Vpn Gateway request

Return Value
Delete Vpn Gateway Response from the service
Remarks
Use this when you want to delete a VPC and all its associated components because you no longer need them. We recommend that before you delete a VPN gateway, you detach it from the VPC and delete the VPN connection. Note that you don't need to delete the VPN gateway if you just want to delete and re-create the VPN connection between your VPC and data center. AWS might delete any VPN gateway if you leave it inactive for an extended period of time (inactive means that there's no VPN connection in use with the VPN gateway).
Exceptions

Exception | Condition
--- | ---
WebException |
AmazonEC2Exception |

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