我想编写一个天蓝色的图形查询,显示每个存储帐户的防火墙和虚拟网络设置。在公共网络下有 3 个可能的值
想用名称、资源组、类型、显示名称、种类来投影它。 如有任何帮助,我们将不胜感激。
您可以使用以下示例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
回复: