Updated on 2024-01-26 GMT+08:00

Deleting a VPN Gateway

Function

This API is used to delete a VPN gateway with a specified gateway ID. If a pay-per-use VPN gateway to be deleted is bound to yearly/monthly EIPs, unbind the EIPs first. Otherwise, the VPN gateway cannot be deleted.

Calling Method

For details, see Calling APIs.

URI

DELETE /v5/{project_id}/vpn-gateways/{vgw_id}

Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID.

vgw_id

String

Yes

Specifies the ID of a VPN gateway instance.

Request

  • Request parameters

    None

  • Example request
    DELETE https://{Endpoint}/v5/{project_id}/vpn-gateways/{vgw_id}

Response

  • Response parameters

    Returned status code 204: successful deletion

  • Example response

    Response returned when a VPN gateway being created fails to be deleted

    {
        "error_code":"VPN.0003",
        "error_msg":"resource (type=GATEWAY, ID=ff9bdca6-****-****-****-e4bcc1ea52bc) is not ready, currently CREATING",
        "request_id": "1d94a4e8-fdc2-7bfd-943e-19bfa9b234ac"
    }

Status Codes

For details, see Status Codes.