Using “SoftLayer_Product_Package::getItemPrices”
with some objectFilters
and objectMasks’, we can get some information to get valid
“IOPS”according to
“Storage Space”`.
The "attributes" property will show you a range of capacity of "GB Storage Space" (minimum/maximum "GB" supported), but not a specific value like "250/500GB".
We execute the below request to get valid “IOPS” according to “Storage Space”:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/222/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]],categories.categoryCode,attributes[itemPriceAttributeType.keyname,value]]&objectFilter={ "itemPrices": { "item": { "description": { "operation": "1200 IOPS" } }, "categories": { "categoryCode": { "operation": "performance_storage_iops" } }, "locationGroupId": { "operation": "is null" } } }
Method: GET
The response will display an amount of items. But, what of them do we have to choose?
In my response, the price_id
to select is this one:
{
"id": 41608,
"attributes": [
{
"value": "100",
"itemPriceAttributeType": {
"keyname": "CAPACITY_RESTRICTION_MIN"
}
},
{
"value": "1000",
"itemPriceAttributeType": {
"keyname": "CAPACITY_RESTRICTION_MAX"
}
},
{
"value": "STORAGE_SPACE",
"itemPriceAttributeType": {
"keyname": "CAPACITY_RESTRICTION_TYPE"
}
}
],
"categories": [
{
"categoryCode": "performance_storage_iops"
}
],
"item": {
"description": "1200 IOPS",
"keyName": "1200_IOPS_3"
}
}
Why?
Because, the item with "description:1200 IOPS"
, is into range[100 - 1000 GB STORAGE_SPACE]. In our case the configuration is: “Storage Size: 500GB”
I hope this information help you.