Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »


Prerequisite
versionaz --version
loginaz login ( log into the browser )
image infoaz vm image show
term acceptaz vm image terms show/accept
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']"


list group
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


create resource group
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


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

  • No labels