--- title: "associatePublicIpWithServerInstance" slug: "compute-server-associatepublicipwithserverinstance" updated: 2026-10-22T10:47:05Z published: 2026-10-22T10:47:05Z canonical: "api-gov.ncloud-docs.com/compute-server-associatepublicipwithserverinstance" --- > ## Documentation Index > Fetch the complete documentation index at: https://api-gov.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # associatePublicIpWithServerInstance ## 개요 공인 IP를 서버 인스턴스에 할당합니다. ## 요청 ### 요청 파라미터 | 파라미터 명 | 필수 여부 | 타입 | 제약사항 | 설명 | | --- | --- | --- | --- | --- | | publicIpInstanceNo | Yes | String | | - 할당할 공인 IP 인스턴스 번호 publicIpInstanceNo는 getPublicIpInstanceList 액션을 통해 획득 가능 | | serverInstanceNo | Yes | String | | - 할당할 서버 인스턴스 번호 공인 IP할당이 가능한 serverInstanceNo는 getPublicIpTargetServerInstanceList 액션을 통해 획득 가능 | | responseFormatType | No | String | | - 응답 결과의 포맷 타입 Options : xml \| json Default : xml | ## 응답 ### 응답 바디 - [PublicIpInstanceList](/docs/common-apidatatype-publicipinstancelist) ## 예시 ### 요청 예시 ``` GET {SERVER_API_URL}/associatePublicIpWithServerInstance ?publicIpInstanceNo=1089236 &serverInstanceNo=1088217 ``` ### 응답 예시 ``` 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 평촌 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 평촌 zone 1 ``` ## 에러 코드 아래 에러 코드는 이 액션(Action)에서 특징적으로 발생하는 에러입니다. 공통적으로 발생하는 에러에 대한 상세한 설명은 [NAVER Cloud Platform API](/docs/common-ncpapi-ncpapi)를 참고해주세요 | HTTP Response Code | 리턴 코드 | 리턴 메시지 | | --- | --- | --- | | 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. |