Help Center/ Virtual Private Network/ API Reference/ API/ P2C VPN APIs/ P2C VPN Gateway/ Tearing Down a Connection of a P2C VPN Gateway
Updated on 2026-10-22 GMT+08:00

Tearing Down a Connection of a P2C VPN Gateway

Function

This API is used to tear down a connection of a specified P2C VPN gateway based on the connection ID.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

vpn:p2cVpnGateway:disconnectConnection

write

p2cVpnGateway

-

-

-

URI

POST /v5/{project_id}/p2c-vpn-gateways/{p2c_vgw_id}/connections/{connection_id}/disconnect

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.

p2c_vgw_id

String

Yes

Specifies the ID of a P2C VPN gateway instance.

connection_id

String

Yes

Specifies a connection ID of a P2C VPN gateway.

  • Example request
    POST https://{Endpoint}/v5/{project_id}/p2c-vpn-gateways/{p2c_vgw_id}/connections/{connection_id}/disconnect

Response

  • Response parameters

    Returned status code 200: successful operation

    Table 2 Parameters in the response body

    Parameter

    Type

    Description

    request_id

    String

    Specifies a request ID.

  • Example response
    {
      "request_id": "c63d850876bcddbdfbd11776cce57914"
    }

Status Codes

For details, see Status Codes.