I am trying to find a REST API / PowerShell cmdlet to retrieve the VM name(starts with RD) for an instance of Azure web app.
I found out that I can list the process Ids by Instance Id and then get Instance Process with Azure App Service. This object has details including the Machine Name. I'm wondering if there is a better way of doing this, something with lesser API calls perhaps.
Background:
I need to restart a specific instance of a Azure Web app programmatically. Users calling restart can only see the VM name or Role Instance of a web App in Application insights. I found APIs to list instances but nothing to find mapping between instance Id and VM name directly.