arm-explorer The Azure Resource Explorer is great tool that you can use to execute queries on the Azure Resource Management API’s directly from your browser against your own subscriptions. This is a great way to discover the API’s that are available and it provides you with both the REST queries and Ansible samples for easy programatic use or automation!

Prerequisites

  • Access to an Azure subscription

If you do not have your own Azure subscription, you can always follow along with an Azure sandbox. Activate a sandbox and deploy a virtual machine using the Exercise - Create a VM using the Azure portal on Microsoft Learn.

Getting Started

From your browser you can access the Azure Resource Explorer by navigating to resources.azure.com, or from within the Azure Portal you can search for the Resource Explorer to access the Resource Explorer Blade.

resource-exp

resource-exp-blade

Note that not all features are available from within the portal, so I will be using resources.azure.com.

On the left you can expand the tree view to generate various queries within your subscription. When accessing the providers view, you are generating a subscription-wide query for a specific type of resource. For instance, retrieve all disks within the subscription by expanding:

|-- subscriptions
|   |-- Concierge Subscription
|   |   |-- providers
|   |   |   |-- Microsoft.Compute
|   |   |   |   |-- disks

re-providers-disk

The resources are returned as JSON within a value array. Notice that the corrosponding GET query for the API is also displayed.

We can also query for all resources within a scope, for instance all resources within a specific resource group.

|-- subscriptions
|   |-- Concierge Subscription
|   |   |-- resourceGroups
|   |   |   |-- YOUR-RESOURCE-GROUP
|   |   |   |   |-- resources

re-resources

Notice that there is also an Ansible tab, which generates the corresponding Ansible tasks that will perform the same query.

re-resources-ansible

We can also combine the two concepts, querying for specific types within a specific resource group. Let’s see all virtual machines within the resource group.

|-- subscriptions
|   |-- Concierge Subscription
|   |   |-- resourceGroups
|   |   |   |-- YOUR-RESOURCE-GROUP
|   |   |   |   |-- providers
|   |   |   |   |   |-- Microsoft.Compute
|   |   |   |   |   |   |-- virtualMachines

re-virtualMachines

Conclusion

The Azure Resource Explorer is a great tool to navigate the Azure Resource Management APIs with plenty of possibilities for automation. Also check out my previous post on Getting Started with the Azure Resource Explorer for more ways to discover your Azure resources.