我正在尝试构建一个REST查询,以获取Softlayer的每小时实例的月度成本。我需要在VSI和AWS上的一个实例之间进行一些比较。
我不确定是否应该调用Softlayer_account或Billing_Item?
答案 0 :(得分:2)
此请求可以帮助您获取虚拟客人发票的日期和费用:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[vsi_id]/getBillingItem?objectMask=mask[hoursUsed,hourlyRecurringFee,currentHourlyCharge,invoiceItems[recurringFee,hourlyRecurringFee,createDate]]
<强>其中:强>
createDate: The date the invoice item was created.
recurringFee: The recurring fee of the invoice item represented by a floating point decimal in US Dollars ($USD)
要获得有关这些值含义的更多信息,请参阅:
http://sldn.softlayer.com/reference/datatypes/SoftLayer_Billing_Invoice_Item
其他参考资料:
http://sldn.softlayer.com/reference/services/SoftLayer_Billing_Item
http://sldn.softlayer.com/reference/services/SoftLayer_Billing_Item/getInvoiceItems
http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getBillingItem