0

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://learn.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?

joe_GJ
  • 1
  • 1
  • Hi, Did below answer what you were looking for. Could you [accept it as answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) if it answer your question? – Levi Lu-MSFT Feb 11 '21 at 04:16

1 Answers1

0

Yes, the API documented by https://learn.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.

Rob S.
  • 1,044
  • 7
  • 25