tencent cloud

文档反馈

CreateDirectConnectGateway

最后更新时间:2024-11-25 20:09:40

    1. API Description

    Domain name for API request: vpc.intl.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.

    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: CreateDirectConnectGateway.
    Version Yes String Common Params. The value used for this API: 2017-03-12.
    Region Yes String Common Params. 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
    ModeType No String CCN route publishing method. Valid values: standard and exquisite. This parameter is only valid for the CCN direct connect gateway.
    Zone No String Availability zone where the direct connect gateway resides.
    HaZoneGroupId No String ID of DC highly available placement group

    3. Output Parameters

    Parameter Name Type Description
    DirectConnectGateway DirectConnectGateway The object of the direct connect gateway.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Creating a NAT direct connect gateway associated with a VPC

    Input Example

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

    Output Example

    {
        "Response": {
            "DirectConnectGateway": {
                "DirectConnectGatewayId": "dcg-gjug0kul",
                "DirectConnectGatewayName": "test",
                "DirectConnectGatewayIp": "10.21.0.5",
                "EnableBGPCommunity": false,
                "VpcId": "vpc-m7sr81gh",
                "CcnId": "",
                "EnableBGP": false,
                "CcnRouteType": "BGP",
                "NetworkType": "VPC",
                "NetworkInstanceId": "vpc-m7sr81gh",
                "GatewayType": "NAT",
                "VXLANSupport": [
                    true
                ],
                "NatGatewayId": "nat-m7dr11gc",
                "LocalZone": false,
                "Zone": "ap-guangzhou-1",
                "ModeType": "standard",
                "NewAfc": 0,
                "FlowDetailsUpdateTime": "xx",
                "EnableFlowDetails": 0,
                "AccessNetworkType": "Unknown",
                "CreateTime": "2020-09-22 00:00:00"
            },
            "RequestId": "b8351d12-3c82-4d4b-9d88-972e02ca4620"
        }
    }
    

    Example2 Creating a standard direct connect gateway associated with a CCN

    Input Example

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

    Output Example

    {
        "Response": {
            "DirectConnectGateway": {
                "DirectConnectGatewayId": "dcg-3vwxt61v",
                "DirectConnectGatewayName": "test",
                "VpcId": "vpc-ilii3ejt",
                "NetworkType": "CCN",
                "NetworkInstanceId": "ccn-c1aopa13",
                "GatewayType": "NORMAL",
                "EnableBGPCommunity": true,
                "EnableBGP": true,
                "CcnId": "ccn-8j0phqix",
                "CcnRouteType": "BGP",
                "NatGatewayId": "",
                "DirectConnectGatewayIp": "10.21.0.5",
                "LocalZone": false,
                "Zone": "ap-guangzhou-1",
                "ModeType": "standard",
                "VXLANSupport": [
                    true
                ],
                "CreateTime": "0000-00-00 00:00:00",
                "NewAfc": 1,
                "FlowDetailsUpdateTime": "xx",
                "EnableFlowDetails": 0,
                "AccessNetworkType": "VXLAN"
            },
            "RequestId": "b8351d12-3c82-4d4b-9d88-972e02ca4620"
        }
    }
    

    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
    InvalidParameter.VpgHaGroupNotFound The cross-AZ placement group of the DC gateway doesn't exist.
    InvalidParameterValue.Empty Missing parameters.
    InvalidParameterValue.Malformed Invalid input parameter format.
    LimitExceeded Quota limit is reached.
    ResourceNotFound The resource does not exist.
    UnsupportedOperation Unsupported operation.
    UnsupportedOperation.AppIdMismatch The resource is not under the specified AppId.
    UnsupportedOperation.CcnRouteTableNotExist The specified route table does not exist.
    UnsupportedOperation.UnableCrossBorder Cross border is not supported.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持