スナップショットに戻す(A)

対象の仮想マシンに対してスナップショットの状態に戻す作業を行います。

check
重要

APIを連続実行した場合、想定していない結果が生じる可能性がございます。実行したAPIの処理結果をGET /api/1.0/task で完了確認したうえで、次の処理を行ってください。

PUT /api/1.0/vm/{vmId}/action/revertSnapshot

※ vmId :スナップショットに戻したい仮想マシンのID

Request parameters
Name Description Type Data type Required
Authorization Bearer [APIキー] header string True
Successful Response
Response Code 200 OK
Response Headers Content-type: application/json
Response parameters
Name Description Example Data type
taskId 実行しているアクションのタスクID 24714aac4703428292a03cd847c9ed62 string
実行例
# Execute request
curl -X PUT -H "Authorization:$token" -H "Content-Type:application/json" -d '{}' ¥
https://eastapi.aspire.gcf.whitecloud.jp/api/1.0/vm/6dd5...a4b1...edba/action/revertSnapshot
レスポンス例
  
    {"taskId":"b395d8b06a564f2688230b9b0f296c4b"}
  
タスク確認例
  
    # タスク確認実施
    curl -X GET -H "Authorization:$token" -H Content-Type:application/json
    https://eastapi.aspire.gcf.whitecloud.jp/api/1.0/task/cc5ba1160a7e462aa89432ffb2a9b6e9
    
    # レスポンス例
    {
      "task": {
        "status": "SUCCESS",
        "progressPercentage": 100,
        "targetId": "6dd5b295762a4b16ab9e85b8be5aedba",
        "acceptedDate": "2024-03-07T15:22:53+0900",
        "startedDate": "2024-03-07T15:22:53+0900",
        "finishedDate": "2024-03-07T15:22:54+0900",
        "result": "OK"
       }
    }
  

※ 出力された “targetId” はスナップショットに戻した仮想マシンの “vmId” となります。
※ 仮想マシン情報は仮想マシンの一覧取得をすることで確認できます。