DescribeDirectConnectGateways

Last updated: 2020-10-16 18:47:11

1. API Description

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

This API is used to query direct connect gateways.

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

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: vpc.ap-shanghai-fsi.tencentcloudapi.com

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: DescribeDirectConnectGateways.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
DirectConnectGatewayIds.N No Array of String The unique ID of the direct connect gateway, such as dcg-9o233uri.
Filters.N No Array of Filter Filter condition. DirectConnectGatewayIds and Filters cannot be specified at the same time.
  • direct-connect-gateway-id - String - The unique ID of the direct connect gateway, such as dcg-9o233uri.
  • direct-connect-gateway-name - String - The name of the direct connect gateway. The default is fuzzy query.
  • direct-connect-gateway-ip - String - The IP of the direct connect gateway.
  • gateway-type - String - The gateway type. Valid values: NORMAL (Standard type), NAT (NAT type).
  • network-type- String - The network type. Valid values: VPC (VPC type), CCN (CCN type).
  • ccn-id - String - The ID of the CCN where the direct connect gateway resides.
  • vpc-id - String - The ID of the VPC where the direct connect gateway resides.
  • Offset No Integer The offset.
    Limit No Integer Max number of results returned

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer The number of eligible objects.
    DirectConnectGatewaySet Array of DirectConnectGateway The object array of the direct connect gateway.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the list of direct connect gateways by multiple conditions

    Input Example

    https://vpc.tencentcloudapi.com/?Action=DescribeDirectConnectGateways
    &Filters.0.Name=direct-connect-gateway-name
    &Filters.0.Values.0=test
    &Filters.1.Name=gateway-type
    &Filters.1.Values.0=NORMAL
    &Filters.2.Name=vpc-id
    &Filters.2.Values.0=vpc-f796it7v
    &Filters.2.Values.1=vpc-jkmjx7pd
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "DirectConnectGatewaySet": [
          {
            "DirectConnectGatewayId": "dcg-94cdyvfr",
            "DirectConnectGatewayName": "test",
            "DirectConnectGatewayIp": "10.144.25.62",
            "GatewayType": "NORMAL",
            "NetworkType": "CCN",
            "NetworkInstanceId": "",
            "VpcId": "vpc-f796it7v",
            "CcnId": "",
            "CcnRouteType": "STATIC",
            "EnableBGP": false,
            "CreateTime": "2018-08-21 11:40:09"
          },
          {
            "DirectConnectGatewayId": "dcg-6eeis68f",
            "DirectConnectGatewayName": "shiliangxie_test",
            "DirectConnectGatewayIp": "10.6.223.4",
            "GatewayType": "NORMAL",
            "NetworkType": "CCN",
            "NetworkInstanceId": "",
            "VpcId": "vpc-jkmjx7pd",
            "CcnId": "",
            "CcnRouteType": "STATIC",
            "EnableBGP": false,
            "CreateTime": "2018-10-22 21:22:26"
          }
        ],
        "TotalCount": 2,
        "RequestId": "8c77ce69-68e2-4dfa-94ea-a6df5c914f52"
      }
    }

    Example2 Querying direct connect gateways by ID

    Input Example

    https://vpc.tencentcloudapi.com/?Action=DescribeDirectConnectGateways
    &DirectConnectGatewayIds.0=dcg-dimeg9zd
    &DirectConnectGatewayIds.1=dcg-6eeis68f
    &DirectConnectGatewayIds.2=dcg-94cdyvfr
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "DirectConnectGatewaySet": [
          {
            "DirectConnectGatewayId": "dcg-6eeis68f",
            "DirectConnectGatewayName": "shiliangxie_test",
            "DirectConnectGatewayIp": "10.6.223.4",
            "GatewayType": "NORMAL",
            "NetworkType": "CCN",
            "NetworkInstanceId": "",
            "VpcId": "vpc-jkmjx7pd",
            "CcnId": "",
            "CcnRouteType": "STATIC",
            "EnableBGP": false,
            "CreateTime": "2018-10-22 21:22:26"
          },
          {
            "DirectConnectGatewayId": "dcg-94cdyvfr",
            "DirectConnectGatewayName": "test",
            "DirectConnectGatewayIp": "10.144.25.62",
            "GatewayType": "NORMAL",
            "NetworkType": "CCN",
            "NetworkInstanceId": "",
            "VpcId": "vpc-f796it7v",
            "CcnId": "",
            "CcnRouteType": "STATIC",
            "EnableBGP": false,
            "CreateTime": "2018-08-21 11:40:09"
          },
          {
            "DirectConnectGatewayId": "dcg-dimeg9zd",
            "DirectConnectGatewayName": "test",
            "DirectConnectGatewayIp": "10.144.25.62",
            "GatewayType": "NORMAL",
            "NetworkType": "CCN",
            "NetworkInstanceId": "ccn-atw2c2j1",
            "VpcId": "vpc-eg3eig77",
            "CcnId": "ccn-atw2c2j1",
            "CcnRouteType": "STATIC",
            "EnableBGP": false,
            "CreateTime": "2018-08-21 11:36:50"
          }
        ],
        "TotalCount": 3,
        "RequestId": "1b64d03b-7d2d-4d9b-b46e-49de115ac283"
      }
    }

    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
    InvalidParameter.Coexist The parameters cannot be specified at the same time.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.Malformed Invalid input parameter format.
    InvalidParameterValue.TooLong Invalid parameter value. The parameter value is too long.

    Was this page helpful?

    Was this page helpful?

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