createNatGatewayInstance

Prev Next

Available in VPC

Create a NAT Gateway instance.

Syntax

The createNatGatewayInstance syntax is as follows:

./ncloud vpc createNatGatewayInstance \
    --vpcNo <vpc-no> \
    --zoneCode <zone-code> \
    [--natGatewayName <nat-gateway-name>] \
    [--natGatewayDescription <nat-gateway-description>] \
    [--subnetNo <subnet-no>] \
    [--publicIpInstanceNo <public-ip-instance-no>] \
    [--privateIp <private-ip>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running createNatGatewayInstance.

Required options

The following options are required for createNatGatewayInstance.

Options Type Required Description
--vpcNo String Required VPC number
--zoneCode String Required Zone code

Optional options

These are the optional options for createNatGatewayInstance. Options that are not specified will use their default values.

Options Type Required Description
--natGatewayName String Optional NAT Gateway name
  • Enter 3-15 characters, including lowercase English letters, numbers, and special character -.
  • The string must begin with an English letter and end with an English letter or number.
  • If not entered, NAVER Cloud Platform will assign one automatically.
--natGatewayDescription String Optional Description of NAT Gateway to create (byte)
  • 0-1000
--subnetNo String Optional Subnet number
  • If subnetNo is NULL, it is created in a PUBLIC type NAT Gateway subnet.
  • If subnetNo is NOT-NULL, NAT Gateway is created according to the subnetTypeCode of the specified NAT Gateway subnet.
  • See getSubnetList.
--publicIpInstanceNo String Optional Public IP instance number
  • If the subnet is a PRIVATE type, this option is ignored.
  • If the subnet is a PUBLIC type:
    • A public IP is automatically created if publicIpInstanceNo is NULL;
    • A specified public IP is assigned if publicIpInstanceNo is NOT-NULL.
--privateIp String Optional Private IP address
  • If privateIp is NULL, a private IP is automatically assigned.
  • If privateIp is NOT-NULL, a specified private IP is assigned.

Common options

For information about the options common to all vpc subcommands, see VPC options.

Examples

If the request to create a NAT Gateway instance is successful, the instance's configuration information and creation status are returned.

Command

The command example is as follows:

./ncloud vpc createNatGatewayInstance \
    --vpcNo 12345678 \
    --zoneCode KR-1 \
    --natGatewayName test-natgw-01 \
    --natGatewayDescription "Test NAT Gateway" \
    --subnetNo 23456789 \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "createNatGatewayInstanceResponse": {
    "totalRows": 1,
    "natGatewayInstanceList": [
      {
        "vpcNo": "12345678",
        "vpcName": "test-vpc-01",
        "natGatewayInstanceNo": "56789012",
        "natGatewayName": "test-natgw-01",
        "publicIp": "",
        "natGatewayInstanceStatus": {
          "code": "INIT",
          "codeName": "Under preparation"
        },
        "natGatewayInstanceStatusName": "Creating",
        "natGatewayInstanceOperation": {
          "code": "CREAT",
          "codeName": "CREAT OP"
        },
        "createDate": "2026-07-07T14:48:38+0900",
        "natGatewayDescription": "Test NAT Gateway",
        "zoneCode": "KR-1",
        "natGatewayType": {
          "code": "PBLIP",
          "codeName": "Public"
        },
        "subnetName": "test-natgw-subnet",
        "subnetNo": "23456789",
        "privateIp": "10.0.3.6",
        "publicIpInstanceNo": "",
        "natGatewayIpList": [
          {
            "type": "PRIMARY",
            "privateIp": "10.0.3.6",
            "publicIp": "",
            "publicIpInstanceNo": ""
          }
        ]
      }
    ],
    "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "returnCode": "0",
    "returnMessage": "success"
  }
}