February 8, 2016


Month-to-date cost of a Virtual_Guest
Determine the month-to-date cost of an hourly Virtual_Guest using getBillingItem and an objectMask


import SoftLayer
from pprint import pprint as pp

client = SoftLayer.Client()
mask = "mask[createDate,hoursUsed,hourlyRecurringFee,currentHourlyCharge]"
toDateCost = client['SoftLayer_Virtual_Guest'].getBillingItem(mask=mask,id=1234567)
pp(toDateCost)

Example Response


{'createDate': '2016-02-05T14:07:37-06:00',
  'currentHourlyCharge': '.023',
  'hourlyRecurringFee': '.023',
  'hoursUsed': '1'}


Feedback?

We would love to hear it
Open an issue

/python/monthtodate/