0

I am trying to find some reference for kusto queries for azure. In particular, I would like to find out how to query resources such as dns record sets. I am able, through a trial and error approach to extract for example dns zones, by using the following code:

query = "Resources " \
        "| where type =~ 'Microsoft.Network/dnszones' "

but I'm stuck when dealing with record sets, because, based on the doc reference it should be something like this:

query = "Resources " \
        "| where type =~ 'Microsoft.Network/dnszones/{zone_name}/all' "

but it doesn't work. I know this is not the proper reference to follow, because it's for rest api, so if anyone could help with the correct one, it'd be great.

David דודו Markovitz
  • 42,900
  • 6
  • 64
  • 88

1 Answers1

0

There may be thousands of record sets in public and private zones and some limits apply for them.

DNS Zones and Records overview - Azure DNS | Microsoft Docs

Note. The most granular element that you can see metrics for is a DNS zone. You currently can't see metrics for individual resource records within a zone but can see its count and maximum value.

I have tried to reproduce the same: below is just DNS Zones i too could get.

enter image description here

Then tried to get its properties which has cont of record sets ,their maximum count but did not give entire record set values itself.

Query:

resources 
        | where type =~ 'Microsoft.Network/dnszones' 
        | project id, name, type, properties
        |  order by name asc

enter image description here

When tried to query for record sets it shows invalidQuesry error as below:

enter image description here

Getting all those record sets can be done through azure rest api or azure powershell.

See this Azure Resource Graph Query Private DNS zones - get all DNS records - Stack Overflow

You can raise a support request or feature request for the same.

kavyaS
  • 8,026
  • 1
  • 7
  • 19