CreateNatGateway
Create a NAT 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/CreateNatGateway path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.
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: CreateNatGateway' \
-H 'X-TC-Version: 2017-03-12' \
-H 'X-TC-Timestamp: <unix-seconds>' \
-H 'X-TC-Region: luzon' \
-d '{"NatGatewayName":"<NatGatewayName>","VpcId":"<VpcId>"}'Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| NatGatewayName | string | Yes | NAT gateway name |
| VpcId | string | Yes | The ID of the VPC instance, which can be obtained from the `VpcId` field in response of the `DescribeVpcs` API. |
| InternetMaxBandwidthOut | integer | No | The maximum outbound bandwidth of the NAT gateway (unit: Mbps). Supported parameter values: `20, 50, 100, 200, 500, 1000, 2000, 5000`. Default: `100`. |
| MaxConcurrentConnection | integer | No | The concurrent connection cap of the NAT gateway. Values: `1000000, 3000000, 10000000`. The default value is `1000000`. |
| AddressCount | integer | No | The number of EIPs that you want to apply for. Either `AddressCount` or `PublicIpAddresses` must be passed in. |
| PublicIpAddresses | string[] | No | The EIP array bound to the NAT gateway. Either AddressCount or PublicIpAddresses must be passed in. |
| Zone | string | No | The availability zone, such as `ap-guangzhou-1`. |
| Tags | Tag[] | No | Bound tags, such as [{"Key": "city", "Value": "shanghai"}] |
| SubnetId | string | No | Subnet of the NAT gateway |
| StockPublicIpAddressesBandwidthOut | integer | No | The bandwidth size (in Mbps) of the EIP bound to the NAT gateway, which defaults to the maximum value applicable for the current user type. |
| PublicIpAddressesBandwidthOut | integer | No | The size of the public network IP bandwidth to be applied for (in Mbps), which defaults to the maximum value applicable for the current user type. |
| PublicIpFromSameZone | boolean | No | Whether the public IP and the NAT gateway must be in the same availability zone. Valid values: `true` and `false`. This parameter is valid only when `Zone` is specified. |
| NatProductVersion | integer | No | NAT gateway major version. `1`: Classic, `2`: Standard |
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 |
|---|---|---|
| NatGatewaySet | NatGateway[] | NAT gateway object array. |
| TotalCount | integer | The number of eligible NAT gateway objects. |
| 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. |
{
"Response": {
"NatGatewaySet": …,
"TotalCount": …,
"RequestId": "…"
}
}{
"Response": {
"Error": { "Code": "…", "Message": "…" },
"RequestId": "…"
}
}Try it
Recorded example response — captured 2026-09-17
{
"Response": {
"NatGatewaySet": [
{
"NatGatewayId": "nat-b6ku8fsk",
"NatGatewayName": "example-network",
"GatewayType": "NORMAL",
"VpcId": "vpc-5gqs921z",
"State": "PENDING",
"NetworkState": "AVAILABLE",
"InternetMaxBandwidthOut": 20,
"InternetMaxBandwidthIn": 5000,
"MaxConcurrentConnection": 1000000,
"PublicIpAddressSet": [],
"DestinationIpPortTranslationNatRuleSet": [],
"SourceIpTranslationNatRuleSet": [],
"CreatedTime": "0000-00-00 00:00:00",
"Zone": "clz-1",
"TagSet": [],
"NatProductVersion": 1,
"NatType": "NAT",
"StrictSnatMode": false,
"SmartScheduleMode": false,
"DirectConnectGatewayIds": [],
"SubnetId": null,
"SecurityGroupSet": [],
"IsExclusive": false,
"ExclusiveGatewayBandwidth": null,
"SharedCount": null,
"RestrictState": "NORMAL",
"DedicatedClusterId": null
}
],
"TotalCount": 1,
"RequestId": "fed6f13d-75f0-ad76-7b4f-049147ea8284"
}
}Behaviour
PublicIpAddresses takes the IP address itself, not the address id, so allocate the address first and read AddressIp from it. The gateway is returned immediately with State PENDING and becomes usable when State reaches AVAILABLE. NetworkState reports AVAILABLE before State does.
