Skip to content

Commit f68fc14

Browse files
author
Billy York
committed
fix frontend app gateway query
1 parent d8e8fc9 commit f68fc14

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

ZeroToHero.MD

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,26 +100,11 @@ Once you get beyond querying basic items like resource groups, subscriptions and
100100
This section will aim to show you different ways to accomplish extracting data from dynamic types.
101101

102102
### Operators to know
103-
These are the most common operators you need when working with dynamic types.
104-
- todynamic()
105-
- parse_json()
103+
These are the most common operators you need when working with dynamic types.
106104
- mv-expand
107105
- tolower()
108106
- tostring()
109107

110-
todynamic and parse_json are synonyms, meaning they perform the exact same funtion. You may see someone use one and someone else use the other, there is no right or wrong way.
111-
```` kusto
112-
resources
113-
| where type =~ 'Microsoft.Network/privateEndpoints'
114-
| extend nics = parse_json(properties.networkInterfaces)
115-
````
116-
```` kusto
117-
resources
118-
| where type =~ 'Microsoft.Network/privateEndpoints'
119-
| extend nics = todynamic(properties.networkInterfaces)
120-
````
121-
these two queries will produce exactly the same result. Each will produce a new field called 'nics' with the resource ID of the private endpoint nic inside it.
122-
123108
Tolower and tostring are self explanatory, mv-expand expands array objects or dynamic type objects into multiple values.
124109
  
125110
  
@@ -183,7 +168,7 @@ Now, publicIpId is addressable dot notation, or another mv-expand to get at the
183168
resources
184169
| where type =~ 'microsoft.network/applicationgateways'
185170
| mv-expand frontEndConfig=properties.frontendIPConfigurations
186-
| extend publicIpId = frontEndConfig = properties.properties.publicIPAddress.id
171+
| extend publicIpId = frontEndConfig.properties.publicIPAddress.id
187172
188173
````
189174
Continuing with Application Gateway example, underneath the same frontEndConfig is a second data property inside brackets. The http listener. To get the resource ID of the http listener we need to do a second mv-expand.

0 commit comments

Comments
 (0)