tencent cloud

Feedback

DescribeDirectConnectGateways

Last updated: 2023-07-11 17:48:55

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.

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: DescribeDirectConnectGateways.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region No String Common Params. This parameter is not required for this API.
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 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"
        }
    }
    

    Example2 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"
        }
    }
    

    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.ModuleError Internal module error
    InvalidParameter.Coexist The parameters cannot be specified at the same time.
    InvalidParameter.FilterNotDict The specified filter condition should be a key-value pair.
    InvalidParameter.FilterValuesNotList The specified filter value should be a list.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.Malformed Invalid input parameter format.
    InvalidParameterValue.Range The parameter value is not in the specified range.
    InvalidParameterValue.TooLong Invalid parameter value. The parameter value is too long.
    UnsupportedOperation Unsupported operation.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support