使用天蓝色图表查看存储帐户的防火墙和虚拟网络设置值

问题描述 投票:0回答:1

我想编写一个天蓝色的图形查询,显示每个存储帐户的防火墙和虚拟网络设置。在公共网络下有 3 个可能的值

  • 适用于所有网络
  • 从选定的虚拟网络和 IP 地址启用
  • 已禁用

想用名称、资源组、类型、显示名称、种类来投影它。 如有任何帮助,我们将不胜感激。

azure graph azure-storage-account
1个回答
0
投票

您可以使用以下示例KQL查询来查看每个存储帐户的防火墙和虚拟网络设置:

resources
| where type == "microsoft.storage/storageaccounts"
| extend firewallSettings = 
    case(
        properties.publicNetworkAccess == "Disabled",
        "Disabled",
        isempty(properties.publicNetworkAccess) or (properties.publicNetworkAccess == "Enabled" and properties.networkAcls.defaultAction == "Allow"), 
        "Enabled for all networks",
        "Enabled from selected virtual networks and IP addresses")
| project name, resourceGroup, type, kind, firewallSettings, properties

回复:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.