The Azure REST API for Availability Sets does not show the references for virtual machines in the Availability Set

When you make a GET rest to the Azure Availability Sets REST API you may notice that the virtual machines that are in the availability set are not shown.
https://learn.microsoft.com/rest/api/compute/availability-sets/get


For example:

https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/availabilitySets?api-version=2023-09-01


For these to be visible you must expand them using the following:

https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/availabilitySets?$expand=virtualMachines/$ref&api-version=2023-09-01




Comments

Popular posts from this blog

SOLVED: Exchange Online Management PowerShell Connect-ExchangeOnline bug "A window handle must be configured. See https://aka.ms/msal-net-wam#parent-window-handles"

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

get-windowsfeature : The given key was not present in the dictionary