associatePublicIpWithServerInstance
    • PDF

    associatePublicIpWithServerInstance

    • PDF

    Article summary

    Overview

    Assigning a public IP to a server instance

    Description

    Assign a public IP to a server instance.

    Request Parameters

    Parameter NameRequirednessTypeLimitationDescription
    publicIpInstanceNoYesStringPublic IP instance No. to assign
    serverInstanceNoYesStringServer instance No. to assign
    You can get one by calling getPublicIpTargetServerInstanceList.

    Response Data Type

    • PublicIpInstanceList type
    PublicIpInstanceList extends CommonResponse
    private Integer totalRows;
    private List publicIpInstanceList = new ArrayList();
    PublicIpInstance
    private String publicIpInstanceNo;
    private String publiclIp;
    private String publicIpDescription;
    private Date createDate;
    private String publicIpInstanceStatusName;
    private CommonCode publicIpInstanceStatus;
    private CommonCode publicIpInstanceOperation;
    private CommonCode publicIpKindType;
    private ServerInstance serverInstanceAssociatedWithPublicIp;
    private Region region;
    private Zone zone;

    Examples

    Request

    ncloud server associatePublicIpWithServerInstance --publicIpInstanceNo 397331 --serverInstanceNo 397325
    

    Response

    {
       "associatePublicIpWithServerInstanceResponse": {
         "requestId": "5fa9dcc3-6203-483c-81d5-51b1b5c3c53a",
         "returnCode": "0",
         "returnMessage": "success",
         "totalRows": 1,
         "publicIpInstanceList": [
           {
             "publicIpInstanceNo": "397331",
             "publicIp": "192.168.60.129",
             "publicIpDescription": "",
             "createDate": "2018-02-23T14:41:59+0900",
             "publicIpInstanceStatusName": "using",
             "publicIpInstanceStatus": {
               "code": "CREAT",
               "codeName": "NET CREAT State"
             },
             "publicIpInstanceOperation": {
               "code": "USE",
               "codeName": "NET USE OP"
             },
             "publicIpKindType": {
               "code": "GEN",
               "codeName": "General"
             },
             "serverInstanceAssociatedWithPublicIp": {
               "serverInstanceNo": "397325",
               "serverName": "test-mk001",
               "serverDescription": "test",
               "cpuCount": 2,
               "memorySize": 4294967296,
               "baseBlockStorageSize": 53687091200,
               "platformType": {
                 "code": "LNX64",
                 "codeName": "Linux 64 Bit"
               },
               "loginKeyName": "ysw",
               "isFeeChargingMonitoring": false,
               "publicIp": "192.168.60.129",
               "privateIp": "10.113.245.174",
               "serverImageName": "centos-7.3-64",
               "serverInstanceStatus": {
                 "code": "NSTOP",
                 "codeName": "Server normal stopped state"
               },
               "serverInstanceOperation": {
                 "code": "NULL",
                 "codeName": "Server NULL OP"
               },
               "serverInstanceStatusName": "stopped",
               "createDate": "2018-02-23T14:37:31+0900",
               "uptime": "2018-02-23T14:40:34+0900",
               "serverImageProductCode": "SPSW0LINUX000046",
               "serverProductCode": "SPSVRSSD00000003",
               "isProtectServerTermination": false,
               "portForwardingPublicIp": "192.168.120.111",
               "zone": {
                 "zoneNo": "2",
                 "zoneName": "KR-1",
                 "zoneCode": "KR-1",
                 "zoneDescription": "KR-1 zone",
                 "regionNo" : "1" 
               },
               "region": {
                 "regionNo": "1",
                 "regionCode": "KR",
                 "regionName": "Korea"
               },
               "baseBlockStorageDiskType": {
                 "code": "NET",
                 "codeName": "Network Storage"
               },
               "baseBlockStroageDiskDetailType": {
                 "code": "SSD",
                 "codeName": "SSD"
               },
               "userData": "",
               "accessControlGroupList": [
                 {
                   "accessControlGroupConfigurationNo": "1038",
                   "accessControlGroupName": "ncloud-default-acg",
                   "accessControlGroupDescription": "Default AccessControlGroup",
                   "isDefault": true,
                   "createDate": "2013-12-03T10:37:39+0900"
                 }
               ],
               "instanceTagList" : []
             },
               "zone": {
                 "zoneNo": "2",
                 "zoneName": "KR-1",
                 "zoneCode": "KR-1",
                 "zoneDescription": "KR-1 zone",
                 "regionNo" : "1"
               }
           }
         ]
       }
     }
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <associatePublicIpWithServerInstanceResponse>
      <requestId>5fa9dcc3-6203-483c-81d5-51b1b5c3c53a</requestId>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>1</totalRows>
      <publicIpInstanceList>
        <publicIpInstanceNo>397331</publicIpInstanceNo>
        <publicIp>192.168.60.129</publicIp>
        <publicIpDescription></publicIpDescription>
        <createDate>2018-02-23T14:41:59+0900</createDate>
        <publicIpInstanceStatusName>using</publicIpInstanceStatusName>
        <publicIpInstanceStatus>
          <code>CREAT</code>
          <codeName>NET CREAT State</codeName>
        </publicIpInstanceStatus>
        <publicIpInstanceOperation>
          <code>USE</code>
          <codeName>NET USE OP</codeName>
        </publicIpInstanceOperation>
        <publicIpKindType>
          <code>GEN</code>
          <codeName>General</codeName>
        </publicIpKindType>
        <serverInstanceAssociatedWithPublicIp>
          <serverInstanceNo>397325</serverInstanceNo>
          <serverName>test-mk001</serverName>
          <serverDescription>test</serverDescription>
          <cpuCount>2</cpuCount>
          <memorySize>4294967296</memorySize>
          <baseBlockStorageSize>53687091200</baseBlockStorageSize>
          <platformType>
            <code>LNX64</code>
            <codeName>Linux 64 Bit</codeName>
          </platformType>
          <loginKeyName>ysw</loginKeyName>
          <isFeeChargingMonitoring>false</isFeeChargingMonitoring>
          <publicIp>192.168.60.129</publicIp>
          <privateIp>10.113.245.174</privateIp>
          <serverImageName>centos-7.3-64</serverImageName>
          <serverInstanceStatus>
            <code>NSTOP</code>
            <codeName>Server normal stopped state</codeName>
          </serverInstanceStatus>
          <serverInstanceOperation>
            <code>NULL</code>
            <codeName>Server NULL OP</codeName>
          </serverInstanceOperation>
          <serverInstanceStatusName>stopped</serverInstanceStatusName>
          <createDate>2018-02-23T14:37:31+0900</createDate>
          <uptime>2018-02-23T14:40:34+0900</uptime>
          <serverImageProductCode>SPSW0LINUX000046</serverImageProductCode>
          <serverProductCode>SPSVRSSD00000003</serverProductCode>
          <isProtectServerTermination>false</isProtectServerTermination>
          <portForwardingPublicIp>192.168.120.111</portForwardingPublicIp>
          <zone>
            <zoneNo>2</zoneNo>
            <zoneName>KR-1</zoneName>
            <zoneDescription>KR-1 zone</zoneDescription>
          </zone>
          <region>
            <regionNo>1</regionNo>
            <regionCode>KR</regionCode>
            <regionName>Korea</regionName>
          </region>
          <baseBlockStorageDiskType>
            <code>NET</code>
            <codeName>Network Storage</codeName>
          </baseBlockStorageDiskType>
          <baseBlockStroageDiskDetailType>
            <code>SSD</code>
            <codeName>SSD</codeName>
          </baseBlockStroageDiskDetailType>
          <userData></userData>
          <accessControlGroupList>
            <accessControlGroupConfigurationNo>1038</accessControlGroupConfigurationNo>
            <accessControlGroupName>ncloud-default-acg</accessControlGroupName>
            <accessControlGroupDescription>Default AccessControlGroup</accessControlGroupDescription>
            <isDefault>true</isDefault>
            <createDate>2013-12-03T10:37:39+0900</createDate>
          </accessControlGroupList>
        </serverInstanceAssociatedWithPublicIp>
        <zone>
          <zoneNo>2</zoneNo>
          <zoneName>KR-1</zoneName>
          <zoneDescription>KR-1 zone</zoneDescription>
        </zone>
      </publicIpInstanceList>
    </associatePublicIpWithServerInstanceResponse>
    

    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.