createNatGatewayInstance

Prev Next

Available in VPC

Create a NAT Gateway instance.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET | POST /vpc/v2/createNatGatewayInstance
Note

This guide is based on the GET method. POST method call tests can be performed through Swagger in the API Gateway service of the NAVER Cloud Platform console.

Request headers

For information about the headers common to all VPC APIs, see VPC common headers.

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
regionCode String Optional Region code where you want to create a network ACL instance
zoneCode String Required Zone where you want to create a NAT Gateway instance
vpcNo String Required Number of VPC where you want to create a NAT Gateway instance
natGatewayName String Optional Name of NAT Gateway to create
  • Granted automatically by NAVER Cloud Platform (default)
  • 3 to 30 characters, including letters, numbers, and the special character "-". It must begin with an English letter and end with an English letter or number.
natGatewayDescription String Optional Description of NAT Gateway to create
  • 0-1000 bytes
output String Optional Format of the response result
  • xml | json (default)
publicIpInstanceNo String Optional Public IP instance number
  • This parameter is ignored if the subnet is the PRIVATE type.
  • If the subnet is the PUBLIC type
    • A public ID 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.
subnetNo String Optional Number of subnet where you want to create a NAT Gateway instance
  • If subnetNo is NULL, it is created in a NAT Gateway subnet of PUBLIC type.
  • If subnetNo is NOT-NULL, NAT Gateway is created according to subnetTypeCode of the NAT Gateway subnet.

Request example

The request example is as follows:

curl --location 'https://ncloud.apigw.ntruss.com/vpc/v2/createNatGatewayInstance
?regionCode=KR
&zoneCode=KR-1
&vpcNo=***04
&natGatewayName=test-***
&subnetNo=***28
&publicIpInstanceNo=***25' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

Response

This section describes the response format.

Response body

See NatGatewayInstanceList for the response body.

Response status codes

For information about the HTTP status codes common to all VPC APIs, see VPC response status codes.

Response example

The response example is as follows:

<createNatGatewayInstanceResponse>
  <requestId>fae73c15-7b8d-4c09-80c2-21d46a327c4d</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <natGatewayInstanceList>
    <natGatewayInstance>
      <vpcNo>***36</vpcNo>
      <vpcName>normal-***</vpcName>
      <natGatewayInstanceNo>*****9288</natGatewayInstanceNo>
      <natGatewayName>public-***</natGatewayName>
      <publicIp></publicIp>
      <natGatewayInstanceStatus>
        <code>INIT</code>
        <codeName>INIT status</codeName>
      </natGatewayInstanceStatus>
      <natGatewayInstanceStatusName>Creating</natGatewayInstanceStatusName>
      <natGatewayInstanceOperation>
        <code>CREAT</code>
        <codeName>CREAT OP</codeName>
      </natGatewayInstanceOperation>
      <createDate>2025-05-08T18:38:25+0900</createDate>
      <natGatewayDescription></natGatewayDescription>
      <zoneCode>KR-1</zoneCode>
      <natGatewayType>
        <code>PBLIP</code>
        <codeName>Public</codeName>
      </natGatewayType>
      <subnetName>public-***</subnetName>
      <subnetNo>***29</subnetNo>
      <privateIp>10.0.1.6</privateIp>
      <publicIpInstanceNo></publicIpInstanceNo>
      <natGatewayIpList>
        <natGatewayIp>
          <type>PRIMARY</type>
          <privateIp>10.0.1.8</privateIp>
          <publicIp></publicIp>
          <publicIpInstanceNo></publicIpInstanceNo>
        </natGatewayIp>
      </natGatewayIpList>
    </natGatewayInstance>
  </natGatewayInstanceList>
</createNatGatewayInstanceResponse>