Reputation: 713
In my Azure cloud account, I have access to multiple subscriptions and with in each subscription there are multiple resource groups. Each resource group in turn may have multiple functions across different locations.
I can access functions for a given resource group as following:
az functionapp list --subscription <subscription_id> -g <group_id> --output table
This gives me a list of functions as :
Now I am looking to list functions for only one location at a time. I tried this :
az functionapp list --subscription <subscription_id> -g <resource_id> --query "[?location=='West US']" --output table
This works fine but looks bit complex and also for results I have to now append columns to be fetched in query like [].{Name, Location, State ,...}
as the result is very verbose with many columns:
Name,Kind,Location,State,RepositorySiteName,UsageState,Enabled,AvailabilityState,Reserved.......
I was wondering if there is an easy way to list all functions (without --query) in a given location with in a resource group. Somehow if we can specify location directly as we can provide resource group by specifying -g.
Upvotes: 0
Views: 3259
Reputation: 16108
Using --query
as you do, is probably already the best and most efficient way. Not really sure what you do not "like" about it.
Of course, you could also list all Functions in your subscription and filter locally, e.g. in something like PowerShell. But that's worse, not better.
Upvotes: 1