anon
anon

Reputation:

Get only available resource list from the resource group using Azure CLI

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?

Upvotes: 0

Views: 1354

Answers (1)

Thomas
Thomas

Reputation: 29482

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']"

Upvotes: 1

Related Questions