Use the Resource Explorer from the Azure Portal
I explained how to use the Azure Resource Explorer in a previous post. Six years have passed since that, and I would like to revisit this with an update to the Resource Explorer.
This post is a reminder of a great tool, giving your access to viewing your resources represented as JSON, and easily seeing all resource IDs, fully qualified identifiers, help us understand how to target REST queries, and more.
There are two main approaches for dwelling into our Azure resources from the browser. Using the "classic" tool from resources.azure.com, and using the newer Resource Explorer in the Azure Portal.
There are numerous more ways to explore and understand what we have in our Azure estate. Visual Studio Code offers many great extensions for working with Azure, which I also would recommend you check out.
This is a simple post for a simple tool with helpful capabilities.
Differences between tools
Before we jump in, the main difference I've found between these two tools is that the one in the Portal is a read-only version without the REST commands at our fingertips. The previous tool, at resources.azure.com, also has controls to take action and make modifications and execute REST requests.
With this knowledge, we can better make a decision about where to spend our time. I am mainly using the read-only version but occasionally want to head back to the classic tool when exploring things.
Resource Explorer in the Azure Portal
Great Scott! The Azure Resource Explorer is now part of the Azure Portal, and you can view all your resources from within the Azure Portal instead of going directly to resources.azure.com.
I use this primarily when I want to review my existing resources and possibly export something or understand how they are defined.
For example, alert queries are defined as JSON. I can also get the full JSON representation of any resource I have, which is easy to convert into an ARM or Bicep template, or simply copy the raw queries and share them quickly with my colleagues. Similarly, other queries we have saved in our Azure subscriptions also show up as resources which we can dive into.
When selecting a resource, you see the JSON representation of that resource.
{
"properties": {
"resultKind": "UnKnown",
"timeModified": "2022-04-04T08:06:09.2506785Z",
"query": "resources\n| where type == \"microsoft.web/certificates\"\n| extend ExpirationDate = todatetime(properties.expirationDate)\n| extend ExpirationYear = getyear(ExpirationDate)\n| extend ExpirationMonth = format_datetime(ExpirationDate, 'yyyy-MM')\n| extend DaysUntilExpiration = datetime_diff(\"day\", ExpirationDate, now())\n| summarize count() by ExpirationMonth\n| order by ExpirationMonth asc",
"description": "My shared query"
},
"type": "microsoft.resourcegraph/queries",
"location": "global",
"subscriptionId": "REDACTED",
"resourceGroup": "resource-graph-queries",
"name": "Expiring Web App Certificates",
"id": "/subscriptions/REDACTED/resourceGroups/resource-graph-queries/providers/microsoft.resourcegraph/queries/Expiring Web App Certificates",
"tags": {},
"etag": "\"12349a64-0000-0d00-0000-3210a6f10000\""
}
Your use cases for exploring resources will likely vary from my use cases. But, at least it's straightforward and easy to get the underlying structure and information for most resources in Azure this way.
Regardless, this is an excellent tool to know about when you quickly need to navigate around and grab the underlying JSON representation of the said resource.
Here are two easy ways to find the "new" Azure Resource Explorer. You can search for it in the global search box or navigate it from "All Services".
Search for Resource Explorer
Navigate to Resource Explorer
Optionally, you can find the tool by navigating to it from the Azure Portal -> All services.
Resource Explorer at resources.azure.com
With the older tool available at resources.azure.com, you can still take action (POST, DELETE) using the REST API.
That's it for this simple tip. I find both of these tools helpful for my purposes, and now you know where to find them.
A simple post for a simple tool with excellent capabilities.
Read more:
Recent comments