Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Last active May 3, 2017 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/cd0b242be3b24d54d9a29ae00f71f08b to your computer and use it in GitHub Desktop.
Save justinyoo/cd0b242be3b24d54d9a29ae00f71f08b to your computer and use it in GitHub Desktop.
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