手臂模板Web应用发布配置文件 [英] arm template web app publish profile

查看:91
本文介绍了手臂模板Web应用发布配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am deploying a web app using an ARM template and need to get the publish profile as an output Is there a way to do this? I saw this: azure template output publish profile content

但是无法正常工作 我尝试使用reference和listKeys进行尝试,但所有属性都不是发布配置文件

But couldn't get it to work I tried both with reference and listKeys but none of the properties was the publish profile

谢谢

推荐答案

如果要获取

If you want to get the publish Credentials, you could use the ARM template list function to do that.

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

如果要获取发布用户发布密码,则可以使用以下代码,并从更改类型.对象字符串.

If you want to get the publish user or publish password, you could use the following code and change the type from object to string.

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

测试结果:

这篇关于手臂模板Web应用发布配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆