resource groups
5 TopicsPreventing and recovering from accidental deletion of an Azure Database for MySQL flexible server
Accidental deletion of critical Azure resources, such as Azure Database for MySQL flexible servers, can disrupt operations. To help avoid such accidental deletions, you can use a couple of options, including Azure Resource Locks and Azure Policy. This post explains how to implement these mechanisms, and how to revive a dropped MySQL flexible server by using the Azure CLI.858Views2likes0CommentsAutomation script for list out all resources
Hi all, This script will help you to list out all resources under you subscriptions. It's fully automation, in a single click you can get all resources details in you environment. How it's working: getting all subscription details, getting all resource group details under your subscription list out all resources one by one --------------------------------------------------------------------------------------------------------------- Automation Script: #Get Subscription count subcount=$(az account list --query [].name |jq '. |length') num=0 while [ $num -lt $subcount ] do #Getting Subscription ID subname=$(az account list --query [${num}].id -o tsv) #Getting Subscription Name subname1=$(az account list --query [${num}].name -o tsv) #setting up Subscription az account set --subscription $subname echo "$subname1" #Getting Resource Group count count=$(az group list --subscription $subname --query [].name | jq '. | length') number=0 while [ $number -lt $count ] do #Getting Resource Group Name name=$(az group list --subscription $subname --query [${number}].name -o tsv) echo " Resource Group Name= $name " #list out all resources az resource list --resource-group $name --query "[].{ResourceName:name, Type:type,CreationDate:createdTime}" --output table number=$(( number+1)) done num=$((num+1)) done --------------------------------------------------------------------------------------------------------------- Sample Output: Subscription name XXXXXXXXXXXXXXXXX Resource Group name XXXXXXXXXXXXX Resource Name Type CreationDate xxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx Resource Group Name XXXXXXXXXXXX Resource Name Type CreationDate xxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx Hope this will help, more query please ping me.904Views0likes0CommentsScott Guthrie, Executive Vice President, Microsoft Cloud Red Shirt Tour
First published on MSDN on Jan 16, 2018 Azure Red Shirt Dev TourScott Guthrie, Executive Vice President, Microsoft Cloud and Enterprise GroupVENUE INFOBirmingham, United KingdomNational Exhibition Centre (NEC)Birmingham B40 1NTUnited KingdomFor transportation options and directions, visit National Exhibition Centre (NEC).1.3KViews0likes0Comments