Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Prerequisite
versionaz --version
loginaz login ( log into the browser )
image infoaz vm image show
term acceptaz vm image terms show/accept
app list 
app 
resource-group

https://learn.microsoft.com/en-us/cli/azure/group?view=azure-cli-latest
list

https://learn.microsoft.com/en-us/cli/azure/group?view=azure-cli-latest#az-group-list

az group list  

az group list --tag RG-tag

az group list --query "[?location=='ukwest']"

az group list --query "[?location!='ukwest']"



Code Block
titlelist group
collapsetrue
jlk0013 [ ~ ]$ az group list --tag RG-tag
[
  {
    "id": "/subscriptions/28295197-d42c-4d58-a57c-0afc663bb5cf/resourceGroups/testSSR",
    "location": "ukwest",
    "managedBy": null,
    "name": "testSSR",
    "properties": {
      "provisioningState": "Succeeded"
    },
    "tags": {
      "RG-tag": "SSR"
    },
    "type": "Microsoft.Resources/resourceGroups"
  }
]


create

https://learn.microsoft.com/en-us/cli/azure/group?view=azure-cli-latest#az-group-create

az group create -l ukwest -n SSR-RG2 --tag RG-tag=SSR2


Code Block
titlecreate resource group
collapsetrue
jlk0013 [ ~ ]$ az group create -l ukwest -n SSR-RG2 --tag RG-tag=SSR2
{
  "id": "/subscriptions/28295197-d42c-4d58-a57c-0afc663bb5cf/resourceGroups/SSR-RG2",
  "location": "ukwest",
  "managedBy": null,
  "name": "SSR-RG2",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": {
    "RG-tag": "SSR2"
  },
  "type": "Microsoft.Resources/resourceGroups"
}


delete

https://learn.microsoft.com/en-us/cli/azure/group?view=azure-cli-latest#az-group-delete

az group delete --name SSR-RG2


Code Block
titledelete resource group
collapsetrue
jlk0013 [ ~ ]$ az group delete --name SSR-RG2
Are you sure you want to perform this operation? (y/n): y


...