createNatGatewayInstance
    • PDF

    createNatGatewayInstance

    • PDF

    Article summary

    Available in VPC

    Summary

    It creates a NAT gateway instance.

    Requests

    Request parameters

    Parameter NameRequirement statusTypeRestrictionsDescription
    regionCodeNoString- Region code
    You can decide the region in which the NAT Gateway will be created
    Region code can be obtained through the getRegionList action
    Default: selects the first region of the getRegionList search results
    zoneCodeYesString- Zone code
    Determine the zone in which the NAT Gateway instance will be created
    Zone code can be obtained through the getZoneList action
    vpcNoYesString-VPC No.
    Determine the VPC in which the NAT Gateway instance will be created
    VPC No. can be obtained through the getVpcList action
    natGatewayNameNoStringMin: 3, Max: 30
    Only lowercase English letters, numbers, and "-" are allowed, and it must start with an English letter.
    It must end with an English letter or a number.
    - The name of NAT Gateway to be created
    Default: NAVER Cloud Platform automatically assigns it
    natGatewayDescriptionNoStringMin: 0, Max: 1000 BytesDescription of a NAT Gateway to be created
    responseFormatTypeNoString- Format type of the response result
    Options: xml | json
    Default: xml
    publicIpInstanceNoNoString- Public IP instance No.
    Ignore if the subnet is of the private type(subnet type code)
    If the subnet is public, automatic creation when the public instance No. is NULL and assignment when it is not-NULL
    privateIpNoString- Private IP
    Ignore if the subnet is public
    If the subnet is public, automatic assignment when it is NULL and creation with that IP when it is not-NULL
    subnetNoNoString-NATGW type subnet No.
    When it is NULL, it creates a NATGW subnet of the public type
    When it is not-NULL, it creates NATGateway according to the subnet's subnet type code

    Response

    Response data type

    • NatGateway instance list type
    NatGatewayInstanceList extends CommonResponse
    private Integer totalRows;
    private List natGatewayInstanceList = new ArrayList<>();
    NatGatewayInstance
    private String vpcNo;
    private String vpcName;
    private String natGatewayInstanceNo;
    private String natGatewayName;
    private String publicIp;
    private CommonCode natGatewayInstanceStatus;
    private String natGatewayInstanceStatusName;
    private CommonCode natGatewayInstanceOperation;
    private Date createDate;
    private String natGatewayDescription;
    private String zoneCode;
    private CommonCode natGatewayType;
    private String subnetName;
    private String subnetNo;
    private String privateIp;
    private String publicIpInstanceNo;

    Examples

    Request examples

    ncloud vpc createNatGatewayInstance --regionCode KR --zoneCode KR-1 --vpcNo ***04 --natGatewayName test-*** --subnetNo ***28 --publicIpInstanceNo ***25
    

    Response examples

    <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>in preparation</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.