terminateServerInstances

Prev Next

VPC環境で利用できます。

停止状態のサーバインスタンス(VM)を返却します。

リクエスト

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

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

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

リクエストヘッダ

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

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

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

フィールド タイプ 必須の有無 説明
regionCode String Optional リージョンコード
  • getRegionListを参照
    • 照会結果の最初のリージョン(デフォルト)
serverInstanceNoList.N Array Required サーバインスタンス番号リスト
responseFormatType String Optional レスポンスデータの形式
  • xml(デフォルト) | json

リクエスト例

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

curl --location --request GET 'https://ncloud.apigw.ntruss.com/vserver/v2/terminateServerInstances
?regionCode=KR
&serverInstanceNoList.1=*****8773
&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}'

レスポンス

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

レスポンスボディ

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

フィールド タイプ 必須の有無 説明
terminateServerInstancesResponse Object - レスポンス結果
terminateServerInstancesResponse.returnCode String - レスポンスコード
terminateServerInstancesResponse.returnMessage String - レスポンスメッセージ

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

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

レスポンス例

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

{
    "terminateServerInstancesResponse": {
        "totalRows": 1,
        "serverInstanceList": [
            {
                "serverInstanceNo": "*****8773",
                "serverName": "test-***",
                "cpuCount": 2,
                "memorySize": 8589934592,
                "platformType": {
                    "code": "UBD64",
                    "codeName": "Ubuntu Desktop 64 Bit"
                },
                "loginKeyName": "test-***",
                "publicIpInstanceNo": "*****8824",
                "publicIp": "211.188.***.***",
                "serverInstanceStatus": {
                    "code": "NSTOP",
                    "codeName": "サーバ NORMAL STOPPED状態"
                },
                "serverInstanceOperation": {
                    "code": "START",
                    "codeName": "サーバ START OP"
                },
                "serverInstanceStatusName": "booting",
                "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.C004.M008.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": "ci4-g3"
            }
        ],
        "requestId": "5cffdd08-db86-4e16-a38c-34077084e959",
        "returnCode": "0",
        "returnMessage": "success"
    }
}