我怎样才能找回在Azure的资源组模板应用程序实例解析仪器关键? [英] How can I retrieve the instrumentation key for an Application Insights instance in an Azure Resource Group Template?

查看:207
本文介绍了我怎样才能找回在Azure的资源组模板应用程序实例解析仪器关键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法来检索一个蓝色的资源组模板应用程序实例解析仪器仪表重点?

Is there any way to retrieve the Instrumentation Key for an Application Insights instance in an Azure Resource Group template ?

我试过的说明这里检索列表清单*在Azure上可用资源的操作,但 Microsoft.Insights /组件没有出现在列表中的任何地方。它使我想起检索模板中的一个关键仪器目前不可能

I've tried the instructions here to retrieve the list of list* operations available on Azure resources, but Microsoft.Insights/components doesn't appear in the list anywhere. It's making me think that retrieving an Instrumentation Key in the template isn't currently possible

推荐答案

一些挖掘和实验后,这是我发现的作品:

After some digging and experimenting, this is what I found works:

"outputs": {
    "MyAppInsightsInstrumentationKey": {
        "value": "[reference(resourceId('Microsoft.Insights/components', variables('myAppInsightsInstanceName')), '2014-04-01').InstrumentationKey]",
        "type": "string"
    }
}

这篇关于我怎样才能找回在Azure的资源组模板应用程序实例解析仪器关键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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