【问题标题】:How to create duplicate block storage from snapshot using Softlayer rest api如何使用 Softlayer rest api 从快照创建重复的块存储
【发布时间】:2021-04-13 01:03:41
【问题描述】:

我已创建快照,但无法从快照创建块存储。我们找不到任何 Api 文档。任何人都可以帮助我完成此请求

【问题讨论】:

    标签: ibm-cloud ibm-cloud-infrastructure ibm-cloud-storage


    【解决方案1】:

    尝试使用以下 slcli 命令订购重复卷:

    slcli block volume-duplicate --origin-snapshot-id 11111 --billing monthly 22222
    

    将 11111 替换为您的快照 ID,将 22222 替换为您的卷 ID。

    要获取卷的快照 ID 列表,您可以使用以下命令:

    slcli block snapshot-list 1234
    

    将 1234 替换为您的卷 ID。

    您也可以通过 rest call 订购重复的卷,请参见以下示例:

    方法:POST

    https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder
    

    正文:Json

    {"parameters": [{
    "complexType":"SoftLayer_Container_Product_Order_Network_Storage_AsAService",
    "packageId": 759,
    "location":449600,
    "quantity": 1,
    "prices": [ 
            { "id": 225129,
              "item": {
                  "id": 13215,
                  "description": "Storage space for 2 IOPS per GB"
              }},
            { "id": 192043,
              "item": {
                  "id": 5938,
                  "description": "0.25 IOPS per GB"
              }},            
            {"id": 192473,
            "item": {
                  "id": 5130,
                  "description": "20 GB Storage Space"
              }}, 
            {"id":189433,
             "item": {
                  "id": 9571,
                  "description": "Storage as a Service"
              }},
            {"id":189443,
             "item": {
                  "id": 5944,
                  "description": "Block Storage"
              }}],
    "useHourlyPricing": false,
    "duplicateOriginSnapshotId": 11111,
    "duplicateOriginVolumeId": 22222,
    "osFormatType": {  
            "id":12,
            "keyName":"LINUX"
            },
    "volumeSize": 16000
    }
    ]}
    

    将 11111 替换为您的快照 ID,将 22222 替换为您的卷 ID。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多