---
title: "replaceServerInstanceAssociatedWithPublicIp"
slug: "cli-server-replaceserverinstanceassociatedwithpublicip"
tags: ["Server"]
updated: 2026-09-17T10:08:35Z
published: 2026-09-17T10:08:35Z
canonical: "cli.ncloud-docs.com/cli-server-replaceserverinstanceassociatedwithpublicip"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.
# replaceServerInstanceAssociatedWithPublicIp
## Overview
Replace the public IP to the specified server
## Description
Assigns the public IP assigned to the server to another server.
## Request Parameters
| Parameter Name | Requiredness | Type | Limitation | Description |
| --- | --- | --- | --- | --- |
| publicIpInstanceNo | Yes | String | | Public IP instance number assigned to an existing server |
| serverInstanceNo | Yes | String | | Server instance number to replace You can get it through the getPublicIpTargetServerInstanceList action. Public IP can be replaced only between servers in the same zone. (Can not replace public IP assigned to KR-1 server with server of KR-2) |
| isErrorThrowing | No | Boolean | | Default : true A server that is already assigning IP does not generate an error that occurs when attempting replaceServerInstanceAssociatedWithPublicIp action. |
## 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 replaceServerInstanceAssociatedWithPublicIp --serverInstanceNo 691083 --publicIpInstanceNo 662308
```
### Response
```
{
"replaceServerInstanceAssociatedWithPublicIpResponse": {
"requestId": "82d58738-1aae-4677-982f-b194b24a683b",
"returnCode": "0",
"returnMessage": "success",
"totalRows": 1,
"publicIpInstanceList": [
{
"publicIpInstanceNo": "662308",
"publicIp": "49.236.160.36",
"publicIpDescription": "testfsdf",
"createDate": "2018-05-23T11:04:38+0900",
"publicIpInstanceStatusName": "changing",
"publicIpInstanceStatus": {
"code": "USED",
"codeName": "NET USED state"
},
"publicIpInstanceOperation": {
"code": "CHANG",
"codeName": "NET CHANGE OP"
},
"publicIpKindType": {
"code": "GEN",
"codeName": "General"
},
"serverInstanceAssociatedWithPublicIp": {
"serverInstanceNo": "691083",
"serverName": "import-key",
"serverDescription": "",
"cpuCount": 2,
"memorySize": 4294967296,
"baseBlockStorageSize": 53687091200,
"platformType": {
"code": "LNX64",
"codeName": "Linux 64 Bit"
},
"loginKeyName": "import-key",
"isFeeChargingMonitoring": false,
"publicIp": "49.236.160.36",
"privateIp": "10.39.3.136",
"serverImageName": "centos-6.6-64",
"serverInstanceStatus": {
"code": "RUN",
"codeName": "Server run state"
},
"serverInstanceOperation": {
"code": "NULL",
"codeName": "Server NULL OP"
},
"serverInstanceStatusName": "running",
"createDate": "2018-06-15T11:15:10+0900",
"uptime": "2018-06-15T11:15:10+0900",
"serverImageProductCode": "SPSW0LINUX000044",
"serverProductCode": "SPSVRSSD00000003",
"isProtectServerTermination": false,
"portForwardingPublicIp": "49.236.160.11",
"zone": {
"zoneNo": "2",
"zoneName": "KR-1",
"zoneDescription": "가산 zone",
"regionNo": "1"
},
"region": {
"regionNo": "1",
"regionCode": "KR",
"regionName": "Korea"
},
"baseBlockStorageDiskType": {
"code": "NET",
"codeName": "Network Storage"
},
"baseBlockStorageDiskDetailType": {
"code": "SSD",
"codeName": "SSD"
},
"serverInstanceType": {
"code": "STAND",
"codeName": "Standard"
},
"userData": "",
"accessControlGroupList": []
},
"zone": {
"zoneNo": "2",
"zoneName": "KR-1",
"zoneDescription": "가산 zone",
"regionNo": "1"
}
}
]
}
}
```
```
82d58738-1aae-4677-982f-b194b24a683b
0
success
1
662308
49.236.160.36
testfsdf
2018-05-23T11:04:38+0900
changing
USED
NET USED state
CHANG
NET CHANGE OP
GEN
General
691083
import-key
2
4294967296
53687091200
LNX64
Linux 64 Bit
import-key
false
49.236.160.36
10.39.3.136
centos-6.6-64
RUN
Server run state
NULL
Server NULL OP
running
2018-06-15T11:15:10+0900
2018-06-15T11:15:10+0900
SPSW0LINUX000044
SPSVRSSD00000003
false
49.236.160.11
2
KR-1
가산 zone
1
1
KR
Korea
NET
Network Storage
SSD
SSD
STAND
Standard
2
KR-1
가산 zone
1
```