VPC環境で利用できます。
概要
サーバインスタンスの名前を変更します。ホスト名は変更されません。
リクエスト
リクエストパラメータ
| パラメータ名 | 必須の有無 | タイプ | 制限事項 | 説明 |
|---|---|---|---|---|
| regionCode | No | String | - リージョンコード regionCodeはgetRegionListアクションを通じて取得可能 デフォルト: getRegionList照会結果の最初のリージョンを選択 |
|
| serverInstanceNo | Yes | String | - サーバインスタンス番号 serverInstanceNoはgetServerInstanceListアクションを通じて取得可能 |
|
| serverName | Yes | String | - 変更後のサーバ名 英字の小文字、数字、記号の「-」を組み合わせて3~30文字以内で入力 文字列の先頭文字は英字の小文字、末尾文字は英字の小文字または数字のみ使用 |
|
| output | No | String | レスポンス結果の形式タイプ
|
レスポンス
レスポンスデータタイプ
- ServerInstanceListタイプ
| ServerInstanceList extends CommonResponse |
|---|
| private Integer totalRows; |
| private List<ServerInstance> serverInstanceList = new ArrayList<>(); |
| ServerInstance |
|---|
| private String serverInstanceNo; |
| private String serverName; |
| private String serverDescription; |
| private Integer cpuCount; |
| private Long memorySize; |
| private CommonCode platformType; |
| private String loginKeyName; |
| private String publicIpInstanceNo; |
| private String publicIp; |
| private CommonCode serverInstanceStatus; |
| private CommonCode serverInstanceOperation; |
| private String serverInstanceStatusName; |
| private Date createDate; |
| private Date uptime; |
| private String serverImageProductCode; |
| private String serverProductCode; |
| private Boolean isProtectServerTermination; |
| private String zoneCode; |
| private String regionCode; |
| private String vpcNo; |
| private String subnetNo; |
| private NetworkInterfaceNoList networkInterfaceNoList; |
| private String initScriptNo; |
| private CommonCode serverInstanceType; |
| private CommonCode baseBlockStorageDiskType; |
| private CommonCode baseBlockStorageDiskDetailType; |
| private String placementGroupNo; |
| private String placementGroupName; |
| private String memberServerImageInstanceNo; |
例
リクエスト例
ncloud vserver changeServerInstanceName --regionCode KR --serverInstanceNo ***4299 --serverName ncp-test-****
レスポンス例
{
"changeServerInstanceNameResponse": {
"totalRows": 1,
"serverInstanceList": [
{
"serverInstanceNo": "*****8773",
"serverName": "test-***",
"cpuCount": 2,
"memorySize": 4294967296,
"platformType": {
"code": "UBD64",
"codeName": "Ubuntu Desktop 64 Bit"
},
"loginKeyName": "test-***",
"publicIpInstanceNo": "*****8824",
"publicIp": "211.188.***.***",
"serverInstanceStatus": {
"code": "RUN",
"codeName": "サーバ RUN状態"
},
"serverInstanceOperation": {
"code": "NULL",
"codeName": "サーバ NULL OP"
},
"serverInstanceStatusName": "running",
"createDate": "2025-06-11T17:00:14+0900",
"uptime": "2025-06-19T16:49:07+0900",
"serverImageProductCode": "SW.VSVR.OS.LNX64.UBNTU.SVR24.G003",
"serverProductCode": "SVR.VSVR.CPU.C002.M004.G003",
"isProtectServerTermination": true,
"zoneCode": "KR-1",
"regionCode": "KR",
"vpcNo": "***75",
"subnetNo": "****36",
"networkInterfaceNoList": [
"*****30"
],
"serverInstanceType": {
"code": "CPU",
"codeName": "CPU-Intensive"
},
"baseBlockStorageDiskType": {
"code": "NET",
"codeName": "ネットワークストレージ"
},
"baseBlockStorageDiskDetailType": {
"code": "SSD",
"codeName": "SSD"
},
"hypervisorType": {
"code": "KVM",
"codeName": "KVM"
},
"serverImageNo": "104630229",
"serverSpecCode": "ci2-g3"
}
],
"requestId": "5efaee89-c118-4797-b759-b99bb117f245",
"returnCode": "0",
"returnMessage": "success"
}
}