tencent cloud

专线接入

动态与公告
产品动态
产品公告
产品简介
产品概述
产品功能
应用场景
使用限制
专线接入点
相关产品
网络规划
购买指南
计费概述
购买方式
续费说明
快速入门
操作指南
物理线路
专线网关
专用通道
监控与告警
MACsec 加密
云交换
访问管理
访问管理概述
可授权策略类型
授权策略语法
实践教程
通过专线接入+VPC NAT 网关实现本地 IDC 与云上资源互访
通过专线接入和 VPN 连接实现混合云主备冗余通信
云专线高可用混合云网络最佳实践
跨地域专用通道迁移至云联网
IDC 通过云联网上云
通过 BGP+BFD 实现加速路由收敛(专线三层对接)
IDC 本地配置
通过 Equinix 实现腾讯云到不同云厂商的专线打通
API 文档
History
Introduction
API Category
Making API Requests
Direct Connect APIs
Data Types
Error Codes
常见问题
基础类
计费类
技术类
故障处理
通用故障排查方案
网络无法连通和数据丢包
相关协议
专线接入服务等级协议
腾讯云专线接入服务协议
Tencent Cloud Direct Connect Review Standards
联系我们
词汇表

CreateDirectConnectTunnel

PDF
聚焦模式
字号
最后更新时间: 2025-10-30 21:39:47

1. API Description

Domain name for API request: dc.intl.tencentcloudapi.com.

This API is used to create a dedicated tunnel.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateDirectConnectTunnel.
Version Yes String Common Params. The value used for this API: 2018-04-10.
Region No String Common Params. This parameter is not required for this API.
DirectConnectId Yes String Direct Connect ID, such as dc-kd7d06of.
DirectConnectTunnelName Yes String Dedicated tunnel name.
DirectConnectOwnerAccount No String Connection owner, who is the current customer by default.
The developer account ID should be entered for shared connections.
NetworkType No String Network type. Valid values: VPC, BMVPC, CCN. Default value: VPC.
VPC: Virtual Private Cloud.
BMVPC: BM VPC.
CCN: Cloud Connect Network.
NetworkRegion No String Network region.
VpcId No String Unified VPC ID or BMVPC ID.
DirectConnectGatewayId No String Direct connect gateway ID, such as dcg-d545ddf.
Bandwidth No Integer Direct Connect bandwidth in Mbps.
Default value: connection bandwidth value.
RouteType No String BGP: BGP routing.
STATIC: Static routing.
Default value: BGP routing.
BgpPeer No BgpPeer BgpPeer, which is BGP information on the user side and includes Asn and AuthKey.
RouteFilterPrefixes.N No Array of RouteFilterPrefix Static routing, i.e., IP range of the user's IDC.
Vlan No Integer VLAN. Value range: 0-3,000.
0: sub-interface not enabled.
Default value: Non-zero.
TencentAddress No String TencentAddress: Tencent-side IP address.
CustomerAddress No String CustomerAddress: User-side IP address.
TencentBackupAddress No String TencentBackupAddress, i.e., Tencent-side standby IP address
CloudAttachId No String Cloud Attached Connection Service ID
BfdEnable No Integer Whether to enable BFD
NqaEnable No Integer Whether to enable NQA
BfdInfo No BFDInfo BFD configuration information
NqaInfo No NQAInfo NQA configuration information

3. Output Parameters

Parameter Name Type Description
DirectConnectTunnelIdSet Array of String Dedicated tunnel ID.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Dedicated tunnel using BGP routing and VPC

Input Example

https://dc.intl.tencentcloudapi.com/?Action=CreateDirectConnectTunnel
&DirectConnectId=dc-abcdefgh
&DirectConnectTunnelName=Test
&NetworkType=VPC
&NetworkRegion=ap-guangzhou
&VpcId=vpc-abcdefgh
&DirectConnectGatewayId=dcg-abcdefgh
&Bandwidth=100
&RouteType=BGP
&Vlan=100
&TencentAddress=192.168.1.2/30
&CustomerAddress=192.168.1.1/30
&BgpPeer.Asn=65128
&BgpPeer.AuthKey=abcdefg
&<Common request parameters>

Output Example

{
    "Response": {
        "DirectConnectTunnelIdSet": [
            "dcx-abcdefgh"
        ],
        "RequestId": "24a0d7e5-4c13-49be-aa16-94f698fbef3e"
    }
}

Example2 Dedicated tunnel using static routing and BM VPC

Input Example

https://dc.intl.tencentcloudapi.com/?Action=CreateDirectConnectTunnel
&DirectConnectId=dc-abcdefgh
&DirectConnectTunnelName=Test
&NetworkType=BMVPC
&NetworkRegion=ap-guangzhou
&VpcId=vpc-abcdefgh
&Bandwidth=100
&RouteType=STATIC
&Vlan=100
&TencentAddress=192.168.1.2/30
&CustomerAddress=192.168.1.1/30
&RouteFilterPrefixes.0.Cidr=192.168.0.0/24
&RouteFilterPrefixes.1.Cidr=192.168.0.0/24
&RouteFilterPrefixes.2.Cidr=192.168.0.0/24
&<Common request parameters>

Output Example

{
    "Response": {
        "DirectConnectTunnelIdSet": [
            "dcx-abcdefgh"
        ],
        "RequestId": "24a0d7e5-4c13-49be-aa16-94f698fbef3e"
    }
}

Example3 Dedicated tunnel using BGP routing and shared connection

Input Example

https://dc.intl.tencentcloudapi.com/?Action=CreateDirectConnectTunnel
&DirectConnectId=dc-abcdefgh
&DirectConnectTunnelName=Test
&DirectConnectOwnerAccount=240791248
&NetworkType=VPC
&NetworkRegion=ap-guangzhou
&VpcId=vpc-abcdefgh
&DirectConnectGatewayId=dcg-abcdefgh
&Bandwidth=100
&RouteType=BGP
&Vlan=100
&TencentAddress=192.168.1.2/30
&CustomerAddress=192.168.1.1/30
&BgpPeer.Asn=65128
&BgpPeer.AuthKey=abcdefg
&<Common request parameters>

Output Example

{
    "Response": {
        "DirectConnectTunnelIdSet": [
            "dcx-abcdefgh"
        ],
        "RequestId": "24a0d7e5-4c13-49be-aa16-94f698fbef3e"
    }
}

Example4 Dedicated tunnel using BGP routing and CCN

Input Example

https://dc.intl.tencentcloudapi.com/?Action=CreateDirectConnectTunnel
&DirectConnectId=dc-abcdefgh
&DirectConnectTunnelName=Test
&NetworkType=CCN
&NetworkRegion=ap-guangzhou
&DirectConnectGatewayId=dcg-abcdefgh
&Bandwidth=100
&RouteType=BGP
&Vlan=100
&TencentAddress=192.168.1.2/30
&CustomerAddress=192.168.1.1/30
&BgpPeer.Asn=65128
&BgpPeer.AuthKey=abcdefg
&<Common request parameters>

Output Example

{
    "Response": {
        "DirectConnectTunnelIdSet": [
            "dcx-abcdefgh"
        ],
        "RequestId": "24a0d7e5-4c13-49be-aa16-94f698fbef3e"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError An internal error occurred.
InvalidParameter Invalid parameter.
InvalidParameter.AddressError Wrong IP address.
InvalidParameter.DirectConnectIdIsNotUin The connection does not belong to this account.
InvalidParameter.UinIsNotExist The account ID does not exist.
InvalidParameter.VlanConflict VLAN conflict.
InvalidParameterValue The parameter value is invalid.
InvalidParameterValue.VlanConfLict VLAN conflict.
LimitExceeded The quota limit is exceeded.
LimitExceeded.DirectConnectLimitExceeded The number of connections has reached the upper limit.
LimitExceeded.DirectConnectTunnelLimitExceeded The number of the dedicated tunnels of the connection has reached the upper limit.
MissingParameter Missing parameter.
ResourceInUse.DcVpcIsExist The connection VPC already exists.
ResourceUnavailable.InsufficientBalance Your account is in arrears, and the service cannot be activated. Please top up your account first.
UnsupportedOperation Unsupported operation.
UnsupportedOperation.CrossBorderDirectConnectTunnel Cross-border dedicated tunnel is not allowed. Please contact us.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈