0
votes

As part of Failover/negative testing, want to restart Azure App Service Environment in pipeline. Currently it's being done manually using restart button of ASE resource in Azure Portal

As a part of research came across App Service Environment -Reboot API (Reboot all machines in an App Service Environment) https://docs.microsoft.com/en-us/rest/api/appservice/appserviceenvironments/reboot Wondering is this same as ASE restart from Azure portal? or Is there any other way to do this?

1
Hi, Did below answer what you were looking for. Could you accept it as answer if it answer your question?Levi Lu-MSFT

1 Answers

0
votes

Yes, the API documented by https://docs.microsoft.com/en-us/rest/api/appservice/appserviceenvironments/reboot will effectively reboot the ASE. It will return a 202 and header called Location. You can invoke this REST API from your Azure DevOps Pipeline a number of ways. The method I prefer is to use the Invoke-RestMethod using Powershell so that you can use the response Location header to await the 200 response which means the reboot operation has concluded.