--- title: "associatePublicIpWithServerInstance" slug: "compute-server-associatepublicipwithserverinstance" tags: ["Server", "Public IP"] updated: 2026-09-17T10:06:00Z published: 2026-09-17T10:06:00Z canonical: "api.ncloud-docs.com/compute-server-associatepublicipwithserverinstance" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # associatePublicIpWithServerInstance ## Overview Assign a public IP to a server instance. ## Request ### Request parameters | Parameter name | Required | Type | Restrictions | Description | | --- | --- | --- | --- | --- | | publicIpInstanceNo | Yes | String | | - Public IP instance number to assign publicIpInstanceNo can be obtained through the getPublicIpInstanceList action. | | serverInstanceNo | Yes | String | | - Server instance number to assign serverInstanceNo that can be assigned a public IP can be obtained through the getPublicIpTargetServerInstanceList action. | | responseFormatType | No | String | | - Format type of the response result Options: xml \| json Default: xml | ## Response ### Response body - [PublicIpInstanceList](/docs/en/common-apidatatype-publicipinstancelist) ## Examples ### Request example ``` GET {SERVER_API_URL}/associatePublicIpWithServerInstance ?publicIpInstanceNo=1089236 &serverInstanceNo=1088217 ``` ### Response example ``` b4b38b18-a07e-4b9b-84fb-1ffeda6638fd 0 success 1 1089236 49.236.137.138 2018-11-28T14:38:55+0900 using CREAT NET CREATE state USE NET USE OP GEN General 1088217 s167545541a3 4 8589934592 53687091200 LNX32 Linux 32 Bit juhoon-kim false 49.236.137.138 10.41.83.168 centos-6.3-32 RUN Server run state NULL Server NULL OP running 2018-11-27T17:42:13+0900 2018-11-27T18:35:47+0900 SPSW0LINUX000032 SPSVRSTAND000005 false 106.10.51.90 3 KR-2 KR-2 Pyeongchon zone 1 1 KR Korea NET Network Storage HDD HDD STAND Standard 39995 ncloud-default-acg Default AccessControlGroup true 2018-04-09T11:12:54+0900 3 KR-2 KR-2 Pyeongchon zone 1 ``` ## Errors Errors that may occur while using this action are listed below. For more information about common errors, see [NAVER Cloud Platform API](/docs/en/common-ncpapi-index). | HTTP Response Code | Return code | Return message | | --- | --- | --- | | 400 | 24094 | The line for internet access of server does not correspond with which of Public IP. | | 400 | 24109 | The input parameter instance number is invalid. | | 400 | 24120 | The input parameter server instance number is invalid. | | 400 | 24122 | The input parameter public IP instance number is invalid. | | 400 | 25029 | You may not perform the allocate task since (other) user is changing the target official IP settings. | | 400 | 25101 | The server is currently being operated. so public IP is unable to be associated with the server. | | 400 | 28100 | Another public IP is already associated with the server. | | 400 | 28101 | A public IP is already associated with server. |