DescribeDirectConnectTunnels

Last updated: 2020-03-27 18:27:37

1. API Description

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

This API is used to query the list of dedicated tunnels.

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

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: DescribeDirectConnectTunnels.
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.
Filters.N No Array of Filter Filter conditions:
This parameter does not support specifying DirectConnectTunnelIds and Filters at the same time.
  • direct-connect-tunnel-name: Dedicated tunnel name.
  • direct-connect-tunnel-id: Dedicated tunnel instance ID, such as dcx-abcdefgh.
  • direct-connect-id: Connection instance ID, such as dc-abcdefgh.
  • DirectConnectTunnelIds.N No Array of String Array of dedicated tunnel IDs.
    Offset No Integer Offset. Default value: 0.
    Limit No Integer Number of returned results. Default value: 20. Maximum value: 100.

    3. Output Parameters

    Parameter Name Type Description
    DirectConnectTunnelSet Array of DirectConnectTunnel List of dedicated tunnels.
    TotalCount Integer Number of eligible dedicated tunnels.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying dedicated tunnels using BGP routing

    Input Example

    https://dc.tencentcloudapi.com/?Action=DescribeDirectConnectTunnels
    &Filters.0.Name=direct-connect-tunnel-id
    &Filters.0.Values.0=dcx-r3sml04o
    &Limit=20
    &Offset=1
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "DirectConnectTunnelSet": [
          {
            "DirectConnectOwnerAccount": "2407912486",
            "DirectConnectGatewayId": "dcg-r70hz833",
            "BgpPeer": {
              "AuthKey": "tencent",
              "Asn": 65139
            },
            "OwnerAccount": "2407912486",
            "DirectConnectId": "dc-9s5kpgyp",
            "State": "PENDING",
            "TencentAddress": "169.254.64.1/30",
            "CreatedTime": "2018-06-01 14:59:16",
            "DirectConnectTunnelId": "dcx-r3sml04o",
            "NetworkRegion": "ap-guangzhou",
            "VpcId": "vpc-aipqhdez",
            "CustomerAddress": "169.254.64.2/30",
            "Vlan": 1321,
            "RouteFilterPrefixes": [],
            "NetworkType": "VPC",
            "DirectConnectTunnelName": "Test dedicated tunnel",
            "RouteType": "BGP"
          }
        ]
      }
    }

    Example2 Querying dedicated tunnels using static routing

    Input Example

    https://dc.tencentcloudapi.com/?Action=DescribeDirectConnectTunnels
    &Filters.0.Name=direct-connect-tunnel-id
    &Filters.0.Values.0=dcx-r3sml04o
    &Limit=20
    &Offset=2
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "DirectConnectTunnelSet": [
          {
            "DirectConnectOwnerAccount": "2407912486",
            "DirectConnectGatewayId": "dcg-r70hz833",
            "BgpPeer": {
              "AuthKey": "",
              "Asn": -1
            },
            "OwnerAccount": "2407912486",
            "DirectConnectId": "dc-9s5kpgyp",
            "State": "PENDING",
            "TencentAddress": "169.254.64.1/30",
            "CreatedTime": "2018-06-01 14:59:16",
            "DirectConnectTunnelId": "dcx-r3sml04o",
            "NetworkRegion": "ap-guangzhou",
            "VpcId": "vpc-aipqhdez",
            "CustomerAddress": "169.254.64.2/30",
            "Vlan": 1321,
            "RouteFilterPrefixes": [
              {
                "Cidr": "172.18.27.6/32"
              },
              {
                "Cidr": "172.18.27.0/24"
              }
            ],
            "NetworkType": "VPC",
            "DirectConnectTunnelName": "Test dedicated tunnel",
            "RouteType": "STATIC"
          }
        ]
      }
    }

    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
    ResourceNotFound The resource does not exist.
    ResourceNotFound.DirectConnectTunnelIdIsNotExist The dedicated tunnel does not exist.