Closed mykolaichuk closed 1 year ago
Some keywords (e.g. count) may require escaping
Try:
Resources
| where type == 'microsoft.containerservice/managedclusters'
| mv-expand properties.agentPoolProfiles
| where properties_agentPoolProfiles.name == "pool01"
| join kind=inner (
resourcecontainers
| where type == 'microsoft.resources/subscriptions'
| project subscriptionId, subscriptionName = name)
on subscriptionId
| where subscriptionName == 'Staging'
| project subscriptionName, name, location, VMSize = properties_agentPoolProfiles.vmSize, NodePoolName = properties_agentPoolProfiles.name, NodeCount = properties_agentPoolProfiles.['count']
| sort by name asc
Some keywords (e.g. count) may require escaping
Try:
Resources | where type == 'microsoft.containerservice/managedclusters' | mv-expand properties.agentPoolProfiles | where properties_agentPoolProfiles.name == "pool01" | join kind=inner ( resourcecontainers | where type == 'microsoft.resources/subscriptions' | project subscriptionId, subscriptionName = name) on subscriptionId | where subscriptionName == 'Staging' | project subscriptionName, name, location, VMSize = properties_agentPoolProfiles.vmSize, NodePoolName = properties_agentPoolProfiles.name, NodeCount = properties_agentPoolProfiles.['count'] | sort by name asc
thanks, it worked!
I have the following query which fails when I try to get node count. Without _NodeCount = propertiesagentPoolProfiles.count query will work.
Appreciate any help on this!