我正在尝试获取为 azure 资源图资源管理器中的一组负载均衡器配置的所有公共 ips 和 fqdns。我通过以下查询获得了我需要的所有数据:
Resources
| where type =~ 'Microsoft.Network/loadBalancers'
| where subscriptionId =~ '11111111-2222-3333-4444-555555555555'
| where resourceGroup =~ 'resource-group-name'
| mv-expand ipConfig=properties.frontendIPConfigurations
| project name, publicIpId = tostring(ipConfig.properties.publicIPAddress.id)
| join kind=leftouter (
Resources
| where type =~ 'microsoft.network/publicipaddresses'
| project publicIpId = id, publicIpAddress = tostring(properties.ipAddress), fqdn = tostring(properties.dnsSettings.fqdn)
)
on publicIpId
| summarize by name, publicIpAddress, fqdn
但结果的形式是:
name publicIpAddress fqdn
outbound-lb x.y.z.1 a domain
frontend-lb x.y.z.2 another domain
frontend-lb x.y.z.3 third domain
services-lb x.y.z.4 fourth domain
我需要的是:
name publicIpAddress fqdn
outbound-lb x.y.z.1 a domain
frontend-lb x.y.z.2, x.y.z.3 another domain, third domain
services-lb x.y.z.4 fourth domain
我一直在查看该summarize make_list()
功能,但未能成功获得所需的结果!