Is there anywhere you can get a full list of all the resource types offered by Azure? I'm doing policy/role management and there doesn't seem to be a great place to look for all resource types. Currently I've been using the Get-AzureRmProviderOperation
but this still doesn't show everything. For example, there's no option for Microsoft.Botservice
In this section, we will explore the three most common types of Azure resources used by MSPs when deploying IT environments: Compute (virtual machines), Storage, and Network.
You can deploy up to 800 instances of a resource type in each resource group.
In case you need to get a list of resources you have created in Microsoft Azure, use Get-AzureRMResource PowerShell cmdlet. Above command exports all Azure Resources in a CSV named AllAzureRes. CSV. The CSV file also contains the Resource Group name for each resource.
Flagging the entire list is also available here for the resource providers and here for the types and actions
You can use the Providers - List API along with the $expand=resourceTypes/aliases
query a parameter to give you everything that you need.
You can get all the resource types by
1. Appending namespace
and resourceTypes[*].resourceType
within each provider returned
2. The name of each alias is a resource type name already
Here is a simple nodejs script to get all the resource types sorted into a file
const fs = require('fs');
var a = <resource-provider-api-response-as-json-object>;
let final = [];
var b = a.value.forEach(p => {
let ns = p.namespace;
let rsts = p.resourceTypes.map(rst => ns + '/' + rst.resourceType);
final = final.concat(rsts);
p.resourceTypes.forEach(rst => {
let aliases = rst.aliases.map(a => a.name)
final = final.concat(aliases);
});
});
final.sort();
fs.writeFile("random.data", final.join('\n'), function(err) {
if(err) {
return console.log(err);
}
console.log("The file was saved!");
});
Also, if you using bash
with az
and jq
installed, you could simply run this :)
az provider list --expand resourceTypes/aliases | jq '[ .[].namespace + "/" + .[].resourceTypes[].resourceType , .[].resourceTypes[].aliases[]?.name ] | unique | sort' | less
You could just pipe the output to a file too for your use in other scripts, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With