vpc — Virtual Private Cloud
vpc · 2017-03-12

CreateVpnGateway

POST

Create a VPN gateway.

Wire call

Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /vpc/CreateVpnGateway path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.

curl
curl -sS https://vpc.api3.convergecloud.com/ \
  -H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/vpc/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'Host: vpc.api3.convergecloud.com' \
  -H 'X-TC-Action: CreateVpnGateway' \
  -H 'X-TC-Version: 2017-03-12' \
  -H 'X-TC-Timestamp: <unix-seconds>' \
  -H 'X-TC-Region: luzon' \
  -d '{"VpnGatewayName":"<VpnGatewayName>"}'

Request parameters

FieldTypeRequiredDescription
VpcIdstringYesVPC instance ID, which can be obtained from the `VpcId` field in the response of the `DescribeVpcs` API.
VpnGatewayNamestringYesThe VPN gateway name. The maximum length is 60 bytes.
InternetMaxBandwidthOutintegerYesThe public network bandwidth configuration. Available bandwidth specifications: 5, 10, 20, 50, and 100. Unit: Mbps
InstanceChargeTypestringNoThe VPN gateway billing mode. PREPAID: prepaid means yearly/monthly subscription. POSTPAID_BY_HOUR: postpaid means pay-as-you-go. Default: POSTPAID_BY_HOUR. If prepaid mode is specified, the `InstanceChargePrepaid` parameter must be entered.
InstanceChargePrepaidInstanceChargePrepaidNoParameter settings for prepaid billing mode, also known as yearly/monthly subscription. This parameter can specify the purchase period and other attributes such as auto-renewal. This parameter is mandatory for prepaid instances.
ZonestringNoThe availability zone, such as `ap-guangzhou-2`.
TypestringNoVPN gateway type. Values: `CCN` (CCN VPN gateway), `SSL` (SSL VPN gateway)
TagsTag[]NoBound tags, such as [{"Key": "city", "Value": "shanghai"}].
CdcIdstringNoCDC instance ID
MaxConnectionintegerNoMaximum number of connected clients allowed for the SSL VPN gateway. Valid values: [5, 10, 20, 50, 100]. This parameter is only required for SSL VPN gateways.
BgpAsnintegerNo—

Response

Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.

FieldTypeDescription
VpnGatewayVpnGatewayVPN gateway object.
RequestIdstringThe 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.
Success
{
  "Response": {
    "VpnGateway": …,
    "RequestId": "…"
  }
}
Error
{
  "Response": {
    "Error": { "Code": "…", "Message": "…" },
    "RequestId": "…"
  }
}

Try it

CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/vpc.
Request bodyvalid JSONPOST vpc.api3.convergecloud.com · CreateVpnGateway