首页 文章

如何查找SoftLayer VSI的月初费用?

提问于
浏览
1

我正在尝试构建一个REST查询来获取Softlayer的每小时实例的月初成本 . 我需要在VSI和AWS上的一个实例之间进行一些比较 .

我不确定是否应该调用Softlayer_account或Billing_Item?

1 回答

  • 2

    此请求可以帮助您获取虚拟客人发票的日期和费用:

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[vsi_id]/getBillingItem?objectMask=mask[hoursUsed,hourlyRecurringFee,currentHourlyCharge,invoiceItems[recurringFee,hourlyRecurringFee,createDate]]
    

    Where:

    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
    

相关问题