Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Know Your Cloud Resource Costs on Azure
public async Task<ResourceCostData> GetResourceCostsAsync(
string offerId,
string currency,
string locale,
string regionInfo,
DateTime dateStart,
DateTime dateEnd,
AggregationGranularity granularity,
bool showDetails,
string authToken = null)
{
var client = new CodeHollow.AzureBillingApi.Client(...);
var result = await Task.Factory.StartNew(
() => client.GetResourceCosts(
offerId,
currency,
locale,
regionInfo,
dateStart,
dateEnd,
granularity,
showDetails,
authToken))
.ConfigureAwait(false);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment