createNatGatewayInstance
    • PDF

    createNatGatewayInstance

    • PDF

    Article summary

    Available in VPC

    Create a NAT Gateway instance.

    Request

    The following describes the request format for the endpoint. The request format is as follows:

    MethodURI
    GET, POST/createNatGatewayInstance

    Request headers

    For headers common to all VPC APIs, see VPC common headers.

    Request query parameters

    The following describes the parameters.

    FieldTypeRequiredDescription
    regionCodeStringOptionalRegion code where you want to create the network ACL instance
  • First Region of the search result (default)
  • Check through getRegionList
  • zoneCodeStringRequiredZone where you want to create the NAT Gateway instance
  • zoneCode can be obtained through getZoneList
  • vpcNoStringRequiredNumber of the VPC where you want to create the NAT Gateway instance
  • Check through getVpcList
  • networkAclNameStringOptional
    networkAclDescriptionStringOptional
    responseFormatTypeStringOptionalResponse result format
    • xml (default) | json
    publicIpInstanceNoStringOptionalPublic IP instance number
  • This parameter is ignored if the subnet is the PRIVATE type
    • If the subnet is the PUBLIC type,
      • a public IP is created automatically if publicIpInstanceNo is NULL
      • a specified public IP is assigned if publicIpInstanceNo is NOT-NULL
  • privateIpStringOptionalPrivate IP address
  • This parameter is ignored if the subnet is the PRIVATE type
    • If the subnet is the PUBLIC type,
      • a public IP is assigned automatically if privateIp is NULL
      • a specified public IP is assigned if privateIp is NOT-NULL
  • subnetNoStringOptionalNumber of the subnet on which you want to create the NAT Gateway instance
  • If subnetNo is NULL, it is created on the PUBLIC-type NAT Gateway subnet
  • If subnetNo is NOT-NULL, NAT Gateway is created according to subnetTypeCode of the NAT Gateway subnet
  • Request example

    The following is a sample request.

    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

    The following describes the response format.

    Response body

    See NatGatewayInstanceList for the response body.

    Response status codes

    For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

    Response example

    The following is a sample response.

    <createNatGatewayInstanceResponse>
      <requestId>4475d78c-4c27-4404-807d-7b0b645bb127</requestId>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>1</totalRows>
      <natGatewayInstanceList>
        <natGatewayInstance>
            <vpcNo>***36</vpcNo>
            <vpcName>test-vpc</vpcName>
            <natGatewayInstanceNo>***9734</natGatewayInstanceNo>
            <natGatewayName>test-***</natGatewayName>
            <publicIp>***.***.109.101</publicIp>
            <natGatewayInstanceStatus>
                <code>INIT</code>
                <codeName>init</codeName>
            </natGatewayInstanceStatus>
            <natGatewayInstanceStatusName>Creating</natGatewayInstanceStatusName>
            <natGatewayInstanceOperation>
                <code>NULL</code>
                <codeName>NULL OP</codeName>
            </natGatewayInstanceOperation>
            <createDate>2023-04-18T15:13:27+0900</createDate>
            <natGatewayDescription></natGatewayDescription>
            <zoneCode>KR-1</zoneCode>
            <natGatewayType>
                <code>PBLIP</code>
                <codeName>Public</codeName>
            </natGatewayType>
            <subnetName>v-kr1-pub-natgw-***</subnetName>
            <subnetNo>***28</subnetNo>
            <privateIp>10.0.***.***</privateIp>
            <publicIpInstanceNo>***25</publicIpInstanceNo>
        </natGatewayInstance>
      </natGatewayInstanceList>
    </createNatGatewayInstanceResponse>
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.