[英]How can I restart an Azure App Service slot from Python?
I would like to restart a slot in my Azure Web application from Python.我想从 Python 重新启动 Azure Web 应用程序中的一个插槽。
How can I do that?我怎样才能做到这一点? I couldn't find anything about this in the official Python API: https://docs.microsoft.com/en-us/python/api/我在官方 Python API 中找不到任何关于此的信息: https : //docs.microsoft.com/en-us/python/api/
A workaround is to use the REST API exposed by the web application, but that's not quite what I need: https://docs.microsoft.com/en-us/rest/api/appservice/webapps/restartslot一种解决方法是使用 Web 应用程序公开的 REST API,但这并不是我所需要的: https : //docs.microsoft.com/en-us/rest/api/appservice/webapps/restartslot
Regards,问候,
There is a azure.mgmt.web
module to manage web.有一个azure.mgmt.web
模块来管理网络。
And in the WebAppsOperations class, there are restart
and restart_slot
method.在WebAppsOperations类中,有restart
和restart_slot
方法。
Further more information, you could refer to this official doc: restart_slot .更多信息,你可以参考这个官方文档: restart_slot 。 The description about this method is Restarts an app (or deployment slot, if specified).
关于此方法的描述是Restarts an app (or deployment slot, if specified).
. .
Suppose this is what you want.假设这是你想要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.