我需要使用softlayer rest API启动创建卷的计算实例,并需要使用globalIdentifier启动。
https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest.json
Body:{“参数”:[{ "complexType":"SoftLayer_Virtual_Guest","maxMemory":4,"hostname":"jagatest","maxCpu":2,"domain":"test.local","hourlyBillingFlag":true,"startCpus":1,"blockDeviceTemplateGroup":{ "globalIdentifier":"375c7ad3-1b39-4c58-a657-7fc4351d7b06“},"blockDevices":{”设备“:"0","diskImage":{ "capacity":25 } },{ "device":"2","diskImage":{ "capacity":10 }},"localDiskFlag":false,“数据中心”:{ "complexType":"SoftLayer_Location","name":"sjc01“} }] }
错误通过:
{“error”:“为‘Block device’提供的值无效,使用镜像模板时可能不提供块设备。”,"code":"SoftLayer_Exception_InvalidValue"}
发布于 2019-09-10 22:48:22
尝试跟踪下一个请求
方法POST
https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/createObject.json
正文
{
"parameters": [
{
"complexType": "SoftLayer_Virtual_Guest",
"maxMemory": 4,
"hostname": "jagatest",
"maxCpu": 2,
"domain": "test.local",
"hourlyBillingFlag": true,
"startCpus": 1,
"blockDeviceTemplateGroup": {
"globalIdentifier": "375c7ad3-1b39-4c58-a657-7fc4351d7b06"
},
"localDiskFlag": false,
"datacenter": {
"complexType": "SoftLayer_Location",
"name": "sjc01"
}
}
]
}https://stackoverflow.com/questions/57867373
复制相似问题