Home > Mobile >  Get only available resource list from the resource group using Azure CLI
Get only available resource list from the resource group using Azure CLI

Time:08-15

Getting the unknown results than the available resources for the command we have tried:

az resource list -g senthil-b-rg -o table

Whatwetried

We do not want the results like Failure Anomalies. How to get the available resources only like sites, storage accounts, applications from the resource group using Azure CLI command?

CodePudding user response:

You could always filter out the types you're not interested in using the --query parameter (see documentation):

az resource list -g <resource-group-name> `
  -o table `
  --query "[?type != 'microsoft.alertsmanagement/smartDetectorAlertRules' && type != 'microsoft.insights/actiongroups']"
  • Related