doc-exports/docs/vpn/api-ref/vpn_api_0025.html
Hongwei, King Wang 32c06a10a2 vpn_api
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
Co-committed-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
2024-08-15 14:18:28 +00:00

6.9 KiB

Deleting a Customer Gateway

Function

This API is used to delete a customer gateway with a specified gateway ID.

Calling Method

For details, see Calling APIs.

URI

DELETE /v5/{project_id}/customer-gateways/{customer_gateway_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.

customer_gateway_id

String

Yes

Specifies a customer gateway ID.

Request

  • Request parameters

    None

  • Example request
    DELETE https://{Endpoint}/v5/{project_id}/customer-gateways/{customer_gateway_id}

Response

  • Response parameters

    Returned status code 204: successful deletion

  • Example response
    Response returned when a customer gateway that has been created and has VPN connections fails to be deleted
    DELETE https://{Endpoint}/v5/{project_id}/customer-gateways/{customer_gateway_id}
    {
        "error_code": "VPN.0001",
        "error_msg": "invalid request: customer gateway 575c1722-demo-a8df-va86-dd7f41876332 has connection",
        "request_id": "c923ac44-1890-48d5-a004-5be6432cf361"
    }

Status Codes

For details, see Status Codes.