【发布时间】:2016-09-16 21:28:09
【问题描述】:
我正在尝试从虚拟机中分离本地存储,但我从 API 收到错误。
这是我想做的:
首先,我得到存储的 ID
.../rest/v3.1/SoftLayer_Account/getVirtualDiskImages.json
0: {
"capacity": 25
"createDate": "2016-09-15T05:28:16-05:00"
"description": "Disk 2"
"id": 21757115
"modifyDate": null
"name": "Disk 2"
"parentId": null
"storageRepositoryId": 2257588
"typeId": 241
"units": "GB"
"uuid": "0c7f6050-b8ff-431f-a500-f1e896e02c92"
} ...
其次,我尝试从虚拟机中分离本地存储
方法:[DELETE] / [POST] / [PUT]
rest/v3.1/SoftLayer_Virtual_Guest/[vm-id]/detachDiskImage.json
我尝试了以下请求参数:
1 -
{
"parameters": [
{
"imageId": "21757115"
}
}
2 -
{
"parameters": [
{
"id": "21757115"
}
}
3 -
{
21757115
}
但我总是得到
{
"error": "You must provide a valid portable storage volume id."
"code": "SoftLayer_Exception_Public"
}
任何想法都会受到赞赏。
【问题讨论】:
标签: rest ibm-cloud-infrastructure