changeServerInstanceName

Prev Next

VPC環境で利用できます。

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

リクエスト

リクエスト形式を説明します。リクエスト形式は次の通りです。

メソッド URI
GET | POST /vserver/v2/changeServerInstanceName
参考

ガイドは GETメソッドを基準に説明します。POSTメソッドの呼び出しテストは、NAVERクラウドプラットフォームコンソールの API Gatewayサービスの Swaggerで行えます。

リクエストヘッダ

Server APIで共通して使用されるヘッダの詳細は、Serverのリクエストヘッダをご参照ください。

リクエストクエリパラメータ

リクエストクエリパラメータの説明は次の通りです。

フィールド タイプ 必須の有無 説明
regionCode String Optional リージョンコード
  • getRegionListを参照
    • 照会結果の最初のリージョン(デフォルト)
serverInstanceNo String Required サーバインスタンス番号
serverName String Required 変更後のサーバ名
  • 英字の小文字、数字、記号の「-」を組み合わせて3~30文字以内で入力
  • 文字列の先頭文字は英字の小文字、末尾文字は英字の小文字または数字のみ使用
responseFormatType String Optional レスポンスデータの形式
  • xml(デフォルト) | json

リクエスト例

リクエストのサンプルコードは次の通りです。

curl --location --request GET 'https://ncloud.apigw.ntruss.com/vserver/v2/changeServerInstanceName
?regionCode=KR
&serverInstanceNo=*****8773
&serverName=ncp-test-****
&responseFormatType=json' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

レスポンス

レスポンス形式を説明します。

レスポンスボディ

レスポンスボディの説明は次の通りです。

フィールド タイプ 必須の有無 説明
changeServerInstanceNameResponse Object - レスポンス結果
changeServerInstanceNameResponse.requestId String - リクエスト ID
  • UUID形式
changeServerInstanceNameResponse.returnCode String - レスポンスコード
changeServerInstanceNameResponse.returnMessage String - レスポンスメッセージ

レスポンスステータスコード

Server APIで共通して使用されるレスポンスステータスコードの詳細は、Serverのレスポンスステータスコードをご参照ください。

レスポンス例

レスポンスのサンプルコードは次の通りです。

{
  "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"
  }
}