Purchase VPN Gateway(old)

Last updated: 2019-12-14 10:00:07

1. API Description

This API (CreateVpn) is used to purchase VPN gateway.
Domain for API request: vpc.api.qcloud.com

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.

Parameter Name Required Type Description
name Yes string IPsec VPN gateway name. Up to 60 characters.
vpcId Yes string VPC ID or unified ID (unified ID is recommened). It can be queried via the API DescribeVpcEx.
period Yes Int Number of month you want to purchase (up to 36)
bandwidth Yes Int Bandwidth, supported values: 5, 10, 20, 50, 100 (in Mb).

3. Output Parameters

Parameter Name Type Description
code Int Error code, 0: Succeeded, other values: Failed.
message String Error message.
dealIds Array The generated order number. You can call DescribeVpnGw API to query VPN details

4. Error Code Table

The API does not have a business error code. For common error codes, see VPC Error Codes for details.

5. Example


  &<Common request parameters>


    "code" : 0,
    "message" : "ok",