The logic is as follows:
- Workspaces can be provisioned hourly or monthly.
- Monthly provisioned workspaces get one line item in the bill whose Item Description matches the regex /month-Monthly/ OR /per month per/.
- Hourly provisioned workspaces get one monthly line item in the bill plus one line item per hour that the workspace is running. For hourly provisioned workspaces, the monthly line items Item Description matches the regex /month-Hourly/ or /per month per/ (the latter is the same as for monthly provisioned workspaces). For hourly line items Item Description, it matches /hour-Hourly/ or /per hour per/.
- To determine if a monthly /per month per/ line item is monthly or hourly, we look at the Usage Type. - Usage Type will always match /AutoStop/ if it is hourly.
In all cases except one, the line item Usage Quantity will either be:
- 1.0 for one hour usage of an hourly provisioned workspace
- a fraction less than 1 which represents the percentage of hours in the month that a monthly provisioned workspace was running
- or a number greater than 1 which represents the number of hours an hourly provisioned workspace is running.
The exception is a /per month per/ line item that is for a monthly provisioned workspace. In this case Usage Quantity is 1.0, the platform knows the workspace is a monthly provisioned workspace and assumes it has been up the whole month. For all months (including current month), the platform takes the number of days per month and multiply by 24.