Create a Private Network Connection
Create a cloud private-network connection. This API requires data source module permissions.
Endpoint: /openapi/v1/tunnel/create
Method: POST
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | Private-network connection name. |
| type | String | Yes | Connection type: access (automatic mode) or manual (manual mode). |
| vendor | String | Yes | Cloud vendor: aliyun, tencent, huawei, aws, ecloud, gcp, or baidu. |
| vendorRegionId | String | Yes | Cloud-vendor region ID, for example, cn-hangzhou. |
| uid | String | No | Cloud account UID. |
| accessId | String | No | Cloud access credential ID. Required when type is access. |
| vpcId | String | No | VPC ID. |
| vpcName | String | No | VPC name. |
| gatewayId | String | No | Associated gateway ID. |
| endpointId | String | No | Endpoint ID. Required when type is manual. |
| endpointIp | String | No | Endpoint IP address. |
Request example
{
"name": "example-tunnel",
"type": "access",
"vendor": "aliyun",
"vendorRegionId": "cn-hangzhou",
"accessId": "<accessId>",
"vpcId": "<vpcId>"
}
Response parameters
| Parameter | Type | Description |
|---|---|---|
| success | Boolean | Whether the request succeeded. |
| requestId | String | Request ID. |
| data.tunnelId | String | ID of the new private-network connection. |
Success response
{"success": true, "requestId": "<requestId>", "data": {"tunnelId": "<tunnelId>"}}