以下の JSON では、特定の resourceType の場所のリストを取得しようとしています。
このコマンド:
az provider list --query "[?namespace=='Microsoft.Compute']"
最後に出力例(すべてを含めるには多すぎます)を提供します。次に、特定のリソース タイプを照会するにはどうすればよいですか? 次のことを試しましたが、うまくいきません。
az provider list --query "[?contains(namespace, 'Microsoft.Compute')] | [?contains(resourceType, 'virtualMachines']"
最初のコマンドの出力例:
[
{
"id": "/subscriptions/fed7f475-6055-4e3c-8529-c1345df70589/providers/Microsoft.Compute",
"namespace": "Microsoft.Compute",
"registrationState": "Registered",
"resourceTypes": [
{
"aliases": null,
"apiVersions": [
"2017-03-30",
"2016-08-30",
"2016-04-30-preview",
"2016-03-30",
"2015-06-15",
"2015-05-01-preview"
],
"locations": [
"East US",
"East US 2",
"West US",
"Central US",
"North Central US",
"South Central US",
"North Europe",
"West Europe",
"East Asia",
"Southeast Asia",
"Japan East",
"Japan West",
"Australia East",
"Australia Southeast",
"Brazil South",
"South India",
"Central India",
"West India",
"Canada Central",
"Canada East",
"West US 2",
"West Central US",
"UK South",
"UK West",
"Korea Central",
"Korea South"
],
"properties": null,
"resourceType": "availabilitySets"
},
}
]