azureDataConsumption: Get data consumption of an Azure subscription for a time...

Description Usage Arguments Details See Also

Description

Formats of start time point and end time point follow ISO 8601 standard. For example, if you want to calculate data consumption between Feb 21, 2017 to Feb 25, 2017, with an aggregation granularity of "daily based", the inputs should be "2017-02-21 00:00:00" and "2017-02-25 00:00:00", for start time point and end time point, respectively.

Usage

1
2
azureDataConsumption(azureActiveContext, instance = "", timeStart, timeEnd,
  granularity = "Hourly", verbose = FALSE, warn = TRUE)

Arguments

azureActiveContext

A container used for caching variables used by AzureSMR, created by createAzureContext()

instance

Instance name that one would like to check expense. It is by default empty, which returns data consumption for all instances under subscription.

timeStart

Start time.

timeEnd

End time.

granularity

Aggregation granularity. Can be either "Daily" or "Hourly".

verbose

If TRUE, prints verbose messages

warn

If FALSE, suppresses warnings about truncated data

Details

If the aggregation granularity is hourly based, the inputs can be "2017-02-21 01:00:00" and "2017-02-21 02:00:00", for start and end time point, respectively.

NOTE by default the Azure data consumption API does not allow an aggregation granularity that is finer than an hour. In the case of "hourly based" granularity, if the time difference between start and end time point is less than an hour, data consumption will still be calculated hourly based with end time postponed.

For example, if the start time point and end time point are "2017-02-21 00:00:00" and "2017-02-21 00:45:00", the actual returned results are data consumption in the interval of "2017-02-21 00:00:00" and "2017-02-21 01:00:00". However this calculation is merely for retrieving the information of an existing instance instance (e.g. meterId) with which the pricing rate is multiplied by to obtain the overall expense.

Time zone of all time inputs are synchronized to UTC.

See Also

Other Cost functions: azureExpenseCalculator, azurePricingRates


Microsoft/AzureSMR documentation built on July 7, 2019, 11:25 p.m.