CreateDirectConnectGateway

Last updated: 2020-07-10 10:34:23

1. API Description

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

This API is used to create a direct connect gateway.

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: CreateDirectConnectGateway.
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.
DirectConnectGatewayName Yes String The name of the direct connect gateway.
NetworkType Yes String The type of the associated network. Valid values:
  • VPC
  • CCN
  • NetworkInstanceId Yes String
  • When the NetworkType is VPC, this value is the VPC instance ID
  • When the NetworkType is CCN, this value is the CCN instance ID
  • GatewayType No String The type of the gateway. Valid values:
  • NORMAL - (Default) Standard type. Note: CCN only supports the standard type
  • NAT - NAT type
  • NAT gateway supports network address translation. The specified type cannot be modified. A VPC can create one NAT direct connect gateway and one non-NAT direct connect gateway

    3. Output Parameters

    Parameter Name Type Description
    DirectConnectGateway DirectConnectGateway The object 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 Creating a standard direct connect gateway associated with a CCN

    Input Example

    https://vpc.tencentcloudapi.com/?Action=CreateDirectConnectGateway
    &<Common request parameters>
    &DirectConnectGatewayName=test
    &NetworkType=CCN
    &NetworkInstanceId=ccn-8j0phqix
    &GatewayType=NORMAL

    Output Example

    {
      "Response": {
        "DirectConnectGateway": {
          "DirectConnectGatewayId": "dcg-3vwxt61v",
          "DirectConnectGatewayName": "test",
          "VpcId": "vpc-ilii3ejt",
          "NetworkType": "CCN",
          "NetworkInstanceId": "ccn-c1aopa13",
          "GatewayType": "NORMAL",
          "DirectConnectTunnelCount": 0,
          "CreateTime": "0000-00-00 00:00:00"
        },
        "RequestId": "b8351d12-3c82-4d4b-9d88-972e02ca4620"
      }
    }

    Example2 Creating a NAT direct connect gateway associated with a VPC

    Input Example

    https://vpc.tencentcloudapi.com/?Action=CreateDirectConnectGateway
    &<Common request parameters>
    &DirectConnectGatewayName=test
    &NetworkType=VPC
    &NetworkInstanceId=vpc-m7sr81gh
    &GatewayType=NAT

    Output Example

    {
      "Response": {
        "DirectConnectGateway": {
          "DirectConnectGatewayId": "dcg-gjug0kul",
          "DirectConnectGatewayName": "test",
          "VpcId": "vpc-m7sr81gh",
          "NetworkType": "VPC",
          "NetworkInstanceId": "vpc-m7sr81gh",
          "GatewayType": "NAT",
          "DirectConnectTunnelCount": 8,
          "CreatedTime": "0000-00-00 00:00:00"
        },
        "RequestId": "b8351d12-3c82-4d4b-9d88-972e02ca4620"
      }
    }

    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

    There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

    Was this page helpful?

    Was this page helpful?

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