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
Post a Comment