andrew@mac:~$ brew search azure ==> azure-cli Bash completion has been installed to: /usr/local/etc/bash_completion.d andrew@mac:~$
Two ways, either from script:-
$ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Or by installing the Azure CLI software repository, see [https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest]
andrew@mac:~$ az login
Note, we have launched a browser for you to login. For old experience with device code, use "az login --use-device-code"
You have logged in. Now let us find all the subscriptions to which you have access...
[
{
... lots of json showing available subscriptions...
}
]
andrew@mac:~$
Note $ az account list shows the above info, $ az account show shows the current subscription.
andrew@mac:~$ az account list -o table Name CloudName SubscriptionId State IsDefault --------------------------------------------------- ----------- ---------------- ------- ----------- DEV_Customer_account AzureCloud edited-9-ad48-4d Enabled True DEV_Retail_account AzureCloud edited-8-cbd9-47 Enabled False
$ az account set -s edited-abc-1234-66bbc83f4219
$ az account show
{
"environmentName": "AzureCloud",
"id": "edited-abc-1234-66bbc83f4219",
"isDefault": true,
"name": "Playpen",
"state": "Enabled",
"tenantId": "edited-1234-abcd-8b8c-908e466eefg",
"user": {
"name": "me@example.co.uk",
"type": "user"
}
}
Show ALL resources allowed (probably ALL in subscription), this is probably more than you need to see.
$ az resource list
[
{
...edited..
}
]
Show resources, in specific RG:-
$ az resource list --resource-group A-testRG1
[
{
...edited..
}
]
$ az resource show --ids /subscriptions/<subscriptionID>/resourceGroups/A-testRG1/providers/Microsoft.Compute/virtualMachines/A-ubuntu18.04-01
{
...edited...
ALL subordiname resources, eg. showing VM also shows disks, networks etc.
Doing a show on a subordinate object just shows that.
}
This page has been accessed for:-
Today: 1
Yesterday: 0
Until now: 631