--- title: "associatePublicIpWithServerInstance" slug: "compute-server-associatepublicipwithserverinstance" updated: 2026-09-17T09:57:42Z published: 2026-09-17T09:57:42Z 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 ## 概要 グローバル IPアドレスをサーバインスタンスに割り当てます。 ## リクエスト ### リクエストパラメータ | パラメータ名 | 必須の有無 | タイプ | 制限事項 | 説明 | | --- | --- | --- | --- | --- | | publicIpInstanceNo | Yes | String | | - 割り当て対象のグローバル IPアドレスのインスタンス番号 publicIpInstanceNoは getPublicIpInstanceListアクションを通じて取得可能 | | serverInstanceNo | Yes | String | | - 割り当て対象のサーバインスタンス番号 グローバル IPアドレスの割り当てが可能な serverInstanceNoは getPublicIpTargetServerInstanceListアクションを通じて取得可能 | | responseFormatType | No | String | | - レスポンス結果の形式タイプ オプション: xml \| json デフォルト: xml | ## レスポンス ### レスポンスボディ - [PublicIpInstanceList](/docs/ja/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 坪村ゾーン 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 坪村ゾーン 1 ``` ## エラーコード 以下のエラーコードは、このアクション(Action)で発生する特徴的なエラーです。共通して発生するエラーについての詳細説明は、[NAVERクラウドプラットフォーム API](/docs/ja/common-ncpapi-index)をご参照ください。 | 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. |