Azure CLI Output

Length: 00:05:50

Lesson Summary:

This lesson provides a brief introduction to using Azure CLI for information output and formatting.

We discuss the two main commands for outputting information (az ... list and az ... show) as well as how to format the information using the --output argument.

Information output and formatting can be a really helpful feature beyond getting easy access to information. We can combine this with other features and use it for scripting or more advanced commands.

This lesson provides tbe building blocks we use to expand upon in later lessons.

New and important commands used in this lesson:

  • Listing all current resource groups: az group list
  • Showing information about a specific resource group: az group show -n rgName
  • Listing resource groups in a different format: az group list -o OUTPUTTYPE

All commands used if you wish to follow along:

declare -A book1
book1[name]="hammeroftruth"
book1[rgname]="hammeroftruth-rg"
book1[saname]="hammeroftruthstore"
book1[vnetname]="hammeroftruth-vnet"
book1[location]="australiasoutheast"

az group list
az group show -n ${book1[rgname]}
az group list -o table
az network vnet show -g ${book1[rgname]} -n ${book1[vnetname]} --output tsv
az group list -o yaml


This lesson is only available to Linux Academy members.

Sign Up To View This Lesson
Or Log In

Looking For Team Training?

Learn More