订购加密块存储



我正在尝试订购 250 Gb 3000 IOPS 加密块存储。 使用请求:

{"parameters": [{
"complexType":"SoftLayer_Container_Product_Order_Network_Storage_AsAService",
"packageId": 759,
"location": 957095,
"quantity": 1,
"iops":3000,
"prices": [ 
{ "id": 189439},
{ "id": 196039},            
{"id": 196099}, 
{"id":189939}],
"volumeSize": 250,
"osFormatType":{  
"id":24,
"keyName":"WINDOWS_2008"
}
}
]}

验证订单返回的错误是:

{
"error": "Undefined storage type",
"code": "SoftLayer_Exception_Public"
}

是否与我选择的项目不匹配? 还是与订单中的其他内容不匹配?

错误出在商品的价格上。

下面是一个示例,如何通过 rest API 下达块存储订单。

方法:开机自检

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

正文:杰森

{

"parameters": [
{
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_AsAService",
"location": 265592,
"packageId": 759,
"prices": [
{
"id": 189433
},
{
"id": 189443
},
{
"id": 189833
},
{
"id": 189893
}
],
"quantity": 1,
"iops": 3000,
"osFormatType":{
"id": 24,
"keyName": "WINDOWS_2008"
},
"volumeSize": 250
}
] }

• 这是商品价格的类别代码和描述:

"id": 189433 (类别代码: storage_as_a_service, "说明": "存储即服务")

"id": 189443 (类别代码: storage_block, "说明": "块存储")

"id": 189833 (类别代码: performance_storage_space, "描述": "100 - 499 GB")

"id": 189893 (类别代码: performance_storage_iops, "描述": "100 - 6000 IOPS")

• 您可以找到商品价格的 ID,在此 rest api 中按"描述"值搜索:

方法:获取

https://[用户名]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/759/getItemPrices?objectMask=mask[id,locationGroupId,item[id,keyName,description],pricing LocationGroup[locations[id,name,longName

]]]例如"描述":"存储即服务">

{

"id": 189433,
"locationGroupId": null,
"item": {
"description": "Storage as a Service",
"id": 9571,
"keyName": "STORAGE_AS_A_SERVICE"
}
}

例如"描述":"100 - 499 GB",您将找到相同的选项,但您必须根据所需的位置进行选择。

对于我的例子,我选择了"阿姆斯特丹 1","id"将是"id":189833

{

"id": 189833,
"locationGroupId": 503,
"item": {
"description": "100 - 499 GBs",
"id": 9585,
"keyName": "100_499_GBS"
},
"pricingLocationGroup": {
"description": "Location Group 2",
"id": 503,
"locationGroupTypeId": 82,
"name": "Location Group 2",
"securityLevelId": null,
"locations": [
{
"id": 449610,
"longName": "Montreal 1",
"name": "mon01"
},
{
"id": 449618,
"longName": "Montreal 2",
"name": "mon02"
},
{
"id": 448994,
"longName": "Toronto 1",
"name": "tor01"
},
{
"id": 350993,
"longName": "Toronto 2",
"name": "tor02"
},
{
"id": 221894,
"longName": "Amsterdam 2",
"name": "ams02"
},
{
"id": 265592,
"longName": "Amsterdam 1",
"name": "ams01"
},
{
"id": 814994,
"longName": "Amsterdam 3",
"name": "ams03"
}
]
}
},

商品的其余价格也是如此。

最新更新