HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

az tag — Manage tags on a resource. Part of `azure-cli` (also known as `az`). More information: <https://lear

Submitted by: @import:tldr-pages··
0
Viewed 0 times
resourcecommandazuretagsclimanageaz tagpart

Problem

How to use the az tag command: Manage tags on a resource. Part of azure-cli (also known as az). More information: <https://learn.microsoft.com/cli/azure/tag>.

Solution

az tag — Manage tags on a resource. Part of azure-cli (also known as az). More information: <https://learn.microsoft.com/cli/azure/tag>.

Create a tag value:
az tag add-value {{[-n|--name]}} {{tag_name}} --value {{tag_value}}


Create a tag in the subscription:
az tag create {{[-n|--name]}} {{tag_name}}


Delete a tag from the subscription:
az tag delete {{[-n|--name]}} {{tag_name}}


List all tags on a subscription:
az tag list --resource-id /subscriptions/{{subscription_id}}


Delete a tag value for a specific tag name:
az tag remove-value {{[-n|--name]}} {{tag_name}} --value {{tag_value}}

Code Snippets

Create a tag value

az tag add-value {{[-n|--name]}} {{tag_name}} --value {{tag_value}}

Create a tag in the subscription

az tag create {{[-n|--name]}} {{tag_name}}

Delete a tag from the subscription

az tag delete {{[-n|--name]}} {{tag_name}}

List all tags on a subscription

az tag list --resource-id /subscriptions/{{subscription_id}}

Delete a tag value for a specific tag name

az tag remove-value {{[-n|--name]}} {{tag_name}} --value {{tag_value}}

Context

tldr-pages: common/az tag

Revisions (0)

No revisions yet.