![Forrest logo](/images/logo.png)
az-account:tldr:2305c
az-account: Set a `subscription` to be the currently active subscription.
$ az account set --subscription ${subscription_id}
try on your machine
The command "az account set --subscription ${subscription_id}" is used with the Azure CLI (Command-Line Interface) to set the active subscription.
Here's a breakdown of the command:
- "az account set": This is the core command for interacting with Azure accounts.
- "--subscription": This option specifies that the command should target a specific subscription.
- "${subscription_id}": This is a placeholder syntax for a subscription ID variable. It needs to be replaced with the actual subscription ID.
By running this command, you can switch to a specific Azure subscription, which allows you to perform various operations and manage resources within that subscription. The subscription ID identifies a specific subscription within your Azure account.
For example, if you have multiple subscriptions and want to work on a particular one, you would replace ${subscription_id} with the actual subscription ID like this: "az account set --subscription abcdefgh-ijkl-mnop-qrst-uvwxyz".
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.