Command
az resource list --resource-group MYRG --query "[].{type:type}"
output
[
{
"type": "Microsoft.Network/networkInterfaces"
},
{
"type": "Microsoft.Network/networkInterfaces"
},
{
"type": "Microsoft.Network/networkSecurityGroups"
},
{
"type": "Microsoft.Network/networkSecurityGroups"
}
]
Tried below command but no luck
$ az resource list --resource-group MYRG --query [? type == "Microsoft.Web/serverFarms"
]
bash: Microsoft.Web/serverFarms: No such file or directory
argument --query: invalid jmespath_type value: '[?'
To learn more about --query, please visit: 'https://learn.microsoft.com/cli/azure/query-azure-cli'