简体   繁体   English

如何在softlayer中找到任何产品的价格细节以将其放入API

[英]How to find out the price details of any offering in softlayer to put it into API

Suppose I want to purchase a replica of Block storage. 假设我要购买块存储的副本。 I have scheduleId & data center Id with me. 我有scheduleIddata center Id How I can find out the price details to put into API while purchasing a replica. 购买副本时,如何查找要放入API的价格详细信息。

Here, 这里,

I have parameters like: 我有这样的参数:

placeorder = {
     "complextype": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
     "packageId": 216,
     "location": "AMSTERDAM",
     "originVolumeScheduleId": 123,
     "originVolumeId": 321,
     "prices": [
<Which parameters are necessary here & how we can choose those>
]

I need to know how we can find out the price details with SoftLayer_Product_Package::getItems method, but I am confused while selecting prices for any offering. 我需要知道如何使用SoftLayer_Product_Package::getItems方法查找价格详细信息,但是在为任何产品选择价格时我感到困惑。

When ordering a replica , we need to set the same items than 'Primary' and add a Storage Replication item. 订购replica ,我们需要设置与“主要”相同的项目,并添加一个Storage Replication项目。

For example, we have an Endurance with following configured items: 例如,我们有一个具有以下配置项目的Endurance

  • Endurance Storage 耐力储存
  • Block Storage 块存储
  • 0.25 IOPS per GB 每GB 0.25 IOPS
  • 20 GB Storage Space 20 GB的存储空间
  • 10 GB Storage Space (Snapshot Space) 10 GB的存储空间(快照空间)

To see these items through API using StorageId , please execute the following: 要使用StorageId通过API查看这些项目,请执行以下操作:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/[storageId]/getBillingItem?objectMask=mask[id,orderItem[id,description,itemPrice.id,order[id,items]]]

Method: GET

Now, to order a replica , we need to add item prices related to above listed items and add a Storage Replication item according to chosen Location . 现在,要订购replica ,我们需要添加与上面列出的项目相关的项目价格 ,并根据选择的Location添加Storage Replication项目。

This is an example to order a replica: 这是订购副本的示例:

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

Note: 
Please change “verifyOrder” to “placeOrder” when your order is ready.
In my case, the location chosen is `PARIS`

Method: POST

Json Payload:


{
  "parameters": [
    {
      "location": "PARIS",
      "packageId": 240,
      "complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
      "originVolumeId": 6465511,
      "originVolumeScheduleId": 33641,
      "osFormatType": {
        "id": 12,
        "keyName": "LINUX"
      },
      "prices": [
        {
          "id": 147099     # 20 GB Storage Space (Storage Replication)
        },
        {
          "id": 45058     # Endurance Storage
        },
        {
          "id": 45068   # 0.25 IOPS per GB (Storage Tier Level)
        },
        {
          "id": 45098     # Block Storage 
        },
        {
          "id": 144009     # 20 GB Storage Space (Storage Space)
        },
        {
          "id": 143449     # 10 GB Storage Space (Storage Snapshot Space)
        }
      ],
      "quantity": 1
    }
  ]
}

To get valid prices according to Endurance package (packageId = 240), please execute: 要根据Endurance package (packageId = 240)获得有效价格,请执行以下操作:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectMask=mask[id,locationGroupId,item[id,keyName,description],pricingLocationGroup[locations[id, name, longName]]]

Method: GET

Some References: 一些参考:

Location-based-Pricing-and-You 基于位置的定价和您

SoftLayer_Product_Order SoftLayer_Product_Order

SoftLayer_Network_Storage:getBillingItem SoftLayer_Network_Storage:getBillingItem

How to fetch LocationID, Storage Package ID, Storage Size ID and SnapShot Space Size ID for placing order in Endurance Storage 如何获取LocationID,存储包ID,存储大小ID和SnapShot空间大小ID以在Endurance Storage中下订单

I hope this information help you. 希望这些信息对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Softlayer API:如何获取操作系统价格表? - Softlayer API: How to get OS price list? 用于附加存储详细信息的API API - API For Additional Storage Details Softlayer SoftLayer API:如何在Softlayer中获取NetScaler列表 - SoftLayer API : How to get NetScaler list in Softlayer Softlayer API:如何获取每个数据中心的负载均衡器的带宽价格? - Softlayer API: How to get load balancer's bandwidth price for each datacenter? 使用软层REST API在IBM Cloud中放置新的VLAN订单时如何获取Vlan ID详细信息 - How to get Vlan ID details when a new VLAN order is placed in IBM Cloud using softlayer REST API softlayer api:SoftLayerAPIError(SoftLayer_Exception_Order_Item_Invalid):价格1 GB(204925)对于程序包(46)无效 - softlayer api: SoftLayerAPIError(SoftLayer_Exception_Order_Item_Invalid): The price 1 GB (204925) is not valid for package (46) 如何通过Amazon API获取技术细节,描述,星级和价格? - How to get technical details, description, stars and price through Amazon API? SoftLayer API:如何创建故障单 - SoftLayer API: how to create a ticket 使用SoftLayer API时如何定义Softlayer位置? - how is Softlayer location defined when working with SoftLayer API? 如何使用SoftLayer API资源管理器在Softlayer票证中获取对话内容 - How to get conversation contents in Softlayer tickets using SoftLayer API explorer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM