getNatGatewayInstanceList

Prev Next

Available in VPC

Get the list of NAT Gateway instances based on the conditions the user specifies.

Syntax

The getNatGatewayInstanceList syntax is as follows:

./ncloud vpc getNatGatewayInstanceList \
    [--zoneCode <zone-code>] \
    [--natGatewayInstanceNoList <nat-gateway-instance-no-list>] \
    [--natGatewayName <nat-gateway-name>] \
    [--natGatewayInstanceStatusCode <INIT|RUN|SET|TERMTING>] \
    [--natGatewayTypeCode <PRVT|PBLIP>] \
    [--vpcName <vpc-name>] \
    [--subnetName <subnet-name>] \
    [--subnetNo <subnet-no>] \
    [--publicIp <public-ip>] \
    [--privateIp <private-ip>] \
    [--pageNo <page-no>] \
    [--pageSize <page-size>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running getNatGatewayInstanceList.

Required options

The following options are required for getNatGatewayInstanceList.

Options Type Required Description
--pageSize Integer Conditional Page size to display when paginating
  • Required if pageNo is entered.
  • Uses pageNo and pageSize to paginate the results.

Optional options

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

Options Type Required Description
--zoneCode String Optional Zone code
--natGatewayInstanceNoList List Optional NAT Gateway instance number list
  • You can enter multiple items separated by spaces (e.g., --natGatewayInstanceNoList 1234 2345).
--natGatewayName String Optional NAT Gateway name
--natGatewayInstanceStatusCode String Optional NAT Gateway instance status code
  • INIT | RUN | SET | TERMTING
--natGatewayTypeCode String Optional NAT Gateway type
  • PRVT | PBLIP
    • PRVT: private NAT Gateway
    • PBLIP: public NAT Gateway
--vpcName String Optional VPC name
--subnetName String Optional Subnet name
--subnetNo String Optional Subnet number
--publicIp String Optional Public IP address
--privateIp String Optional Private IP address
--pageNo Integer Optional Page numbers in paged results
  • Page the result values using pageNo and pageSize.

Common options

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

Examples

If the request to retrieve the list of NAT Gateway instances is successful, the configuration information for each NAT Gateway instance is returned.

Command

The command example is as follows:

./ncloud vpc getNatGatewayInstanceList \
    --zoneCode KR-1 \
    --natGatewayInstanceNoList 56789012 56789013 \
    --natGatewayName test-natgw-01 \
    --natGatewayInstanceStatusCode RUN \
    --natGatewayTypeCode PBLIP \
    --vpcName test-vpc-01 \
    --subnetName test-natgw-subnet \
    --subnetNo 23456789 \
    --publicIp 192.0.2.10 \
    --privateIp 10.0.3.6 \
    --pageNo 0 \
    --pageSize 10 \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "getNatGatewayInstanceListResponse": {
    "totalRows": 1,
    "natGatewayInstanceList": [
      {
        "vpcNo": "12345678",
        "vpcName": "test-vpc-01",
        "natGatewayInstanceNo": "56789012",
        "natGatewayName": "test-natgw-01",
        "publicIp": "192.0.2.10",
        "natGatewayInstanceStatus": {
          "code": "RUN",
          "codeName": "In operation"
        },
        "natGatewayInstanceStatusName": "Running",
        "natGatewayInstanceOperation": {
          "code": "NULL",
          "codeName": "NULL OP"
        },
        "createDate": "2026-07-07T14:48:38+0900",
        "natGatewayDescription": "Updated NAT Gateway description",
        "zoneCode": "KR-1",
        "natGatewayType": {
          "code": "PBLIP",
          "codeName": "Public"
        },
        "subnetName": "test-natgw-subnet",
        "subnetNo": "23456789",
        "privateIp": "10.0.3.6",
        "publicIpInstanceNo": "78901234",
        "natGatewayIpList": [
          {
            "type": "PRIMARY",
            "privateIp": "10.0.3.6",
            "publicIp": "192.0.2.10",
            "publicIpInstanceNo": "78901234"
          }
        ]
      }
    ],
    "requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "returnCode": "0",
    "returnMessage": "success"
  }
}