deleteNatGatewayInstance

Prev Next

Available in VPC

Delete a NAT Gateway instance by specifying the NAT Gateway instance number.

Syntax

The deleteNatGatewayInstance syntax is as follows:

./ncloud vpc deleteNatGatewayInstance \
    --natGatewayInstanceNo <nat-gateway-instance-no> \
    [--returnPublicIpInstance <true|false>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running deleteNatGatewayInstance.

Required options

The following options are required for deleteNatGatewayInstance.

Options Type Required Description
--natGatewayInstanceNo String Required NAT Gateway instance number

Optional options

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

Options Type Required Description
--returnPublicIpInstance Boolean Optional Whether to terminate along with the public IP instance
  • true (default) | false
    • true: Deletes the Public IP instance assigned to the public NAT Gateway together.
    • false: Retains the public IP instance.

Common options

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

Examples

If the request to delete a NAT Gateway instance is successful, the configuration information and termination status of the NAT Gateway instance are returned.

Command

The command example is as follows:

./ncloud vpc deleteNatGatewayInstance \
    --natGatewayInstanceNo 56789012 \
    --returnPublicIpInstance true \
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "deleteNatGatewayInstanceResponse": {
    "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": "Terminating",
        "natGatewayInstanceOperation": {
          "code": "TERMT",
          "codeName": "TERMINATE 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": "e5f6a7b8-c9d0-1234-efab-567890123456",
    "returnCode": "0",
    "returnMessage": "success"
  }
}