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
| Field | Type | Required | Description |
|---|---|---|---|
| VpcId | string | Yes | VPC instance ID, which can be obtained from the `VpcId` field in the response of the `DescribeVpcs` API. |
| VpnGatewayName | string | Yes | The VPN gateway name. The maximum length is 60 bytes. |
| InternetMaxBandwidthOut | integer | Yes | The public network bandwidth configuration. Available bandwidth specifications: 5, 10, 20, 50, and 100. Unit: Mbps |
| InstanceChargeType | string | No | The 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. |
| InstanceChargePrepaid | InstanceChargePrepaid | No | Parameter 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. |
| Zone | string | No | The availability zone, such as `ap-guangzhou-2`. |
| Type | string | No | VPN gateway type. Values: `CCN` (CCN VPN gateway), `SSL` (SSL VPN gateway) |
| Tags | Tag[] | No | Bound tags, such as [{"Key": "city", "Value": "shanghai"}]. |
| CdcId | string | No | CDC instance ID |
| MaxConnection | integer | No | Maximum 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. |
| BgpAsn | integer | No | — |
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.
| Field | Type | Description |
|---|---|---|
| VpnGateway | VpnGateway | VPN gateway object. |
| 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. |
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
