tencent cloud

文档反馈

DescribeDirectConnectTunnels

最后更新时间:2022-10-18 10:39:12

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.

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: DescribeDirectConnectTunnels.
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.
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

    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
    AuthFailure CAM signature/authentication error
    AuthFailure.UnauthorizedOperation Unauthorized operation: CAM signature or authentication error.
    InternalError An internal error occurred.
    ResourceNotFound The resource does not exist.
    ResourceNotFound.DirectConnectTunnelIdIsNotExist The dedicated tunnel does not exist.