Azure Resource Provider API versions and schemas

When authoring Azure Resource Manager templates you may want to know what latest options are available when defining resources, and the correct way to define them within an ARM Template. This is usually the case when a new resource is introduced into the platform such as Accelerated Networking or Managed Disks. There are a few quick and easy ways that can usually give you a start in the right direction.

The first is to check what are the supported API versions for a particular resource. For example, to see all of the available resources that are under the “Microsoft.Compute” resource provider you can run the following:

For any of these resource types you can see the list of supported API versions by running the below command. In the example it will look for the “Microsoft.Computer\virtualMachines” resource type

These are the list of supported APIs for the resource provider, and this what is specified in an ARM Template in the “apiVersion“.

Now that we know the available API versions that are supported for our chosen resource, we can take a look at the schemas for the API. Microsoft provide this on Github https://github.com/Azure/azure-resource-manager-schemas/tree/master/schemas.

However, if you noticed above in the available API versions for “Microsoft.Computer\virtualMachines” there is an available API version 2017-12-01, but this version does not appear on Microsoft’s public Github yet. Unfortunately, Microsoft do not always keep this public Github resource up to date as often as the community would like. This has been raised a few times through various channels so hopefully this improves.

Nevertheless, the majority of the time this should provide the details that will assist in authoring the ARM templates. Coming back to the example around defining managed disks in virtual machines, if we look at the API scheme for 2017-03-30 we can see the following.

This shows the reference to the #/definitions/ManagedDiskParameters, and viewing this section within the schema provides the information for the “storageAccountType” for the managed disk and the available options of “Standard_LRS” and “Premium_LRS“.