Forrest logo
back to the az tool

az-tag:tldr:9e362

az-tag: List all tags on a subscription.
$ az tag list --resource-id /subscriptions/${subscription_id}
try on your machine

The command "az tag list --resource-id /subscriptions/${subscription_id}" is used with the Azure CLI (Command-Line Interface) to list all the tags associated with a specific resource in Azure.

Here's a breakdown of the command:

  • az: This is the Azure CLI command that initiates the Azure CLI tool.
  • tag list: This is the specific command within the Azure CLI that retrieves the list of tags.
  • --resource-id: This is a parameter specifying that you want to list tags for a specific resource.
  • /subscriptions/${subscription_id}: This is the resource ID of the subscription for which you want to list the tags. It is represented using a placeholder ${subscription_id} that needs to be replaced with the actual subscription ID.

By running this command, you will get a list of tags associated with the resource identified by the provided subscription ID. Tags are key-value pairs that you can apply to resources in Azure to help organize and categorize them for management and billing purposes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the az tool