Skip to content

Instantly share code, notes, and snippets.


justinyoo/GetResourceGroupsAsync.cs Secret

Last active May 3, 2017
What would you like to do?
Know Your Cloud Resource Costs on Azure
public async Task<IEnumerable<ResourceGroup>> GetResourceGroupsAsync(string subscriptionId, string authToken)
var credentials = new TokenCredentials(authToken);
using (var client = new ResourceManagementClient(credentials) { SubscriptionId = subscriptionId })
var rgs = await client.ResourceGroups.ListAsync().ConfigureAwait(false);
return rgs.ToArray();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.