【问题标题】:Azure resource graph returns null for a config while the same is present in Json view of resourceAzure 资源图为配置返回 null,而资源的 Json 视图中存在相同的配置
【发布时间】:2022-07-08 18:26:18
【问题描述】:

在运行以下查询时,我在 internalDomainNameSuffix 上得到空值,但在资源页面概述中的 Json 视图上同样具有值。

resources | where type == 'microsoft.network/networkinterfaces' and name == 'interface1'| project  name, properties.dnsSettings.internalDomainNameSuffix

查询结果显示一些资源的数据正确,但其他显示为null,而通过Json视图仍然显示数据(不一致,显示某些资源的数据而其他资源不显示)。

【问题讨论】:

  • 可以用这个| project name,tostring(parse_json(properties).dnsSettings.internalDomainNameSuffix) 替换你的项目声明,并用这个检查你是否可以获得所有的资源结果。
  • @VenkateshDodda-MSFT 不幸的是,它仍然与您的建议相同。即使只查询 parse_json(properties).dnsSettings 也不会显示 internalDomainNameSuffix 属性本身。

标签: azure azure-resource-graph


【解决方案1】:

试试这个

资源 |其中 type == 'microsoft.network/networkinterfaces' |其中 isnotnull(name) 和 isnotnull(properties.dnsSettings.internalDomainNameSuffix) |项目名称、properties.dnsSettings.internalDomainNameSuffix、resourceGroup

【讨论】:

    猜你喜欢
    • 2019-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多