有没有办法自动化 azure shell 脚本?

Is there a way to automate azure shell scripts?

我正在查看 Azure 提供的用于创建 API 管理用户和 "subscription key" 的以下文档:https://docs.microsoft.com/en-us/azure/api-management/scripts/powershell-add-user-and-get-subscription-key?toc=/powershell/module/toc.json

所以似乎有一些方法可以通过 http 请求或类似的方式触发用户创建。就像您知道 Google Cloud Functions 如何让您在收到 pub/sub 消息时触发 python 脚本?除了这个 API Management Azure shell 脚本,我还需要它,我还需要以某种方式 returned 输出订阅密钥。

Azure 是否支持 shell 可以访问 Azure CLI 以及 return 生成的订阅密钥的脚本批处理作业?

我想你正在寻找 PowerShell Azure Functions

在 Azure Functions 中使用 Azure CLI(如果这是您真正需要的)需要一些额外的 work,但 Azure PS 模块立即可用在大多数情况下就足够了。您所指的脚本使用 Azure PS,而不是 Azure CLI。 运行 在 Azure Functions 中应该很容易。