コピー(A)

対象テナントの指定したサイト・Pod・契約リソースに仮想マシングループをコピーします。

check
重要

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

PUT /api/1.0/vmgroup/{vmgroupId}/action/copy

※ vmgroupId :コピーをしたい仮想マシングループのID

Request parameters
Name Description Type Data type Required
Authorization Bearer [APIキー] header string True
vmgroup コピー先の仮想マシングループ情報 body object True
body parameters
Name Description Example Data type Required
vmgroup 仮想マシングループ情報 Object True
siteId サイトID 8eb064f7a5db11e895ea005056898046 String True
keiyakuResourceId 契約リソースID e4dd6ed6c9d24f1dac6b551a7ff60fd6 String True
vmgroupName 仮想マシングループ名 VMGROUP01 String True
comment コメント String
vms 仮想マシン情報配列 Array True
vm 仮想マシン情報
※グループに所属する仮想マシン数分記載
Object True
vmId 仮想マシンID e425ffed959f4d04b279d8e99a310a26 String True
storages 仮想マシンストレージ
情報配列
Array True
storage 仮想マシンストレージ情報
※コピー元で保持するディスク数分記載してください。
Object True
vmStorageId 仮想マシンストレージID
※コピー元の仮想マシンのvmStorageIdを指定
01887c57faef446fb2cca00cef507efa String True
storageId ストレージID ※コピー先で利用するstorageIdを指定 f1af87b78705473fb7ca7e5924fa1843 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
実行例) コピー元の仮想マシングループに仮想マシンが2つある場合
  
    # Execute request
    curl -X PUT -H "Authorization:$token" -H "Content-Type:application/json" -d '{
      "vmgroup": {
          "siteId": "5923baabacdf11e8af4f005056802cb3",
          "keiyakuResourceId": "9ebe9fbeb7ee4fa4a4b250eba31228de",
          "vmgroupName": " VMGcopy ",
          "comment": "",
          "vms": [
              {
                  "vmId": "6dd5b295762a4b16ab9e85b8be5aedba",
                  "storages": [
                      {
                          "vmStorageId": "1effb157398a44a684b3ea3c983e689c",
                          "storageId": "5bc98ac2356941ea981c29a53969c19a"
                      }
                  ]
              },
              {
                  "vmId": "84141bb62b7b4369853cd51cda42c77c",
                  "storages": [
                      {
                          "vmStorageId": "ce1f6901774447868bdcb15809c804f2",
                          "storageId": "5bc98ac2356941ea981c29a53969c19a"
                      }
                  ]
              }
          ]
      }
   }' https://eastapi.aspire.gcf.whitecloud.jp/api/1.0/vmgroup/94f6...d8e41...1955/action/copy
  
レスポンス例
  
    {"taskId":"e14ed60376da49108df41d576bd07738"}
  
タスク確認例
  
  # タスク確認実施
  curl -X GET -H "Authorization:$token" -H Content-Type:application/json 
  https://eastapi.aspire.gcf.whitecloud.jp/api/1.0/task/e14ed60376da49108df41d576bd07738
  
  # レスポンス例
    {
      "task": {
        "status": "SUCCESS",
        "progressPercentage": 100,
        "targetId": "94f61d29db364d6d8e4731e764e19515",
        "acceptedDate": "2024-03-06T12:04:53+0900",
        "startedDate": "2024-03-06T12:04:53+0900",
        "finishedDate": "2024-03-06T12:05:09+0900",
        "result": "OK"
       }
    }
  

※ 出力された “targetId” はコピー元の仮想マシングループの “vmgroupId” となります。
※ コピー先の仮想マシングループ情報は仮想マシングループの一覧取得をすることで確認できます。