Deleting a Virtual Private Gateway

You can delete a virtual private gateway that is no longer attached to a Virtual Private Cloud (VPC).

This action updates the state of the virtual private gateway from available to deleted.

Deleting a Virtual Private Gateway Using Cockpit v1

Before you begin: Detach the virtual private gateway from the VPC it is attached to, if any. For more information, see Detaching a Virtual Private Gateway.

  1. Click VPC > Virtual Private Gateways.

  2. Select the virtual private gateway you want to delete.
    The virtual private gateway is selected.

  3. Click Delete .
    A confirmation dialog box appears.

  4. Click Delete to validate.
    The virtual private gateway is deleted and disappears from the Virtual Private Gateways page.

    Deleted resources remain visible for 1 hour.

Deleting a Virtual Gateway Using OSC CLI

Before you begin: Detach the virtual gateway from the Net it is attached to, if any. For more information, see Detaching a Virtual Private Gateway.

See the DeleteVirtualGateway command sample in the documentation of the OUTSCALE API.

Deleting a Virtual Private Gateway Using AWS CLI

Before you begin: Detach the virtual private gateway from the VPC it is attached to, if any. For more information, see Detaching a Virtual Private Gateway.

To delete a virtual private gateway, use the delete-vpn-gateway command following this syntax:

Request sample
$ aws ec2 delete-vpn-gateway \
    --profile YOUR_PROFILE \
    --vpn-gateway-id vgw-072c84ed \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • vpn-gateway-id: The ID of the virtual private gateway you want to delete.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The specified virtual private gateway is deleted.

Deleted resources remain visible for 1 hour.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.