Applies for a connection

Last updated: 2020-09-25 14:21:10

1. API Description

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

This API is used to apply for a connection.
When calling this API, please note that:
You need to complete identity verification for your account; otherwise, you cannot apply for a connection;
If there is any connection in arrears under your account, you cannot apply for more connections.

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 parameter. The value used for this API: CreateDirectConnect.
Version Yes String Common parameter. The value used for this API: 2018-04-10.
Region No String Common parameter. This parameter is not required for this API.
DirectConnectName Yes String Connection name.
AccessPointId Yes String Access point of connection.
You can call DescribeAccessPoints to get the region ID. The selected access point must exist and be available.
LineOperator Yes String ISP that provides connections. Valid values: ChinaTelecom (China Telecom), ChinaMobile (China Mobile), ChinaUnicom (China Unicom), In-houseWiring (in-house wiring), ChinaOther (other Chinese ISPs), InternationalOperator (international ISPs).
PortType Yes String Port type of connection. Valid values: 100Base-T (100-Megabit electrical Ethernet interface), 1000Base-T (1-Gigabit electrical Ethernet interface), 1000Base-LX (1-Gigabit single-module optical Ethernet interface; 10 KM), 10GBase-T (10-Gigabit electrical Ethernet interface), 10GBase-LR (10-Gigabit single-module optical Ethernet interface; 10 KM). Default value: 1000Base-LX.
CircuitCode No String Circuit code of a connection, which is provided by the ISP or connection provider.
Location No String Local IDC location.
Bandwidth No Integer Connection port bandwidth in Mbps. Value range: [2,10240]. Default value: 1000.
RedundantDirectConnectId No String ID of redundant connection.
Vlan No Integer VLAN for connection debugging, which is enabled and automatically assigned by default.
TencentAddress No String Tencent-side IP address for connection debugging, which is automatically assigned by default.
CustomerAddress No String User-side IP address for connection debugging, which is automatically assigned by default.
CustomerName No String Name of connection applicant, which is obtained from the account system by default.
CustomerContactMail No String Email address of connection applicant, which is obtained from the account system by default.
CustomerContactNumber No String Contact number of connection applicant, which is obtained from the account system by default.
FaultReportContactPerson No String Fault reporting contact person.
FaultReportContactNumber No String Fault reporting contact number.
SignLaw No Boolean Whether the connection applicant has signed the service agreement. Default value: true.

3. Output Parameters

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

4. Example

Example1 Creating a connection

This example shows you how to apply for a connection, where the access point is Nanshan, the ISP is China Mobile, and the Tencent Cloud port is a 1-Gigabit single-mode optical Ethernet interface (1000Base-LX), with a redundant connection.

Input Example

https://dc.tencentcloudapi.com/?Action=CreateDirectConnect
&DirectConnectName=Connection 1
&AccessPointId=ap-cn-shenzhen-ns-A
&LineOperator=ChinaMobile
&CircuitCode=Shenzhen Nanshan ANE0348NP
&Location=14/F, Building A, Science and Technology Park, Nanshan District, Shenzhen, Guangdong Province
&PortType=1000Base-LX
&Bandwidth=1000
&RedundantDirectConnectId=dc-abcdedf
&Vlan=100
&TencentAddress=172.168.1.1/30
&CustomerAddress=172.168.1.2/30
&CustomerName=John Smith
&CustomerContactMail=12345@qq.com
&CustomerContactNumber=18812345678
&<Common request parameters>

Output Example

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

Example2 Creating a connection - 2

This example shows you how to apply for a connection, where the access point is TravelSky, the ISP is China Mobile, and the Tencent Cloud port is a 1-Gigabit single-mode optical Ethernet interface (1000Base-LX).

Input Example

https://dc.tencentcloudapi.com/?Action=CreateDirectConnect
&DirectConnectName=TravelSky connection 1
&AccessPointId=ap-cn-beijing-hx
&LineOperator=ChinaMobile
&CircuitCode=TravelSky ANE0348NP
&Location=14/F, Sigma Mansion A, Haidian District, Beijing
&PortType=1000Base-LX
&Bandwidth=1000
&CustomerName=John Smith
&CustomerContactMail=12345@qq.com
&CustomerContactNumber=18812345678
&<Common request parameters>

Output Example

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

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

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 Internal error
LimitExceeded Quota limit is reached.
LimitExceeded.DirectConnectLimitExceeded The number of connections has reached the upper limit.
ResourceNotFound The resource does not exist.
UnauthorizedOperation Unauthorized operation.
UnsupportedOperation Unsupported operation.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help