【问题标题】:How can I restart an Azure App Service slot from Python?如何从 Python 重新启动 Azure 应用服务插槽?
【发布时间】:2020-06-09 00:01:50
【问题描述】:

我想从 Python 重新启动我的 Azure Web 应用程序中的一个槽。

我该怎么做?我在官方 Python API 中找不到任何相关信息:https://docs.microsoft.com/en-us/python/api/

一种解决方法是使用 Web 应用程序公开的 REST API,但这并不是我所需要的:https://docs.microsoft.com/en-us/rest/api/appservice/webapps/restartslot

问候,

【问题讨论】:

    标签: python azure web-applications


    【解决方案1】:

    有一个azure.mgmt.web 模块来管理网页。

    而在WebAppsOperations类中,有restartrestart_slot方法。

    更多信息,您可以参考这个官方文档:restart_slot。这个方法的描述是Restarts an app (or deployment slot, if specified).

    假设这就是你想要的。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-02
    • 2023-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-06
    • 2021-01-15
    • 1970-01-01
    相关资源
    最近更新 更多