0

我正在尝试构建一个查询,列出所有订阅中的所有 NSG,这些订阅具有我定义的列表作为源端口。假设我有一个包含以下端口的列表l = [21,22,53]。如何将此列表传递给查询,以便仅获取源是列表端口的 NSG?

到目前为止我所拥有的:

Resources
| where type =~ "microsoft.network/networksecuritygroups"
| mv-expand rules=properties.securityRules
| extend description = rules.properties.description
| extend destprefix = rules.properties.destinationAddressPrefix
| extend destport = rules.properties.destinationPortRange
| extend sourceprefix = rules.properties.sourceAddressPrefix
| extend sourceport = rules.properties.sourcePortRange

预期的输出将是一个仅包含满足我列表的 NSG 的列表。

谢谢

4

0 回答 0