Skip to main content

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

ParameterTypeRequiredDescription
nameStringYesPrivate-network connection name.
typeStringYesConnection type: access (automatic mode) or manual (manual mode).
vendorStringYesCloud vendor: aliyun, tencent, huawei, aws, ecloud, gcp, or baidu.
vendorRegionIdStringYesCloud-vendor region ID, for example, cn-hangzhou.
uidStringNoCloud account UID.
accessIdStringNoCloud access credential ID. Required when type is access.
vpcIdStringNoVPC ID.
vpcNameStringNoVPC name.
gatewayIdStringNoAssociated gateway ID.
endpointIdStringNoEndpoint ID. Required when type is manual.
endpointIpStringNoEndpoint IP address.

Request example

{
"name": "example-tunnel",
"type": "access",
"vendor": "aliyun",
"vendorRegionId": "cn-hangzhou",
"accessId": "<accessId>",
"vpcId": "<vpcId>"
}

Response parameters

ParameterTypeDescription
successBooleanWhether the request succeeded.
requestIdStringRequest ID.
data.tunnelIdStringID of the new private-network connection.

Success response

{"success": true, "requestId": "<requestId>", "data": {"tunnelId": "<tunnelId>"}}