创建对象存储帐户

时间:2016-10-27 19:06:46

标签: ibm-cloud-infrastructure

我正在尝试使用以下命令创建对象存储帐户:

curl -H "Content-Type: application/json" --data @Object-Storage-Account-create.json https://<userid>:<apikey>@api.softlayer.com/rest/v3/SoftLayer_Product_Order/placeOrder

JSON有效负载是

{
"parameters": [
    {
        "complexType": "SoftLayer_Container_Product_Order_Network_Storage_Hub",
        "quantity": 1,
        "packageId": 206,
        "prices": [
            {
                "id": 16984
            }
        ]
    }
]

}

但收到错误{"error":"Bad request","code":"SoftLayer_Exception_WebService_BadRequest"}

您能告诉我正确的参数吗?

1 个答案:

答案 0 :(得分:0)

您是否在 Object-Storage-Account-create.json 文件中包含了最后一个“} ”?

因为您的模板适用于我,问题似乎是您的模板中缺少某些内容,也许是最后一个“} ”,您可以进行双重检查吗?

{  
   "parameters":[  
      {  
         "complexType":"SoftLayer_Container_Product_Order_Network_Storage_Hub",
         "quantity":1,
         "packageId":206,
         "prices":[  
            {  
               "id":16984
            }
         ]
      }
   ]
}