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

CreateNatGateway

POST

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
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

FieldTypeRequiredDescription
NatGatewayNamestringYesNAT gateway name
VpcIdstringYesThe ID of the VPC instance, which can be obtained from the `VpcId` field in response of the `DescribeVpcs` API.
InternetMaxBandwidthOutintegerNoThe maximum outbound bandwidth of the NAT gateway (unit: Mbps). Supported parameter values: `20, 50, 100, 200, 500, 1000, 2000, 5000`. Default: `100`.
MaxConcurrentConnectionintegerNoThe concurrent connection cap of the NAT gateway. Values: `1000000, 3000000, 10000000`. The default value is `1000000`.
AddressCountintegerNoThe number of EIPs that you want to apply for. Either `AddressCount` or `PublicIpAddresses` must be passed in.
PublicIpAddressesstring[]NoThe EIP array bound to the NAT gateway. Either AddressCount or PublicIpAddresses must be passed in.
ZonestringNoThe availability zone, such as `ap-guangzhou-1`.
TagsTag[]NoBound tags, such as [{"Key": "city", "Value": "shanghai"}]
SubnetIdstringNoSubnet of the NAT gateway
StockPublicIpAddressesBandwidthOutintegerNoThe bandwidth size (in Mbps) of the EIP bound to the NAT gateway, which defaults to the maximum value applicable for the current user type.
PublicIpAddressesBandwidthOutintegerNoThe 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.
PublicIpFromSameZonebooleanNoWhether 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.
NatProductVersionintegerNoNAT 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.

FieldTypeDescription
NatGatewaySetNatGateway[]NAT gateway object array.
TotalCountintegerThe number of eligible NAT gateway objects.
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": {
    "NatGatewaySet": …,
    "TotalCount": …,
    "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 · CreateNatGateway
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.