我正在使用全局负载均衡器,我想知道每个数据中心的带宽价格。
我已尝试以下代码,但LOAD_BALANCER_BANDWIDTH中的费用为0。 我不确定它是否是免费的。据说我想知道每GB的成本。
import SoftLayer
client = SoftLayer.create_client_from_env(...)
items = client["SoftLayer_Product_Package"].getItems(id=805)
print(items)
答案 0 :(得分:0)
The charge fee for bandwidth depends directly of the Load balancer´s associated device and not the load balancer itself (it means it will be charged for the device bandwidth´s capacity that was ordered previously on the server), see the following:
https://www.ibm.com/cloud/bandwidth
There is a server´s sample bandwidth pricing chart on url above, and if you see a device order for example in the same location as the chart (Dallas) you`ll notice the same bandwidth pricing packages as in the page above, see below:
Currently the Load Balancer service is charged as per:
its actual consumption
total amount of data it has processed.
To find the charge fee for them and on which locations they are applied you can use the following code:
import SoftLayer
client = SoftLayer.create_client_from_env(...)
objectMask= 'mask[attributes[attributeTypeKeyName], itemCategory[questions[fieldType, itemCategoryReferences]], prices[attributes[itemPriceAttributeType],categories[categoryCode],pricingLocationGroup[locations]],activeUsagePrices[pricingLocationGroup[locations]],locationConflicts]'
objectFilter = '{"items":{"prices":{"categories":{"categoryCode":{"operation":"in","options":[{"name":"data","value":["load_balancer_uptime","load_balancer_data_processed"]}]}}}}}'
items = client["SoftLayer_Product_Package"].getItems(id=805, filter=objectFilter, mask=objectMask)
print(items)
For more information see below: