如何删除未通过Rest Calls附加到VM的

时间:2016-03-11 07:45:50

标签: rest ibm-cloud-infrastructure ibm-bpm

我是BPM,softlayer和REST的新手。我完成了创建存储(性能和耐久性)。现在我需要知道如何删除未附加到任何虚拟机的存储。我没有发现任何与此相关的事情。请帮忙。提前谢谢。

1 个答案:

答案 0 :(得分:0)

请尝试以下请求:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Billing_Item_Cancellation_Request/createObject

Method: POST

Json Payload:

{
  "parameters": [
    {
      "accountId": 202019,
      "items": [
        {
          "billingItemId": 65959265,
          "immediateCancellationFlag": true
        }
      ]
    }
  ]
}

如何获取billingItemId信息和account id

执行:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/4494893/getObject?objectMask=mask[accountId,username,billingItem.id]

Method: GET

如果您不知道Network Storage id,请使用username执行此请求:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectFilter={"networkStorage": {"username": {"operation": "storageName"}}}&objectMask=mask[billingItem]

Method: GET

<强>参考文献:

SoftLayer_Billing_Item_Cancellation_Request::createObject

SoftLayer_Network_Storage::getObject