如何获取LocationID,存储包ID,存储大小ID和SnapShot空间大小ID以在Endurance Storage中下订单 [英] How to fetch LocationID, Storage Package ID, Storage Size ID and SnapShot Space Size ID for placing order in Endurance Storage
问题描述
我需要使用基于ICO的BPM(IBM Cloud Orchestrator)在我的应用程序中实现耐久存储的订购.
I need to implement placing order for endurance storage in my Application using BPM over ICO (IBM Cloud Orchestrator) dynamically.
我需要以下参数来创建用于下订单的休整呼叫
I needed following parameters for creating rest call for placing order
- 要使用的包装
- 存储类型
- 位置
- 存储包(IOPS/GB)
- 存储空间
- 快照空间大小
-
操作系统类型
- Package to use
- Storage Type
- Location
- Storage Package (IOPS/GB)
- Storage Size
- Snapshot Space Size
OS Type
-
要使用的软件包:- 我已经知道包装的耐力值是
240
.
Package to use:- I already know package value for endurance is
240
.
存储类型:- 对于持久性存储,什么是持久性数字ID其余什么 呼叫会对此有所帮助..?
Storage Type:- For endurance storage what will be numeric id for endurance What rest call will help in this..?
位置:- 剩下的电话给了我位置ID:-
Location:- This Rest call gives me locations ID:-
https:[用户名]:[apiKey] api.softlayer.com/rest /v3.1/SoftLayer_Product_Package/240/getRegions.json
https:[username]:[apiKey]api.softlayer.com/rest /v3.1/SoftLayer_Product_Package/240/getRegions.json
- 存储软件包:-
对于Endurance,我在存储包中只找到了这些 3个选项:-
- 0.25 IOPS/GB
- 2 IOPS/GB
- 4 IOPS/GB
- Storage Package:-
For Endurance I found only these 3 options in storage package :-
- 0.25 IOPS/GB
- 2 IOPS/GB
- 4 IOPS/GB
我将如何获得这三个的ID ??
How will I get id for these three..?
- 存储大小:-
对于存储大小ID,我使用了一个调用:-
For storage size id I used a rest call :-
https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]]]&objectFilter={"items":{"prices":{"pricingLocationGroup":{"locations":{"item":{"operation":"loc_code"}}}}}}
还有其他方法吗??
- 快照空间大小:- 快照空间大小ID的其余调用是什么??
- Snapshot Space Size:- What will be the rest call for snapshot space size ids..?
请帮助我,因为我需要使用 API集成此功能 BPM .我们需要订购具有动态值的耐久力存储. 预先感谢.
Please help me as I need to integrate this functionality as an API using BPM. We need to place order for endurance storage with dynamic values. Thanks in advance.
推荐答案
要获取所有 configuration Endurance items
的有效价格,可以使用要了解正在使用什么软件包Endurance
(PackageId = 240),请参阅:
To know what package Endurance
(PackageId = 240 ) is using, please see:
https://[username]:[apikey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/getAllObjects
Method: GET
这是一个示例:
Package to use = 240
Storage Type: Endurance
Location: Dal06
Storage Package: 0.25 IOPS/GB
Storage Size: 40GB
Snapshot Space Size: 5GB
OS Type: Linux
REST示例:
{
"parameters": [
{
"location": 154820,
"packageId": 240,
"osFormatType": {
"id": 12,
"keyName": "LINUX"
},
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
"prices": [
{
"id": 45058 # Endurance Storage
},
{
"id": 45098 # Block Storage
},
{
"id": 45068 # 0.25 IOPS per GB
},
{
"id": 45148 # 40 GB Storage Space
},
{
"id": 46120 # 5 GB Storage Snapshot Space
}
],
"quantity": 1
}
]
}
要获取上述ID,我们可以使用一些过滤器以更好地理解:
To get the above ids, we can use some filters for better understanding:
-获取**存储类型**:"id": 45058 # Endurance Storage
:
-Getting ** Storage Type**: "id": 45058 # Endurance Storage
:
https://[username]:[apikey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/240/getItemPrices?objectFilter={"itemPrices": {"categories": {"categoryCode": {"operation": "storage_service_enterprise"}}}}&objectMask=mask[id,categories,item[keyName,description],pricingLocationGroup[locations[id, name, longName]]]
Method: GET
我们在其中过滤的依据: categoryCode
Where we are filtering by : categoryCode
- 获取块存储"或文件存储"的ID,我们选择块存储:
"id": 45098 # Block Storage
过滤器将更改为:
objectFilter={"itemPrices": {"categories": {"categoryCode": {"operation": "storage_block"}}}}
- 获取存储包的可用ID:
- Getting available ids for Storage Package:
即:"id": 45068 # 0.25 IOPS per GB
要使用的过滤器是:"categoryCode": "storage_tier_level"
objectFilter={"itemPrices": {"categories": {"categoryCode": {"operation": "storage_tier_level"}}}}&objectMask=mask[id,categories,item[keyName,description],pricingLocationGroup[locations[id, name, longName]]]
- 获取存储大小:
- Getting Storage Size:
要使用的过滤器:"categoryCode": "performance_storage_space"
objectFilter={"itemPrices": {"categories": {"categoryCode": {"operation": "performance_storage_space"}}}}&objectMask=mask[id,categories,item[keyName,description],pricingLocationGroup[locations[id, name, longName]]]
- 获取快照空间大小:
- Getting Snapshot Space Size:
要使用的过滤器:"categoryCode": "storage_snapshot_space"
objectFilter={"itemPrices": {"categories": {"categoryCode": {"operation": "storage_snapshot_space"}}}}
一些参考文献:
这篇关于如何获取LocationID,存储包ID,存储大小ID和SnapShot空间大小ID以在Endurance Storage中下订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!