arm 模板 web 应用程序发布配置文件

arm template web app publish profile

我正在使用 ARM 模板部署 Web 应用程序,需要获取发布配置文件作为输出 有没有办法做到这一点? 我看到了这个: azure template output publish profile content

但无法让它工作 我尝试了参考和 listKeys,但是 none 的属性是发布配置文件

谢谢

如果您想获得 publish Credentials, you could use the ARM template list 函数来执行此操作。

"outputs": {
    "publishProfile": {
      "type": "object",
      "value": "[list(concat('Microsoft.Web/sites/', parameters('websisteName') ,'/config/publishingcredentials'), '2016-08-01')]"
    }

如果您想获得发布用户发布密码,您可以使用以下代码并更改typeobjectstring.

list(concat('Microsoft.Web/sites/', parameters('websisteName') ,'/config/publishingcredentials'), '2016-08-01').properties.publishingPassword

测试结果: