Create Direct Connect Gateways

Last updated: 2017-04-13 18:37:57


1. API Description

This API (CreateDirectConnectGateway) is used to create Direct Connect gateway.
Domain for API

1) Direct Connect gateway is used to connect virtual private cloud and your private Direct Connect. For more information, refer to Direct Connect Gateway Product Overview.
2) There are two types of Direct Connect gateway: NAT and non-NAT. The former supports the configuration of network address translation. Once specified, the type cannot be changed. You may create a NAT Direct Connect gateway and a non-NAT one gateway for a VPC.

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is CreateDirectConnectGateway.

Parameter Name Required Type Description
vpcId Yes String VPC ID assigned by the system, e.g. vpc-dgd545
directConnectGatewayName Yes String Direct Connect gateway name, which has a length of 1-25 characters, and can contain Chinese characters, uppercase and lowercase English letters, numbers, and underscores
type No Int Type of Direct Connect gateway; 0: Non-NAT; 1: NAT. Default is non-NAT

3. Output Parameters

Parameter Name Type Description
code Int Error code, 0: Succeeded, other values: Failed
message String Error message
data.n.directConnectGatewayId String Direct Connect gateway ID, e.g. dcg-mmf0dp2b

4. Error Code List

The following error code list only provides the business logic error codes for this API. For additional common error codes, refer to VPC Error Codes.

Error Code Description
InvalidDirectConnectGatewayName Invalid Direct Connect gateway name. Valid name has a length of 1-60 characters, and can contain Chinese characters, uppercase and lowercase English letters, numbers, and underscores
DirectConnectGatewayLimitExceeded The limit of requested Direct Connect gateway resources for the specific region has been reached. Please contact customer service for more resources. For more information on VPC resource restrictions, refer to VPC Usage Restrictions.
InvalidVpc.NotFound Invalid VPC. VPC resource does not exist. Please verify that you have entered resource information correctly.

5. Example

&<Common request parameters>
&directConnectGatewayName=Direct Connect gateway