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.

changeServerInstanceName

Prev Next

VPC環境で利用できます。

サーバインスタンス(VM)の名前を変更します。ホスト名は変更されません。

構文

changeServerInstanceName構文は次の通りです。

./ncloud vserver changeServerInstanceName \
--serverInstanceNo <server-instance-no> \
--serverName <server-name> \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]

オプション

changeServerInstanceNameの実行時に指定できるオプションについて説明します。

必須オプション

changeServerInstanceNameの必須オプションです。

オプション タイプ 必須の有無 説明
--serverInstanceNo String Required サーバインスタンス番号
--serverName String Required 変更後のサーバ名
  • 英字の小文字、数字、記号の-を組み合わせて3~40文字以内で入力 (Windows Serverの場合、3~15文字)
  • 文字列の先頭文字は英字の小文字、末尾文字は英字の小文字または数字のみ使用

共通オプション

vserverコマンドで共通して使用するオプションについては、Server (VPC)のオプションを参照してください。

サーバ名の変更リクエストが成功すると、サーバの最新情報が返されます。

コマンド

コマンドの例は次の通りです。

./ncloud vserver changeServerInstanceName \
--serverInstanceNo 34567890 \
--serverName test-server-renamed-01 \
--regionCode KR \
--output json

出力

出力の例は次の通りです。

{
"changeServerInstanceNameResponse": {
"totalRows": 1,
"serverInstanceList": [
{
"serverInstanceNo": "34567890",
"serverName": "test-server-renamed-01",
"cpuCount": 2,
"memorySize": 4294967296,
"platformType": {
"code": "LNX64",
"codeName": "Linux 64 Bit"
},
"loginKeyName": "test-server-instance-key-01",
"serverInstanceStatus": {
"code": "RUN",
"codeName": "サーバ RUN状態"
},
"serverInstanceOperation": {
"code": "NULL",
"codeName": "サーバ NULL OP"
},
"serverInstanceStatusName": "running",
"createDate": "2026-05-14T17:29:35+0900",
"uptime": "2026-05-14T17:34:00+0900",
"serverImageProductCode": "SW.VSVR.OS.LNX64.ROCKY.0810.B050",
"serverProductCode": "SVR.VSVR.HICPU.C002.M004.NET.SSD.B050.G002",
"isProtectServerTermination": false,
"zoneCode": "KR-1",
"regionCode": "KR",
"vpcNo": "12345678",
"subnetNo": "23456789",
"networkInterfaceNoList": [
"56789012"
],
"serverInstanceType": {
"code": "HICPU",
"codeName": "High-CPU"
},
"baseBlockStorageDiskType": {
"code": "NET",
"codeName": "ネットワークストレージ"
},
"baseBlockStorageDiskDetailType": {
"code": "SSD",
"codeName": "SSD"
},
"hypervisorType": {
"code": "XEN",
"codeName": "XEN"
},
"serverImageNo": "45678901",
"serverSpecCode": "c2-g2-s50",
"eventList": [],
"isPreInstallGpuDriver": false
}
],
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"returnCode": "0",
"returnMessage": "success"
}
}