You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何查询Azure存储账户关联的Application Insights组件?

查询Azure存储账户关联的Application Insights组件

目前Azure门户没有直接提供反向查询的入口,你可以通过以下几种方式实现:

Azure CLI 方式

  1. 先获取目标存储账户的资源ID(可在存储账户的"属性"页面找到)
  2. 运行以下命令过滤出关联该存储账户的Application Insights组件:
az monitor app-insights component list --query "[?linkedStorageAccounts == '<存储账户资源ID>'].{组件名称:name, 资源组:resourceGroup}"

PowerShell 方式

确保已安装Az.ApplicationInsights模块,然后执行:

# 替换为目标存储账户的资源ID
$storageAccountId = "/subscriptions/<订阅ID>/resourceGroups/<资源组>/providers/Microsoft.Storage/storageAccounts/<存储账户名>"

Get-AzApplicationInsights | Where-Object { $_.LinkedStorageAccounts -eq $storageAccountId } | Select-Object Name, ResourceGroupName

Azure Resource Graph 查询(高效适用于多订阅场景)

在Azure门户的资源 Graph Explorer中运行以下Kusto查询:

resources
| where type == "microsoft.insights/components"
| project 组件名称 = name, 资源组 = resourceGroup, 关联存储账户 = properties.linkedStorageAccounts
| where 关联存储账户 == "/subscriptions/<订阅ID>/resourceGroups/<资源组>/providers/Microsoft.Storage/storageAccounts/<存储账户名>"

内容的提问来源于stack exchange,提问作者CodeMonkey

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.22 11:47:04