什么是IOPS值Id与Endurance Storage中的存储大小ID之间的关系。

时间:2016-04-07 06:45:29

标签: ibm-cloud-infrastructure

我在下订单时感到困惑。由于存储包有这三个值: -

0.25_IOPS_PER_GB = 45074

2_IOPS_PER_GB = 45084

4_IOPS_PER_GB = 45094

Ids是固定的,但是当我们在下订单时选择其中一个时,我们得到的存储大小列表在所有3个案例中几乎相同。现在假设对于所有三个包(0.25,2和4)的100 GB存储空间,100 GB的ID将不同或不同。如果它们不同,则意味着存储包和存储大小之间存在关系。然后他们之间的关系是什么。我应该尝试根据存储包获取存储大小,即选择的IOPS Id。提前致谢

1 个答案:

答案 0 :(得分:1)

  • 执行此请求时:

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItems?objectMask=mask[attributes.value,itemCategory.categoryCode,keyName,description]&objectFilter={   "items": {     "itemCategory": {       "categoryCode": {         "operation": "storage_tier_level"       }     }   } }
    
    Method: GET
    

我们可以看到Storage Packagesattribute values可以帮助我们了解存储包和存储大小之间的关系。例如,response向我们显示:

0.25 IOPS per GB --> "value": "100"

2 IOPS per GB--> "value": "200"

4 IOPS per GB--> "value": "300"
  • 执行以下请求以获取Endurance “Storage Size”过滤的有效价格时:

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]],categories.categoryCode,attributes[itemPriceAttributeType,value]]&objectFilter={   "itemPrices": {     "categories": {       "categoryCode": {         "operation": "performance_storage_space"       }     },     "locationGroupId": {       "operation": "is null"     }   } }
    
    Method: GET
    

回复显示与存储包相关的存储空间"CAPACITY_RESTRICTION_MIN""CAPACITY_RESTRICTION_MAX"

例如:“100 GB Storage Space”(id = 45234)在使用"4 IOPS per GB"("值":" 300")创建订单时应该可以成功运行。以下是回复部分:

<强>响应:

{
"id": 45234
"attributes": [3]
0:  {
"value": "300"
"itemPriceAttributeType": {
"id": 21
"keyname": "CAPACITY_RESTRICTION_MIN"
}-
}-
1:  {
"value": "300"
"itemPriceAttributeType": {
"id": 22
"keyname": "CAPACITY_RESTRICTION_MAX"
}-
}-
2:  {
"value": "STORAGE_TIER_LEVEL"
"itemPriceAttributeType": {
"id": 24
"keyname": "CAPACITY_RESTRICTION_TYPE"
}-
}-
-
"categories": [1]
0:  {
"categoryCode": "performance_storage_space"
}-
-
"item": {
"description": "100 GB Storage Space"
"keyName": "100_GB_PERFORMANCE_STORAGE_SPACE"
}-
}

这是使用以前值的verifyOrder示例:

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

方法:POST

Json Payload:

{
  "parameters": [
    {
      "location": 37473,  #Washington 1
      "packageId": 240,
      "osFormatType": {
        "id": 12,
        "keyName": "LINUX"
      },
      "complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
      "prices": [
        {
          "id": 45064   # Endurance Storage
        },
        {
          "id": 45104   # Block Storage
        },
        {
          "id": 45094   # Storage Tier Level: 4 IOPS per GB
        },
        {
          "id": 45234   # performance_storage_space: 100 GB Storage Space
        },
        {
          "id": 46176   # Storage Snapshot Space: 10 GB Storage Space
        }
      ],
      "quantity": 1
    }
  ]
}

更新1:

要使用 SoftLayer_Product_Package :: getItemPrices 以及Storage PackageStorage Size之间的关系获取有效值,请参阅:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]],categories.categoryCode,attributes[itemPriceAttributeType,value]]&objectFilter={   "itemPrices": {     "attributes": {       "value": {         "operation": 300       }     },     "categories": {       "categoryCode": {         "operation": "performance_storage_space"       }     },     "locationGroupId": {       "operation": "is null"     }   } }

Method: GET

其中:响应将显示“存储包”商品价格(categoryCode&#34;:&#34; performance_storage_space&#34;`),可在选择&#34;每GB 4个IOPS&#34; ('&#34;值&#34;:300')。