├── Docs
└── integrations.md
├── LICENSE
├── README.md
├── Queries
└── orphan-resources-queries.md
└── Workbook
└── Azure Orphaned Resources v3.0.json
/Docs/integrations.md:
--------------------------------------------------------------------------------
1 | # Integrations
2 |
3 | ## Integrates with Azure Orphan Resources Workbook
4 |
5 | The following tools use and based on queries from the Orphaned Resources Workbook.
6 |
7 | ### Azure Governance Visualizer
8 | *Author: @JulianHayward*
9 |
10 | [AzGovViz](https://aka.ms/AzGovViz) provides a convenient way to view your Azure governance and hierarchy.
11 |
12 | - Additionally you can view Orphaned Resources in your environment.
13 | - If you run AzGovViz with parameter -DoAzureConsumption then the orphaned resources output will show you potential cost savings for orphaned resources with intent 'cost savings'.
14 |
15 | ### Azure Quick Review
16 | *Author: @CarlosMendible*
17 |
18 | [AzQR](https://aka.ms/azqr) Azure Quick Review (azqr) is a powerful command-line interface (CLI) tool that specializes in analyzing Azure resources to ensure compliance with Azure's best practices and recommendations.
19 |
20 | - Scan Orphaned Resources in your environment.
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Dolev Shor
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Azure Orphaned Resources v3.0
2 |
3 | The _'Azure Orphaned Resources Workbook'_ centralizes orphaned resources in Azure environments.
4 |
5 | The purpose of this workbook is to provide an overview of your orphaned resources, enabling you to enhance efficiency by:
6 | - Saving money
7 | - Prevent misconfiguration
8 | - Simplify operations
9 |
10 | 
11 |
12 | 
13 |
14 | 
15 |
16 | 
17 |
18 |
19 | > All the information presented in this Workbook is based on Azure Resource Graph queries.
20 | >
21 |
22 | ## Resources covered
23 |
24 | > [!Tip]
25 | > 💲 This is a sign that the resource costs money
26 |
27 | The workbook includes the following kinds of resources:
28 |
29 | - Compute
30 | - App Service Plans 💲
31 | - Availability Set
32 | - Storage
33 | - Managed Disks 💲
34 | - Database
35 | - SQL Elastic Pools 💲
36 | - Networking
37 | - Public IPs 💲
38 | - Network Interfaces
39 | - Network Security Groups
40 | - Route Tables
41 | - Load Balancers 💲
42 | - Front Door WAF Policy
43 | - Traffic Manager Profiles
44 | - Application Gateways 💲
45 | - Virtual Networks
46 | - Subnets
47 | - NAT Gateways 💲
48 | - IP Groups
49 | - Private DNS zones 💲
50 | - Private Endpoints 💲
51 | - Virtual Network Gateways 💲
52 | - DDoS Protections 💲
53 | - Others
54 | - Resource Groups
55 | - API Connections
56 | - Certificates
57 |
58 | ## Resource Deletion
59 |
60 | To enable the option to delete resource(s), you need first to enable it on the filter pane.
61 |
62 | 
63 |
64 | Enable the deletion option will add the _'⛔ Delete Selected Resource(s)'_ button.
65 |
66 | 
67 |
68 | To delete resource(s), select the resource(s) from the table _(1)_ and click the _'⛔ Delete Selected Resource(s)'_ button _(2)_.
69 |
70 | 
71 |
72 | A Context pane will open with the resource(s) details to approve the deletion.
73 |
74 | 
75 |
76 | In the _View request details_ you can see the _Delete_ ARM Actions to delete the selected resource(s).
77 |
78 | 
79 |
80 |
81 | > [!Important]
82 | > **Recommended steps before deletion**
83 | > - Review the resource(s) information thoroughly before continuing with the deletion.
84 | > - Ensure that the resource(s) is not currently in use.
85 |
86 | > To delete a resource, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.
87 |
88 | ## How to use it?
89 | Importing this Workbook to your Azure environment is quite simple.
90 |
91 | Follow these steps to use the Workbook:
92 |
93 | - Login to [Azure Portal](https://portal.azure.com/)
94 | - Go to _'Azure Workbooks'_
95 |
96 |
97 |
98 | - Click on _'+ Create'_
99 |
100 |
101 |
102 | - Click on _'+ New'_
103 |
104 |
105 |
106 | - Open the Advanced Editor using the _'>'_ button on the toolbar
107 |
108 |
109 |
110 | - Select the _'Gallery Template'_ (step 1)
111 | - Replace the JSON code with this JSON code [orphaned resources JSON](https://raw.githubusercontent.com/dolevshor/azure-orphan-resources/main/Workbook/Azure%20Orphaned%20Resources%20v3.0.workbook) (step 2)
112 | - We use the _Gallery Template type_ (step 1), so we need to use the _'Azure Orphaned Resources v3.0.workbook'_ and not the _'Azure Orphaned Resources v3.0.json'_.
113 | - Click _'Apply'_ (step 3)
114 |
115 |
116 |
117 | - Click in the ‘Save’ button on the toolbar
118 |
119 | 
120 |
121 | - Select a name and where to save the Workbook:
122 | - Title: _'Azure Orphaned Resources'_
123 | - Subscription: <_Subscription Name_>
124 | - Resource group: <_Resource Group Name_>
125 | - Location: <_Region_>
126 | - Click _'Save'_
127 |
128 | 
129 |
130 | The Workbook is ready to use!
131 | - Click on _'Workbooks'_
132 | - Click on _'Azure Orphaned Resources'_ Workbook.
133 |
134 | 
135 |
136 | Start using the Workbook and review your orphaned resources.
137 |
138 | (Optional) You can filter by:
139 |
140 | - Subscription(s)
141 | - Resource Group(s)
142 |
143 | 
144 |
145 |
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/Queries/orphan-resources-queries.md:
--------------------------------------------------------------------------------
1 | # Azure Orphaned Resources - Queries
2 |
3 | Here you can find all the orphan resources queries that build this Workbook.
4 |
5 | - [Compute](#compute)
6 | - [App Service Plans](#app-service-plans)
7 | - [Availability Set](#availability-set)
8 | - [Storage](#storage)
9 | - [Managed Disks](#managed-disks)
10 | - [Database](#database)
11 | - [SQL elastic pool](#sql-elastic-pool)
12 | - [Networking](#networking)
13 | - [Public IPs](#public-ips)
14 | - [Network Interfaces](#network-interfaces)
15 | - [Network Security Groups](#network-security-groups)
16 | - [Route Tables](#route-tables)
17 | - [Load Balancers](#load-balancers)
18 | - [Front Door WAF Policy](#front-door-waf-policy)
19 | - [Traffic Manager Profiles](#traffic-manager-profiles)
20 | - [Application Gateways](#application-gateways)
21 | - [Virtual Networks](#virtual-networks)
22 | - [Subnets](#subnets)
23 | - [NAT Gateways](#nat-gateways)
24 | - [IP Groups](#ip-groups)
25 | - [Private DNS zones](#private-dns-zones)
26 | - [Private Endpoints](#private-endpoints)
27 | - [Virtual Network Gateways](#virtual-network-gateways)
28 | - - [DDoS Protection](#ddos-protections)
29 | - [Others](#others)
30 | - [Resource Groups](#resource-groups)
31 | - [API Connections](#api-connections)
32 | - [Certificates](#certificates)
33 |
34 | ## Compute
35 |
36 | #### App Service Plans
37 |
38 | [App Service plans](https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans) without hosting Apps.
39 |
40 | ```kql
41 | resources
42 | | where type =~ "microsoft.web/serverfarms"
43 | | where properties.numberOfSites == 0
44 | | extend Details = pack_all()
45 | | project subscriptionId, Resource=id, resourceGroup, location, Sku=sku.name, Tier=sku.tier, tags ,Details
46 | ```
47 |
48 | #### Availability Set
49 |
50 | [Availability Sets](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview) that not associated to any Virtual Machine (VM) or Virtual Machine Scale Set (VMSS) and not related to Azure Site Recovery.
51 |
52 | ```kql
53 | Resources
54 | | where type =~ 'Microsoft.Compute/availabilitySets'
55 | | where properties.virtualMachines == "[]"
56 | | where not(name endswith "-asr")
57 | | extend Details = pack_all()
58 | | project subscriptionId, Resource=id, resourceGroup, location, tags, Details
59 | ```
60 |
61 | > **_Note:_** Azure Site Recovery (aka: ASR) Availability Set are excluded from the orphaned resource query.
62 |
63 | > 1) Enable replication process for VM with Availability Set created additional Availability Set that end with the suffix *"-asr"*.
64 |
65 | ## Storage
66 |
67 | #### Managed Disks
68 |
69 | [Managed Disks](https://learn.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview) with 'Unattached' state and not related to Azure Site Recovery.
70 |
71 | ```kql
72 | Resources
73 | | where type has "microsoft.compute/disks"
74 | | extend diskState = tostring(properties.diskState)
75 | | where (managedBy == "" and diskState != 'ActiveSAS') or (diskState == 'Unattached' and diskState != 'ActiveSAS')
76 | | where not(name endswith "-ASRReplica" or name startswith "ms-asr-" or name startswith "asrseeddisk-")
77 | | where (tags !contains "kubernetes.io-created-for-pvc") and tags !contains "ASR-ReplicaDisk" and tags !contains "asrseeddisk" and tags !contains "RSVaultBackup"
78 | | extend Details = pack_all()
79 | | project subscriptionId, Resource=id, resourceGroup, location, diskType=sku.name, diskSizeGB=properties.diskSizeGB, timeCreated=properties.timeCreated, tags, Details
80 | ```
81 |
82 | > **_Note:_** Azure Site Recovery (aka: ASR) managed disks are excluded from the orphaned resource query.
83 |
84 | > 1) Enable replication process created a temporary *'Unattached'* managed disk that begins with the prefix *"ms-asr-"*.
85 | 2) When the replication start, a new managed disk that begin with the suffix *"-ASRReplica"* created in *'ActiveSAS'* state.
86 | 3) When replicated on-premises VMware VMs and physicall servers to managed disks in Azure, these logs are used to create recovery points on Azure-managed disks that have prefix of *"asrseeddisk-"*.
87 |
88 | > **_Note:_** AKS Persistent Volume Claim (aka: PVC) managed disks are excluded from the orphaned resource query.
89 |
90 | ## Database
91 |
92 | #### SQL elastic pool
93 |
94 | [SQL elastic pool](https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-pool-overview) without databases.
95 |
96 | ```kql
97 | resources
98 | | where type =~ 'microsoft.sql/servers/elasticpools'
99 | | project elasticPoolId = tolower(id), Resource = id, resourceGroup, location, subscriptionId, tags, properties, Details = pack_all()
100 | | join kind=leftouter (resources
101 | | where type =~ 'Microsoft.Sql/servers/databases'
102 | | project id, properties
103 | | extend elasticPoolId = tolower(properties.elasticPoolId)) on elasticPoolId
104 | | summarize databaseCount = countif(id != '') by Resource, resourceGroup, location, subscriptionId, tostring(tags), tostring(Details)
105 | | where databaseCount == 0
106 | | project-away databaseCount
107 | ```
108 |
109 | ## Networking
110 |
111 | #### Public IPs
112 |
113 | [Public IPs](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/public-ip-addresses) that are not attached to any resource (VM, NAT Gateway, Load Balancer, Application Gateway, Public IP Prefix, etc.).
114 |
115 | ```kql
116 | Resources
117 | | where type == "microsoft.network/publicipaddresses"
118 | | where properties.ipConfiguration == "" and properties.natGateway == "" and properties.publicIPPrefix == ""
119 | | extend Details = pack_all()
120 | | project subscriptionId, Resource=id, resourceGroup, location, Type=tostring(sku.name), AllocationMethod=tostring(properties.publicIPAllocationMethod), tags, Details
121 | ```
122 |
123 | #### Network Interfaces
124 |
125 | [Network Interfaces](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/private-ip-addresses) that are not attached to any resource.
126 |
127 | ```kql
128 | Resources
129 | | where type has "microsoft.network/networkinterfaces"
130 | | where isnull(properties.privateEndpoint)
131 | | where isnull(properties.privateLinkService)
132 | | where properties.hostedWorkloads == "[]"
133 | | where properties !has 'virtualmachine'
134 | | extend Details = pack_all()
135 | | project subscriptionId, Resource=id, resourceGroup, location, kind, tags, Details
136 | ```
137 |
138 | > **_Note:_** Azure Netapp Volumes are excluded from the orphaned resource query.
139 |
140 | > When creating a _Volume_ in _Azure Netapp Account_:
141 | 1) A delegated subnet created in the virtaul network (vNET).
142 | 2) A Network Interface created in the subnet with the fields:
143 | - "linkedResourceType": "Microsoft.Netapp/volumes"
144 | - "hostedWorkloads": ["/subscriptions/<_**SubscriptionId**_>/resourceGroups/<_**RG-Name**_>/providers/Microsoft.NetApp/netAppAccounts/<_**NetAppAccount-Name**_>/capacityPools//volumes/<_**NetAppVolume-Name**_>"
145 | - "bareMetalServer": { "id": "/subscriptions/<_**SubscriptionId**_>/resourceGroups/<_**RG-Name**_>/providers/Microsoft.Network/bareMetalServers/<_**baremetalTenant_svm_ID**_>"}
146 |
147 | #### Network Security Groups
148 |
149 | [Network Security Group](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/private-ip-addresses) (NSGs)] that are not attached to any network interface or subnet.
150 |
151 | ```kql
152 | Resources
153 | | where type == "microsoft.network/networksecuritygroups" and isnull(properties.networkInterfaces) and isnull(properties.subnets)
154 | | extend Details = pack_all()
155 | | project subscriptionId, Resource=id, resourceGroup, location, tags, Details
156 | ```
157 |
158 | #### Route Tables
159 |
160 | [Route Tables](https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview) that not attached to any subnet.
161 |
162 | ```kql
163 | resources
164 | | where type == "microsoft.network/routetables"
165 | | where isnull(properties.subnets)
166 | | extend Details = pack_all()
167 | | project subscriptionId, Resource=id, resourceGroup, location, tags, Details
168 | ```
169 |
170 | #### Load Balancers
171 |
172 | [Load Balancers](https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-overview) without backend address pools and without Inbound NAT Rules.
173 |
174 | ```kql
175 | resources
176 | | where type == "microsoft.network/loadbalancers"
177 | | where properties.backendAddressPools == "[]" and properties.inboundNatRules == "[]"
178 | | extend Details = pack_all()
179 | | project subscriptionId, Resource=id, resourceGroup, location, Type=tostring(sku.name), tags, Details
180 | ```
181 |
182 | #### Front Door WAF Policy
183 |
184 | [Front Door WAF Policy](https://learn.microsoft.com/en-us/azure/web-application-firewall/afds/afds-overview) without Security Policy Links association.
185 |
186 | ```kql
187 | resources
188 | | where type == "microsoft.network/frontdoorwebapplicationfirewallpolicies"
189 | | where properties.securityPolicyLinks == "[]"
190 | | extend Details = pack_all()
191 | | project Resource=id, resourceGroup, location, subscriptionId, Sku=sku.name, tags, Details
192 | ```
193 |
194 | #### Traffic Manager Profiles
195 |
196 | [Traffic Manager](https://learn.microsoft.com/en-us/azure/traffic-manager/traffic-manager-overview) without endpoints.
197 |
198 | ```kql
199 | resources
200 | | where type == "microsoft.network/trafficmanagerprofiles"
201 | | where properties.endpoints == "[]"
202 | | extend Details = pack_all()
203 | | project subscriptionId, Resource=id, resourceGroup, location, tags, Details
204 | ```
205 |
206 | #### Application Gateways
207 |
208 | [Application Gateways](https://learn.microsoft.com/azure/application-gateway/overview) without backend targets. (in backend pools)
209 |
210 | ```kql
211 | resources
212 | | where type =~ 'microsoft.network/applicationgateways'
213 | | extend backendPoolsCount = array_length(properties.backendAddressPools),SKUName= tostring(properties.sku.name), SKUTier= tostring(properties.sku.tier),SKUCapacity=properties.sku.capacity,backendPools=properties.backendAddressPools , AppGwId = tostring(id)
214 | | project AppGwId, resourceGroup, location, subscriptionId, tags, name, SKUName, SKUTier, SKUCapacity
215 | | join (
216 | resources
217 | | where type =~ 'microsoft.network/applicationgateways'
218 | | mvexpand backendPools = properties.backendAddressPools
219 | | extend backendIPCount = array_length(backendPools.properties.backendIPConfigurations)
220 | | extend backendAddressesCount = array_length(backendPools.properties.backendAddresses)
221 | | extend backendPoolName = backendPools.properties.backendAddressPools.name
222 | | extend AppGwId = tostring(id)
223 | | summarize backendIPCount = sum(backendIPCount) ,backendAddressesCount=sum(backendAddressesCount) by AppGwId
224 | ) on AppGwId
225 | | project-away AppGwId1
226 | | where (backendIPCount == 0 or isempty(backendIPCount)) and (backendAddressesCount==0 or isempty(backendAddressesCount))
227 | | extend Details = pack_all()
228 | | project subscriptionId, Resource=AppGwId, resourceGroup, location, SKUTier, SKUCapacity, tags, Details
229 | ```
230 |
231 | #### Virtual Networks
232 |
233 | [Virtual Networks](https://learn.microsoft.com/azure/virtual-network/virtual-networks-overview) (VNETs) without subnets.
234 |
235 | ```kql
236 | resources
237 | | where type == "microsoft.network/virtualnetworks"
238 | | where properties.subnets == "[]"
239 | | extend Details = pack_all()
240 | | project subscriptionId, Resource=id, resourceGroup, location, tags, Details
241 | ```
242 |
243 | #### Subnets
244 |
245 | Subnets without Connected Devices or Delegation. (Empty Subnets)
246 |
247 | ```kql
248 | resources
249 | | where type =~ "microsoft.network/virtualnetworks"
250 | | extend subnet = properties.subnets
251 | | mv-expand subnet
252 | | extend ipConfigurations = subnet.properties.ipConfigurations
253 | | extend delegations = subnet.properties.delegations
254 | | extend applicationGatewayIPConfigurations = subnet.properties.applicationGatewayIPConfigurations
255 | | where isnull(ipConfigurations) and delegations == "[]" and isnull(applicationGatewayIPConfigurations)
256 | | extend SubnetName = subnet.name, SubnetId = subnet.id
257 | | extend Details = pack_all()
258 | | project subscriptionId, SubnetName, vNetId=id, SubnetId ,resourceGroup, location, vNetName=name, Details
259 | ```
260 |
261 | #### NAT Gateways
262 |
263 | [NAT Gateways](https://learn.microsoft.com/azure/nat-gateway/nat-overview) that not attached to any subnet.
264 |
265 | ```kql
266 | resources
267 | | where type == "microsoft.network/natgateways"
268 | | where isnull(properties.subnets)
269 | | extend Details = pack_all()
270 | | project subscriptionId, Resource=id, resourceGroup, location, Sku=tostring(sku.name), Tier=tostring(sku.tier), tags, Details
271 | ```
272 |
273 | #### IP Groups
274 |
275 | [IP Groups](https://learn.microsoft.com/azure/firewall/ip-groups) that not attached to any Azure Firewall.
276 |
277 | ```kql
278 | resources
279 | | where type == "microsoft.network/ipgroups"
280 | | where properties.firewalls == "[]" and properties.firewallPolicies == "[]"
281 | | extend Details = pack_all()
282 | | project subscriptionId, Resource=id, resourceGroup, location, tags, Details
283 | ```
284 |
285 | #### Private DNS zones
286 |
287 | [Private DNS zones](https://learn.microsoft.com/azure/dns/private-dns-privatednszone) without [Virtual Network Links](https://learn.microsoft.com/en-us/azure/dns/private-dns-virtual-network-links).
288 |
289 | ```kql
290 | resources
291 | | where type == "microsoft.network/privatednszones"
292 | | where properties.numberOfVirtualNetworkLinks == 0
293 | | extend Details = pack_all()
294 | | project subscriptionId, Resource=id, resourceGroup, location, NumberOfRecordSets=properties.numberOfRecordSets, tags, Details
295 | ```
296 |
297 | #### Private Endpoints
298 |
299 | [Private Endpoints](https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview) that are not connected to any resource.
300 |
301 | ```kql
302 | resources
303 | | where type =~ "microsoft.network/privateendpoints"
304 | | extend connection = iff(array_length(properties.manualPrivateLinkServiceConnections) > 0, properties.manualPrivateLinkServiceConnections[0], properties.privateLinkServiceConnections[0])
305 | | extend subnetId = properties.subnet.id
306 | | extend subnetName = tostring(split(subnetId, "/")[-1])
307 | | extend subnetIdSplit = split(subnetId, "/")
308 | | extend vnetId = strcat_array(array_slice(subnetIdSplit,0,8), "/")
309 | | extend vnetName = tostring(split(vnetId, "/")[-1])
310 | | extend serviceId = tostring(connection.properties.privateLinkServiceId)
311 | | extend serviceIdSplit = split(serviceId, "/")
312 | | extend serviceName = tostring(serviceIdSplit[8])
313 | | extend serviceTypeEnum = iff(isnotnull(serviceIdSplit[6]), tolower(strcat(serviceIdSplit[6], "/", serviceIdSplit[7])), "microsoft.network/privatelinkservices")
314 | | extend stateEnum = tostring(connection.properties.privateLinkServiceConnectionState.status)
315 | | extend groupIds = tostring(connection.properties.groupIds[0])
316 | | where stateEnum == "Disconnected"
317 | | extend Details = pack_all()
318 | | project subscriptionId, Resource=id, resourceGroup, location, serviceName, serviceTypeEnum, groupIds, vnetId, vnetName, subnetId, subnetName, tags, Details
319 | ```
320 |
321 | #### Virtual Network Gateways
322 |
323 | [Virtual Network Gateways](https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways) without Point-to-site configuration or Connections.
324 |
325 | ```kql
326 | resources
327 | | where type =~ "microsoft.network/virtualnetworkgateways"
328 | | extend Details = pack_all()
329 | | extend SKU = tostring(properties.sku.name)
330 | | extend Tier = tostring(properties.sku.tier)
331 | | extend GatewayType = tostring(properties.gatewayType)
332 | | extend vpnClientConfiguration = properties.vpnClientConfiguration
333 | | extend Resource = id
334 | | join kind=leftouter (
335 | resources
336 | | where type =~ "microsoft.network/connections"
337 | | mv-expand Resource = pack_array(properties.virtualNetworkGateway1.id, properties.virtualNetworkGateway2.id) to typeof(string)
338 | | project Resource, connectionId = id, ConnectionProperties=properties
339 | ) on Resource
340 | | where isempty(vpnClientConfiguration) and isempty(connectionId)
341 | | project subscriptionId, Resource, resourceGroup, location, GatewayType, SKU, Tier, tags, Details
342 | ```
343 |
344 | #### DDoS Protections
345 |
346 | [DDoS protection](https://learn.microsoft.com/en-us/azure/ddos-protection/ddos-protection-overview) without protected resources. (=without Virtual Networks accosiated)
347 |
348 | ```kql
349 | resources
350 | | where type == "microsoft.network/ddosprotectionplans"
351 | | where isnull(properties.virtualNetworks)
352 | | extend Details = pack_all()
353 | | project subscriptionId, Resource=id, resourceGroup, location, tags, Details
354 | ```
355 |
356 | ## Others
357 |
358 | #### Resource Groups
359 |
360 | [Resource Groups](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/overview) without resources (including hidden types resources).
361 |
362 | ```kql
363 | ResourceContainers
364 | | where type == "microsoft.resources/subscriptions/resourcegroups"
365 | | extend rgAndSub = strcat(resourceGroup, "--", subscriptionId)
366 | | join kind=leftouter (
367 | Resources
368 | | extend rgAndSub = strcat(resourceGroup, "--", subscriptionId)
369 | | summarize count() by rgAndSub
370 | ) on rgAndSub
371 | | where isnull(count_)
372 | | extend Details = pack_all()
373 | | project subscriptionId, Resource=id, resourceGroup, location, tags ,Details
374 | ```
375 |
376 | #### API Connections
377 |
378 | [API Connections](https://learn.microsoft.com/en-us/entra/external-id/api-connectors-overview) that not related to any Logic App.
379 |
380 | ```kql
381 | resources
382 | | where type =~ 'Microsoft.Web/connections'
383 | | project subscriptionId, Resource = id , apiName = name, resourceGroup, tags, location
384 | | join kind = leftouter (
385 | resources
386 | | where type == 'microsoft.logic/workflows'
387 | | extend resourceGroup, location, subscriptionId, properties
388 | | extend var_json = properties["parameters"]["$connections"]["value"]
389 | | mvexpand var_connection = var_json
390 | | where notnull(var_connection)
391 | | extend connectionId = extract("connectionId\":\"(.*?)\"", 1, tostring(var_connection))
392 | | project connectionId, name
393 | )
394 | on $left.Resource == $right.connectionId
395 | | where connectionId == ""
396 | | extend Details = pack_all()
397 | | project subscriptionId, Resource, resourceGroup, location, tags, Details
398 | ```
399 |
400 | #### Certificates
401 |
402 | Expired certificates.
403 |
404 | ```kql
405 | resources
406 | | where type == 'microsoft.web/certificates'
407 | | extend expiresOn = todatetime(properties.expirationDate)
408 | | where expiresOn <= now()
409 | | extend Details = pack_all()
410 | | project subscriptionId, Resource=id, resourceGroup, location, Details
411 | ```
412 |
--------------------------------------------------------------------------------
/Workbook/Azure Orphaned Resources v3.0.json:
--------------------------------------------------------------------------------
1 | {
2 | "contentVersion": "1.0.0.0",
3 | "parameters": {
4 | "workbookDisplayName": {
5 | "type": "string",
6 | "defaultValue": "Azure Orphaned Resources v3.0",
7 | "metadata": {
8 | "description": "The friendly name for the workbook that is used in the Gallery or Saved List. This name must be unique within a resource group."
9 | }
10 | },
11 | "workbookType": {
12 | "type": "string",
13 | "defaultValue": "workbook",
14 | "metadata": {
15 | "description": "The gallery that the workbook will been shown under. Supported values include workbook, tsg, etc. Usually, this is 'workbook'"
16 | }
17 | },
18 | "workbookSourceId": {
19 | "type": "string",
20 | "defaultValue": "Azure Monitor",
21 | "metadata": {
22 | "description": "The id of resource instance to which the workbook will be associated"
23 | }
24 | },
25 | "workbookId": {
26 | "type": "string",
27 | "defaultValue": "[newGuid()]",
28 | "metadata": {
29 | "description": "The unique guid for this workbook instance"
30 | }
31 | }
32 | },
33 | "resources": [
34 | {
35 | "name": "[parameters('workbookId')]",
36 | "type": "microsoft.insights/workbooks",
37 | "location": "[resourceGroup().location]",
38 | "apiVersion": "2022-04-01",
39 | "dependsOn": [],
40 | "kind": "shared",
41 | "properties": {
42 | "displayName": "[parameters('workbookDisplayName')]",
43 | "serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Azure Orphaned Resources v3.0\\r\\nUse this workbook to analyze all your Orphaned resources.\"},\"name\":\"text - Title\"},{\"type\":9,\"content\":{\"version\":\"KqlParameterItem/1.0\",\"crossComponentResources\":[\"{Subscription}\"],\"parameters\":[{\"id\":\"91c13326-3422-4d1c-b3e3-1aa27414e7ae\",\"version\":\"KqlParameterItem/1.0\",\"name\":\"Subscription\",\"type\":6,\"description\":\"All Subscriptions\",\"isRequired\":true,\"multiSelect\":true,\"quote\":\"'\",\"delimiter\":\",\",\"typeSettings\":{\"additionalResourceOptions\":[\"value::all\"],\"includeAll\":true,\"showDefault\":false},\"timeContext\":{\"durationMs\":86400000},\"value\":[\"value::all\"]},{\"id\":\"df0ab425-e03c-44c6-a468-9e96455ac591\",\"version\":\"KqlParameterItem/1.0\",\"name\":\"ResourceGroup\",\"label\":\"Resource Group\",\"type\":5,\"description\":\"All Resource Groups\",\"isRequired\":true,\"multiSelect\":true,\"quote\":\"'\",\"delimiter\":\",\",\"query\":\"ResourceContainers\\r\\n| where type =~ \\\"microsoft.resources/subscriptions/resourcegroups\\\"\\r\\n| distinct resourceGroup\",\"crossComponentResources\":[\"{Subscription}\"],\"typeSettings\":{\"additionalResourceOptions\":[\"value::all\"],\"showDefault\":false},\"queryType\":1,\"value\":[\"value::all\"]},{\"id\":\"b20f40c6-577a-4ab1-aa93-d225672e6c87\",\"version\":\"KqlParameterItem/1.0\",\"name\":\"EnableDeletion\",\"label\":\"Enable Deletion\",\"type\":2,\"description\":\"By default, this feature is disabled. Enable it to allow resource deletion.\",\"isRequired\":true,\"query\":\"{\\\"version\\\":\\\"1.0.0\\\",\\\"content\\\":\\\"[\\\\r\\\\n {\\\\\\\"value\\\\\\\": \\\\\\\"false\\\\\\\", \\\\\\\"label\\\\\\\": \\\\\\\"Disable\\\\\\\", \\\\\\\"selected\\\\\\\":true},\\\\r\\\\n\\\\t{\\\\\\\"value\\\\\\\": \\\\\\\"true\\\\\\\", \\\\\\\"label\\\\\\\": \\\\\\\"Enable\\\\\\\"}\\\\r\\\\n]\\\",\\\"transformers\\\":null}\",\"typeSettings\":{\"additionalResourceOptions\":[],\"showDefault\":false},\"queryType\":8}],\"style\":\"pills\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\"},\"name\":\"parameters - Filter by Subscription\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"tabs\",\"links\":[{\"id\":\"4d474c43-d09f-4c07-929e-82d46b1e90af\",\"cellValue\":\"mainTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Overview\",\"subTarget\":\"overview\",\"style\":\"link\",\"linkIsContextBlade\":true},{\"id\":\"0fb04c14-d289-4e05-aa49-ec7e34aed8e9\",\"cellValue\":\"mainTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Compute\",\"subTarget\":\"compute\",\"style\":\"link\"},{\"id\":\"36a36461-8f96-4d01-a9f9-b918dffeb4ff\",\"cellValue\":\"mainTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Storage\",\"subTarget\":\"storage\",\"style\":\"link\"},{\"id\":\"7688ca90-bb93-4017-b79c-c505b7f5ba46\",\"cellValue\":\"mainTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Database\",\"subTarget\":\"database\",\"style\":\"link\"},{\"id\":\"fe44dca2-c58c-419a-9dbf-899697e07bef\",\"cellValue\":\"mainTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Networking\",\"subTarget\":\"networking\",\"style\":\"link\"},{\"id\":\"3b796649-537c-44c2-be19-95cd16e4eae1\",\"cellValue\":\"mainTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Others\",\"subTarget\":\"others\",\"style\":\"link\"}]},\"name\":\"links - Main Tabs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Azure Orphaned Resources Workbook\\r\\n\\r\\nThe purpose of this workbook is to provide an overview of your orphaned resources, enabling you to enhance efficiency by:\\r\\n\\r\\n- Saving money\\r\\n- Prevent misconfiguration\\r\\n- Simplify operations\\r\\n\\r\\n\\r\\n [Please submit any issues ](https://github.com/dolevshor/azure-orphan-resources/issues) with the workbook template to GitHub.\",\"style\":\"upsell\"},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"overview\"},\"showPin\":false,\"name\":\"text - Overview\"},{\"type\":1,\"content\":{\"json\":\"💲 This is a sign that the resource costs money\",\"style\":\"info\"},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"overview\"},\"name\":\"text - Overview - Cost\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/serverfarms\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfSites == 0\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.web/serverfarms\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - App Service Plans Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/availabilitysets\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.virtualMachines == \\\"[]\\\"\\r\\n| where not(name endswith \\\"-asr\\\")\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.compute/availabilitysets\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Availability Sets Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/disks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend diskState = tostring(properties.diskState)\\r\\n| where (managedBy == \\\"\\\" and diskState != 'ActiveSAS') or (diskState == 'Unattached' and diskState != 'ActiveSAS')\\r\\n| where not(name endswith \\\"-ASRReplica\\\" or name startswith \\\"ms-asr-\\\" or name startswith \\\"asrseeddisk-\\\")\\r\\n| where (tags !contains \\\"kubernetes.io-created-for-pvc\\\") and tags !contains \\\"ASR-ReplicaDisk\\\" and tags !contains \\\"asrseeddisk\\\" and tags !contains \\\"RSVaultBackup\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.compute/disks\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" 💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Managed Disks Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.sql/servers/elasticpools\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project elasticPoolId = tolower(id), Resource = id, type\\r\\n| extend Details = pack_all()\\r\\n| join kind=leftouter (resources\\r\\n| where type =~ \\\"microsoft.sql/servers/databases\\\"\\r\\n| project id, properties\\r\\n| extend elasticPoolId = tolower(properties.elasticPoolId)) on elasticPoolId\\r\\n| summarize databaseCount = countif(id != '') by Resource, type\\r\\n| where databaseCount == 0\\r\\n| project-away databaseCount\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.sql/servers/elasticpools\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - SQL elastic pools Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/publicipaddresses\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.ipConfiguration == \\\"\\\" and properties.natGateway == \\\"\\\" and properties.publicIPPrefix == \\\"\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/publicipaddresses\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Public IPs Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networkinterfaces\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.privateEndpoint)\\r\\n| where isnull(properties.privateLinkService)\\r\\n| where properties.hostedWorkloads == \\\"[]\\\"\\r\\n| where properties !has 'virtualmachine'\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/networkinterfaces\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Network Interfaces Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networksecuritygroups\\\" and isnull(properties.networkInterfaces) and isnull(properties.subnets)\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/networksecuritygroups\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Network Security Group Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/routetables\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/routetables\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Route Tables Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/loadbalancers\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.backendAddressPools == \\\"[]\\\" and properties.inboundNatRules == \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/loadbalancers\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Load Balancers Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/frontdoorwebapplicationfirewallpolicies\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.securityPolicyLinks== \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/frontdoorwebapplicationfirewallpolicies\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Front Door WAF Policy Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/trafficmanagerprofiles\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.endpoints == \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/trafficmanagerprofiles\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Traffic Manager Profiles Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend backendPoolsCount = array_length(properties.backendAddressPools),SKUName= tostring(properties.sku.name), SKUTier= tostring(properties.sku.tier),SKUCapacity=properties.sku.capacity,backendPools=properties.backendAddressPools , AppGwId = tostring(id)\\r\\n| project AppGwId, name, SKUName, SKUTier, SKUCapacity, type\\r\\n| join (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n | mvexpand backendPools = properties.backendAddressPools\\r\\n | extend backendIPCount = array_length(backendPools.properties.backendIPConfigurations)\\r\\n | extend backendAddressesCount = array_length(backendPools.properties.backendAddresses)\\r\\n | extend backendPoolName = backendPools.properties.backendAddressPools.name\\r\\n | extend AppGwId = tostring(id)\\r\\n | summarize backendIPCount = sum(backendIPCount) ,backendAddressesCount=sum(backendAddressesCount) by AppGwId\\r\\n) on AppGwId\\r\\n| project-away AppGwId1\\r\\n| where (backendIPCount == 0 or isempty(backendIPCount)) and (backendAddressesCount==0 or isempty(backendAddressesCount))\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/applicationgateways\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Application Gateway Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.subnets == \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/virtualnetworks\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Virtual Networks Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend subnet = properties.subnets\\r\\n| mv-expand subnet\\r\\n| extend ipConfigurations = subnet.properties.ipConfigurations\\r\\n| extend delegations = subnet.properties.delegations\\r\\n| extend applicationGatewayIPConfigurations = subnet.properties.applicationGatewayIPConfigurations\\r\\n| where isnull(ipConfigurations) and delegations == \\\"[]\\\" and isnull(applicationGatewayIPConfigurations) \\r\\n| extend subnets_str = \\\"Subnets\\\"\\r\\n| summarize count_ = count() by type, subnets_str\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(subnets_str:string, count_:long) [\\\"Subnets\\\", 0])\\r\\n| summarize total_count = max(count_) by subnets_str\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"subnets_str\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Subnets Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/natgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/natgateways\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - NAT Gateways Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/ipgroups\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.firewalls == \\\"[]\\\" and properties.firewallPolicies == \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/ipgroups\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - IP Groups Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privatednszones\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfVirtualNetworkLinks == 0\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/privatednszones\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Private DNS zones Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privateendpoints\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend connection = iff(array_length(properties.manualPrivateLinkServiceConnections) > 0, properties.manualPrivateLinkServiceConnections[0], properties.privateLinkServiceConnections[0])\\r\\n| extend stateEnum = tostring(connection.properties.privateLinkServiceConnectionState.status)\\r\\n| where stateEnum == \\\"Disconnected\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/privateendpoints\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Private Endpoints Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworkgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend vpnClientConfiguration = properties.vpnClientConfiguration\\r\\n| extend Resource = id\\r\\n| join kind=leftouter (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/connections\\\"\\r\\n | mv-expand Resource = pack_array(properties.virtualNetworkGateway1.id, properties.virtualNetworkGateway2.id) to typeof(string)\\r\\n | project Resource, connectionId = id, ConnectionProperties=properties\\r\\n ) on Resource \\r\\n| where isempty(vpnClientConfiguration) and isempty(connectionId)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/virtualnetworkgateways\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Virtual Network Gateways Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/ddosprotectionplans\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.virtualNetworks)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/ddosprotectionplans\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\"💲\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - DDoS protection plans Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"ResourceContainers\\r\\n| where type =~ \\\"microsoft.resources/subscriptions/resourcegroups\\\"\\r\\n| extend rgAndSub = strcat(resourceGroup, \\\"--\\\", subscriptionId)\\r\\n| join kind=leftouter (\\r\\n Resources\\r\\n | extend rgAndSub = strcat(resourceGroup, \\\"--\\\", subscriptionId)\\r\\n | summarize count() by rgAndSub\\r\\n) on rgAndSub\\r\\n| where isnull(count_)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.resources/subscriptions/resourcegroups\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Resource Groups Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/connections\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project resourceId = id , apiName = name, subscriptionId, resourceGroup, tags, location, type\\r\\n| join kind = leftouter (\\r\\n resources\\r\\n | where type == 'microsoft.logic/workflows'\\r\\n | extend resourceGroup, location, subscriptionId, properties\\r\\n | extend var_json = properties[\\\"parameters\\\"][\\\"$connections\\\"][\\\"value\\\"]\\r\\n\\t| mvexpand var_connection = var_json\\r\\n | where notnull(var_connection)\\r\\n | extend connectionId = extract(\\\"connectionId\\\\\\\":\\\\\\\"(.*?)\\\\\\\"\\\", 1, tostring(var_connection))\\r\\n | project connectionId, name\\r\\n )\\r\\n on $left.resourceId == $right.connectionId\\r\\n| where connectionId == \\\"\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.web/connections\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - API Connections Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/certificates\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend expiresOn = todatetime(properties.expirationDate)\\r\\n| where expiresOn <= now()\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"certificates\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":3,\"title\":\" \",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true}},\"customWidth\":\"16.5\",\"name\":\"query - Overview - Certificates Count\"}]},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"overview\"},\"name\":\"group - Overview - Summary\"}]},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"overview\"},\"name\":\"group - Overview\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"tabs\",\"links\":[{\"id\":\"8e1c6962-5369-4cc3-9fe9-1ff6ed0d92af\",\"cellValue\":\"computeTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"App Service Plans 💲\",\"subTarget\":\"appsp\",\"style\":\"link\",\"linkIsContextBlade\":true},{\"id\":\"85598350-5dc0-4087-ae66-b50d4aeadba7\",\"cellValue\":\"computeTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Availability Sets\",\"subTarget\":\"avset\",\"style\":\"link\"}]},\"name\":\"links - Compute Tabs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned App Service Plans\"},\"name\":\"text - Title - App Service Plan\"},{\"type\":1,\"content\":{\"json\":\"[App Service plans](https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans) without hosting Apps.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/serverfarms\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfSites == 0\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.web/serverfarms\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - App Service Plan count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/serverfarms\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfSites == 0\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - App Service Plan by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/serverfarms\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfSites == 0\\r\\n| summarize count(type) by tostring(sku.name)\",\"size\":4,\"title\":\"Count by SKU\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - App Service Plan by SKU\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/serverfarms\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfSites == 0\\r\\n| summarize count(type) by tostring(sku.tier)\",\"size\":4,\"title\":\"Count by Tier\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - App Service Plan by Tier\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/serverfarms\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfSites == 0\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, SKU=sku.name, Tier=sku.tier, tags ,Details\",\"size\":3,\"title\":\"Orphaned App Service Plans\",\"noDataMessage\":\"No orphaned App Service Plans found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"SKU\",\"formatter\":1},{\"columnMatch\":\"Tier\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"SKU\",\"label\":\"Sku\"},{\"columnId\":\"Tier\",\"label\":\"Tier\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Orphan App Service Plans\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following App Service Plan(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"computeTab\",\"comparison\":\"isEqualTo\",\"value\":\"appsp\"},\"name\":\"group - Compute - App Service Plan\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Availability Set\"},\"name\":\"text - Title - Availability Set\"},{\"type\":1,\"content\":{\"json\":\"[Availability Sets](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview) that not associated to any Virtual Machine (VM) or Virtual Machine Scale Set (VMSS) and not related to Azure Site Recovery.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/availabilitysets\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.virtualMachines == \\\"[]\\\"\\r\\n| where not(name endswith \\\"-asr\\\")\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.compute/availabilitysets\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Availability Set Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/availabilitysets\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.virtualMachines == \\\"[]\\\"\\r\\n| where not(name endswith \\\"-asr\\\")\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Availability Set by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ 'microsoft.compute/availabilitysets'\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.virtualMachines == \\\"[]\\\"\\r\\n| where not(name endswith \\\"-asr\\\")\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details\",\"size\":3,\"title\":\"Orphaned Availability Set\",\"noDataMessage\":\"No orphaned Availability Set found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Orphan Availability Set\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Availability Set(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"computeTab\",\"comparison\":\"isEqualTo\",\"value\":\"avset\"},\"name\":\"group - Compute - Availability Set\"}]},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"compute\"},\"name\":\"group - Compute\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"tabs\",\"links\":[{\"id\":\"b2a47b9d-1023-418a-8ffc-67a693c0d5a6\",\"cellValue\":\"storageTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Managed Disks 💲\",\"subTarget\":\"disks\",\"style\":\"link\",\"linkIsContextBlade\":true}]},\"name\":\"links - Storage Tabs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Managed Disks\"},\"name\":\"text - Title - Disks\"},{\"type\":1,\"content\":{\"json\":\"[Managed Disks](https://learn.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview) with 'Unattached' state and not related to Azure Site Recovery.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/disks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend diskState = tostring(properties.diskState)\\r\\n| where (managedBy == \\\"\\\" and diskState != 'ActiveSAS') or (diskState == 'Unattached' and diskState != 'ActiveSAS')\\r\\n| where not(name endswith \\\"-ASRReplica\\\" or name startswith \\\"ms-asr-\\\" or name startswith \\\"asrseeddisk-\\\")\\r\\n| where (tags !contains \\\"kubernetes.io-created-for-pvc\\\") and tags !contains \\\"ASR-ReplicaDisk\\\" and tags !contains \\\"asrseeddisk\\\" and tags !contains \\\"RSVaultBackup\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.compute/disks\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Total Disks Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/disks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend diskState = tostring(properties.diskState)\\r\\n| where (managedBy == \\\"\\\" and diskState != 'ActiveSAS') or (diskState == 'Unattached' and diskState != 'ActiveSAS')\\r\\n| where not(name endswith \\\"-ASRReplica\\\" or name startswith \\\"ms-asr-\\\" or name startswith \\\"asrseeddisk-\\\")\\r\\n| where (tags !contains \\\"kubernetes.io-created-for-pvc\\\") and tags !contains \\\"ASR-ReplicaDisk\\\" and tags !contains \\\"asrseeddisk\\\" and tags !contains \\\"RSVaultBackup\\\"\\r\\n| extend SizeGB = tolong(properties.diskSizeGB)\\r\\n| summarize ['Total Disk Size (GB)']=sum(SizeGB)\",\"size\":4,\"title\":\"Total Disk Size (GB)\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"formatter\":1},\"leftContent\":{\"columnMatch\":\"Total Disk Size (GB)\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Total Disk Size (GB)\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/disks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend diskState = tostring(properties.diskState)\\r\\n| where (managedBy == \\\"\\\" and diskState != 'ActiveSAS') or (diskState == 'Unattached' and diskState != 'ActiveSAS')\\r\\n| where not(name endswith \\\"-ASRReplica\\\" or name startswith \\\"ms-asr-\\\" or name startswith \\\"asrseeddisk-\\\")\\r\\n| where (tags !contains \\\"kubernetes.io-created-for-pvc\\\") and tags !contains \\\"ASR-ReplicaDisk\\\" and tags !contains \\\"asrseeddisk\\\" and tags !contains \\\"RSVaultBackup\\\"\\r\\n| summarize Count=count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Disks by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/disks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend diskState = tostring(properties.diskState)\\r\\n| where (managedBy == \\\"\\\" and diskState != 'ActiveSAS') or (diskState == 'Unattached' and diskState != 'ActiveSAS')\\r\\n| where not(name endswith \\\"-ASRReplica\\\" or name startswith \\\"ms-asr-\\\" or name startswith \\\"asrseeddisk-\\\")\\r\\n| where (tags !contains \\\"kubernetes.io-created-for-pvc\\\") and tags !contains \\\"ASR-ReplicaDisk\\\" and tags !contains \\\"asrseeddisk\\\" and tags !contains \\\"RSVaultBackup\\\"\\r\\n| summarize Count=count(type) by DiskType=tostring(sku.name)\",\"size\":4,\"title\":\"Count by Disk Type\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Disks by DiskType\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.compute/disks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend diskState = tostring(properties.diskState)\\r\\n| where (managedBy == \\\"\\\" and diskState != 'ActiveSAS') or (diskState == 'Unattached' and diskState != 'ActiveSAS')\\r\\n| where not(name endswith \\\"-ASRReplica\\\" or name startswith \\\"ms-asr-\\\" or name startswith \\\"asrseeddisk-\\\")\\r\\n| where (tags !contains \\\"kubernetes.io-created-for-pvc\\\") and tags !contains \\\"ASR-ReplicaDisk\\\" and tags !contains \\\"asrseeddisk\\\" and tags !contains \\\"RSVaultBackup\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, diskType=sku.name, diskSizeGB=properties.diskSizeGB, timeCreated=properties.timeCreated, tags, Details\\r\\n\",\"size\":3,\"title\":\"Orphaned Managed Disks\",\"noDataMessage\":\"No orphaned Managed Disks found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"diskType\",\"formatter\":1},{\"columnMatch\":\"diskSizeGB\",\"formatter\":1},{\"columnMatch\":\"timeCreated\",\"formatter\":6},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"sortBy\":[{\"itemKey\":\"diskSizeGB\",\"sortOrder\":1}],\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"diskType\",\"label\":\"Disk Type\"},{\"columnId\":\"diskSizeGB\",\"label\":\"Disk Size (GB)\"},{\"columnId\":\"timeCreated\",\"label\":\"Time Created\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]},\"sortBy\":[{\"itemKey\":\"diskSizeGB\",\"sortOrder\":1}]},\"name\":\"query - Managed Disks\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Managed Disk(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"storageTab\",\"comparison\":\"isEqualTo\",\"value\":\"disks\"},\"name\":\"group - Storage - Manaded Disks\"}]},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"storage\"},\"name\":\"group - Storage\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"tabs\",\"links\":[{\"id\":\"b2a47b9d-1023-418a-8ffc-67a693c0d5a6\",\"cellValue\":\"databaseTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"SQL elastic pools 💲\",\"subTarget\":\"sqlelasticpools\",\"style\":\"link\",\"linkIsContextBlade\":true}]},\"name\":\"links - Database Tabs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned SQL elastic pools\"},\"name\":\"text - Title - SQL elastic pools\"},{\"type\":1,\"content\":{\"json\":\"[SQL elastic pools](https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-pool-overview) without databases.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.sql/servers/elasticpools\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project elasticPoolId = tolower(id), Resource = id, type\\r\\n| extend Details = pack_all()\\r\\n| join kind=leftouter (resources\\r\\n| where type =~ \\\"microsoft.sql/servers/databases\\\"\\r\\n| project id, properties\\r\\n| extend elasticPoolId = tolower(properties.elasticPoolId)) on elasticPoolId\\r\\n| summarize databaseCount = countif(id != '') by Resource, type\\r\\n| where databaseCount == 0\\r\\n| project-away databaseCount\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.sql/servers/elasticpools\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Total SQL elastic pools Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.sql/servers/elasticpools\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project elasticPoolId = tolower(id), Resource = id, type, location\\r\\n| extend Details = pack_all()\\r\\n| join kind=leftouter (resources\\r\\n| where type =~ 'Microsoft.Sql/servers/databases'\\r\\n| project id, properties\\r\\n| extend elasticPoolId = tolower(properties.elasticPoolId)) on elasticPoolId\\r\\n| summarize databaseCount = countif(id != '') by Resource, type, location\\r\\n| where databaseCount == 0\\r\\n| project-away databaseCount\\r\\n| summarize Count=count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - SQL elastic pools by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.sql/servers/elasticpools\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project elasticPoolId = tolower(id), Resource = id, type, skuName = sku.name\\r\\n| extend Details = pack_all()\\r\\n| join kind=leftouter (resources\\r\\n| where type =~ 'Microsoft.Sql/servers/databases'\\r\\n| project id, properties\\r\\n| extend elasticPoolId = tolower(properties.elasticPoolId)) on elasticPoolId\\r\\n| summarize databaseCount = countif(id != '') by Resource, type, tostring(skuName)\\r\\n| where databaseCount == 0\\r\\n| project-away databaseCount\\r\\n| summarize Count=count(type) by skuName\",\"size\":4,\"title\":\"Count by Type\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - SQL elastic pools by Type\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.sql/servers/elasticpools\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project elasticPoolId = tolower(id), Resource = id, type, skuTier = sku.tier\\r\\n| extend Details = pack_all()\\r\\n| join kind=leftouter (resources\\r\\n| where type =~ \\\"Microsoft.Sql/servers/databases\\\"\\r\\n| project id, properties\\r\\n| extend elasticPoolId = tolower(properties.elasticPoolId)) on elasticPoolId\\r\\n| summarize databaseCount = countif(id != '') by Resource, type, tostring(skuTier)\\r\\n| where databaseCount == 0\\r\\n| project-away databaseCount\\r\\n| summarize Count=count(type) by skuTier\",\"size\":4,\"title\":\"Count by Tier\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - SQL elastic pools by Tier\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.sql/servers/elasticpools\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project elasticPoolId = tolower(id), Resource = id, resourceGroup, location, skuName = sku.name, skuTier = sku.tier, subscriptionId, tags, properties, Details = pack_all()\\r\\n| join kind=leftouter (resources\\r\\n| where type =~ 'Microsoft.Sql/servers/databases'\\r\\n| project id, properties\\r\\n| extend elasticPoolId = tolower(properties.elasticPoolId)) on elasticPoolId\\r\\n| summarize databaseCount = countif(id != '') by Resource, resourceGroup, location, Type=tostring(skuName), Tier=tostring(skuTier), subscriptionId, Tags=tostring(tags), tostring(Details)\\r\\n| where databaseCount == 0\\r\\n| project-away databaseCount\",\"size\":3,\"title\":\"Orphaned SQL elastic pools\",\"noDataMessage\":\"No orphaned SQL elastic pools found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Type\",\"formatter\":1},{\"columnMatch\":\"Tier\",\"formatter\":1},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Tags\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkIsContextBlade\":true}},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"Type\",\"label\":\"Type\"},{\"columnId\":\"Tier\",\"label\":\"Tier\"},{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - SQL elastic pools\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following SQL Elastic Pool(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"databaseTab\",\"comparison\":\"isEqualTo\",\"value\":\"sqlelasticpools\"},\"name\":\"group - Database - SQL elastic pools\"}]},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"database\"},\"name\":\"group - Database\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"tabs\",\"links\":[{\"id\":\"75dbecf0-d939-484a-a9b6-7ac357384d56\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Public IPs 💲\",\"subTarget\":\"publicips\",\"style\":\"link\"},{\"id\":\"b2a47b9d-1023-418a-8ffc-67a693c0d5a6\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Network Interfaces\",\"subTarget\":\"nics\",\"style\":\"link\",\"linkIsContextBlade\":true},{\"id\":\"08ce5f59-a9bd-4a43-93c6-1c6221ec734f\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Network Security Groups\",\"subTarget\":\"nsg\",\"style\":\"link\"},{\"id\":\"66b996b0-d586-40d7-9097-c707ff68a6da\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Route Tables\",\"subTarget\":\"routetables\",\"style\":\"link\"},{\"id\":\"6fcbb7f1-d77e-4efb-9f3f-d520801aa8f6\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Load Balancers 💲\",\"subTarget\":\"loadbalancers\",\"style\":\"link\"},{\"id\":\"3582e9a9-f35a-4ebb-9077-09e22aae768c\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Front Door WAF Policy\",\"subTarget\":\"fdwafpolicy\",\"style\":\"link\"},{\"id\":\"a63893e8-9852-4406-a6dd-22af3738b25c\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Traffic Managers\",\"subTarget\":\"tmprofiles\",\"style\":\"link\"},{\"id\":\"de4a5d0f-4ad2-4616-931f-039bd72b9dc0\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Application Gateways 💲\",\"subTarget\":\"appgw\",\"style\":\"link\"},{\"id\":\"1069ee4a-8cd4-4b81-8bdc-0f80a11f02ac\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Virtual Networks\",\"subTarget\":\"vnets\",\"style\":\"link\"},{\"id\":\"388ae01a-7666-4f02-ae9e-fd6debfa177d\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"NAT Gateways 💲\",\"subTarget\":\"natgw\",\"style\":\"link\"},{\"id\":\"4c4a8734-1a0c-4d83-826c-9c7310e2e9be\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"IP Groups\",\"subTarget\":\"ipgroup\",\"style\":\"link\"},{\"id\":\"a538397c-15d8-449c-9068-1eef3caa9a80\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Private DNS zones 💲\",\"subTarget\":\"privatednszones\",\"style\":\"link\"},{\"id\":\"30275d35-8385-4327-bb0e-4497057f63f0\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Private Endpoints 💲\",\"subTarget\":\"privateendpoints\",\"style\":\"link\"},{\"id\":\"2b5c6c87-9f7e-4afa-894e-e2e0804dd473\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Virtual Network Gateways 💲\",\"subTarget\":\"vngs\",\"style\":\"link\"},{\"id\":\"5a32b401-ae7a-43da-897f-b6f18bbc125b\",\"cellValue\":\"networkingTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"DDoS protection plans 💲\",\"subTarget\":\"DDoSplans\",\"style\":\"link\"}]},\"name\":\"links - Networking Tabs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Public IPs\"},\"name\":\"text - Title - Public IPs\"},{\"type\":1,\"content\":{\"json\":\"[Public IPs](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/public-ip-addresses) that are not attached to any resource (VM, NAT Gateway, Load Balancer, Application Gateway, Public IP Prefix, etc.).\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/publicipaddresses\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.ipConfiguration == \\\"\\\" and properties.natGateway == \\\"\\\" and properties.publicIPPrefix == \\\"\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/publicipaddresses\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Public IPs Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/publicipaddresses\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.ipConfiguration == \\\"\\\" and properties.natGateway == \\\"\\\" and properties.publicIPPrefix == \\\"\\\"\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Public IPs by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/publicipaddresses\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.ipConfiguration == \\\"\\\" and properties.natGateway == \\\"\\\" and properties.publicIPPrefix == \\\"\\\"\\r\\n| summarize count(type) by tostring(sku.name)\",\"size\":4,\"title\":\"Count by Type\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Public IPs by Type\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/publicipaddresses\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.ipConfiguration == \\\"\\\" and properties.natGateway == \\\"\\\" and properties.publicIPPrefix == \\\"\\\"\\r\\n| summarize count(type) by AllocationMethod=tostring(properties.publicIPAllocationMethod)\",\"size\":4,\"title\":\"Count by Allocation Method\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Public IPs by Allocation Method\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/publicipaddresses\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.ipConfiguration == \\\"\\\" and properties.natGateway == \\\"\\\" and properties.publicIPPrefix == \\\"\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, Type=tostring(sku.name), AllocationMethod=tostring(properties.publicIPAllocationMethod), tags, Details\",\"size\":3,\"title\":\"Orphaned Public IPs\",\"noDataMessage\":\"No orphaned Public IPs found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Type\",\"formatter\":1},{\"columnMatch\":\"AllocationMethod\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"Type\",\"label\":\"Type\"},{\"columnId\":\"AllocationMethod\",\"label\":\"Allocation Method\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Public IPs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Public IP(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"publicips\"},\"name\":\"group - Networking - Public IPs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Network Interfaces\"},\"name\":\"text - Title - Network Interfaces\"},{\"type\":1,\"content\":{\"json\":\"[Network Interfaces](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/private-ip-addresses) that are not attached to any resource.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networkinterfaces\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.privateEndpoint)\\r\\n| where isnull(properties.privateLinkService)\\r\\n| where properties.hostedWorkloads == \\\"[]\\\"\\r\\n| where properties !has 'virtualmachine'\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/networkinterfaces\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Network Interfaces Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networkinterfaces\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.privateEndpoint)\\r\\n| where isnull(properties.privateLinkService)\\r\\n| where properties.hostedWorkloads == \\\"[]\\\"\\r\\n| where properties !has 'virtualmachine'\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Network Interfaces by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networkinterfaces\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.privateEndpoint)\\r\\n| where isnull(properties.privateLinkService)\\r\\n| where properties.hostedWorkloads == \\\"[]\\\"\\r\\n| where properties !has 'virtualmachine'\\r\\n| summarize count(type) by kind\",\"size\":4,\"title\":\"Count by Kind\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Network Interfaces by kind\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networkinterfaces\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.privateEndpoint)\\r\\n| where isnull(properties.privateLinkService)\\r\\n| where properties.hostedWorkloads == \\\"[]\\\"\\r\\n| where properties !has 'virtualmachine'\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, kind, tags, Details\",\"size\":3,\"title\":\"Orphaned Network Interfaces\",\"noDataMessage\":\"No orphaned Network Interfaces found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"exportToExcelOptions\":\"all\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"kind\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"kind\",\"label\":\"Kind\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Network Interfaces\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Network Interface(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"nics\"},\"name\":\"group - Networking - Network Interfaces\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Network Security Groups\"},\"name\":\"text - Title - Network Security Groups\"},{\"type\":1,\"content\":{\"json\":\"[Network Security Group](https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview) (NSGs) that are not attached to any network interface or subnet.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networksecuritygroups\\\" and isnull(properties.networkInterfaces) and isnull(properties.subnets)\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/networksecuritygroups\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - NSGs Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networksecuritygroups\\\" and isnull(properties.networkInterfaces) and isnull(properties.subnets)\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - NSGs by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"Resources\\r\\n| where type =~ \\\"microsoft.network/networksecuritygroups\\\" and isnull(properties.networkInterfaces) and isnull(properties.subnets)\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details\",\"size\":3,\"title\":\"Orphaned Network Security Group\",\"noDataMessage\":\"No orphaned NSGs found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - NSGs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following NSG(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"nsg\"},\"name\":\"group - Networking - Network Security Groups\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Route Tables\"},\"name\":\"text - Title - Route Tables\"},{\"type\":1,\"content\":{\"json\":\"[Route Tables](https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview) that not attached to any subnet.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/routetables\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/routetables\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Route Tables Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/routetables\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Route Tables by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/routetables\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details\",\"size\":3,\"title\":\"Orphaned Route Tables\",\"noDataMessage\":\"No orphaned Route Tables found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"showPin\":false,\"name\":\"query - Route Tables\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Route Table(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"routetables\"},\"name\":\"group - Networking - Route Tables\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Load Balancers\"},\"name\":\"text - Title - Load Balancers\"},{\"type\":1,\"content\":{\"json\":\"[Load Balancers](https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-overview) without backend address pools and without Inbound NAT Rules.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/loadbalancers\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.backendAddressPools == \\\"[]\\\" and properties.inboundNatRules == \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/loadbalancers\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Load Balancers count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/loadbalancers\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.backendAddressPools == \\\"[]\\\" and properties.inboundNatRules == \\\"[]\\\"\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Load Balancers by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/loadbalancers\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.backendAddressPools == \\\"[]\\\" and properties.inboundNatRules == \\\"[]\\\"\\r\\n| summarize count(type) by tostring(sku.name)\",\"size\":4,\"title\":\"Count by Type\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Load Balancers by Type\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/loadbalancers\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.backendAddressPools == \\\"[]\\\" and properties.inboundNatRules == \\\"[]\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, Type=tostring(sku.name), tags, Details\",\"size\":3,\"title\":\"Orphaned Load Balances\",\"noDataMessage\":\"No orphaned Load Balances found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Type\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"Type\",\"label\":\"Type\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Load Balancers\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Load Balancer(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"loadbalancers\"},\"name\":\"group - Networking - Load Balancers\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Front Door WAF Policy\"},\"name\":\"text - Title - Front Door WAF Policy\"},{\"type\":1,\"content\":{\"json\":\"[Front Door WAF Policy](https://learn.microsoft.com/en-us/azure/web-application-firewall/afds/afds-overview) without associations.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/frontdoorwebapplicationfirewallpolicies\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.securityPolicyLinks== \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/frontdoorwebapplicationfirewallpolicies\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Front Door WAF Policy count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/frontdoorwebapplicationfirewallpolicies\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.securityPolicyLinks == \\\"[]\\\"\\r\\n| summarize count(type) by tostring(sku.name)\",\"size\":4,\"title\":\"Count by SKU\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query Front Door WAF Policy by SKU\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/frontdoorwebapplicationfirewallpolicies\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.securityPolicyLinks == \\\"[]\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, SKU=sku.name, tags, Details\",\"size\":3,\"title\":\"Orphaned Front Door WAF Policy\",\"noDataMessage\":\"No orphaned Front Door WAF Policy found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"SKU\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"SKU\",\"label\":\"Sku\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Front Door WAF Policy\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Front Door WAF Policy(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"fdwafpolicy\"},\"name\":\"group - Networking - Front Door WAF Policy\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Traffic Managers\"},\"name\":\"text - Title - Traffic Manager Profiles\"},{\"type\":1,\"content\":{\"json\":\"[Traffic Manager](https://learn.microsoft.com/en-us/azure/traffic-manager/traffic-manager-overview) without endpoints.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/trafficmanagerprofiles\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.endpoints == \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/trafficmanagerprofiles\\\", 0])\\r\\n| summarize total_count = max(count_) by type\\r\\n\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":true,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Traffic Manager Profiles\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/trafficmanagerprofiles\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.endpoints == \\\"[]\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details\",\"size\":3,\"title\":\"Orphaned Traffic Managers\",\"noDataMessage\":\"No orphaned Traffic Managers found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Traffic Managers\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Traffic Manager(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"tmprofiles\"},\"name\":\"group - Networking - Traffic Managers\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Application Gateway\"},\"name\":\"text - Title - Application Gateway\"},{\"type\":1,\"content\":{\"json\":\"[Application Gateways](https://learn.microsoft.com/en-us/azure/application-gateway/overview) without backend targets. (in backend pools)\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend backendPoolsCount = array_length(properties.backendAddressPools),SKUName= tostring(properties.sku.name), SKUTier= tostring(properties.sku.tier),SKUCapacity=properties.sku.capacity,backendPools=properties.backendAddressPools , AppGwId = tostring(id)\\r\\n| project AppGwId, name, SKUName, SKUTier, SKUCapacity, type\\r\\n| join (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n | mvexpand backendPools = properties.backendAddressPools\\r\\n | extend backendIPCount = array_length(backendPools.properties.backendIPConfigurations)\\r\\n | extend backendAddressesCount = array_length(backendPools.properties.backendAddresses)\\r\\n | extend backendPoolName = backendPools.properties.backendAddressPools.name\\r\\n | extend AppGwId = tostring(id)\\r\\n | summarize backendIPCount = sum(backendIPCount) ,backendAddressesCount=sum(backendAddressesCount) by AppGwId\\r\\n) on AppGwId\\r\\n| project-away AppGwId1\\r\\n| where (backendIPCount == 0 or isempty(backendIPCount)) and (backendAddressesCount==0 or isempty(backendAddressesCount))\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/applicationgateways\\\", 0])\\r\\n| summarize total_count = max(count_) by type\\r\\n\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Application Gateway\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend backendPoolsCount = array_length(properties.backendAddressPools),SKUName= tostring(properties.sku.name), SKUTier= tostring(properties.sku.tier),SKUCapacity=properties.sku.capacity,backendPools=properties.backendAddressPools , AppGwId = tostring(id)\\r\\n| project AppGwId, name, location, SKUName, SKUTier, SKUCapacity\\r\\n| join (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n | mvexpand backendPools = properties.backendAddressPools\\r\\n | extend backendIPCount = array_length(backendPools.properties.backendIPConfigurations)\\r\\n | extend backendAddressesCount = array_length(backendPools.properties.backendAddresses)\\r\\n | extend backendPoolName = backendPools.properties.backendAddressPools.name\\r\\n | extend AppGwId = tostring(id)\\r\\n | summarize backendIPCount = sum(backendIPCount) ,backendAddressesCount=sum(backendAddressesCount) by AppGwId\\r\\n) on AppGwId\\r\\n| project-away AppGwId1\\r\\n| where (backendIPCount == 0 or isempty(backendIPCount)) and (backendAddressesCount==0 or isempty(backendAddressesCount))\\r\\n| summarize count(AppGwId) by tostring(location)\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Application Gateway by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend backendPoolsCount = array_length(properties.backendAddressPools),SKUName= tostring(properties.sku.name), SKUTier= tostring(properties.sku.tier),SKUCapacity=properties.sku.capacity,backendPools=properties.backendAddressPools , AppGwId = tostring(id)\\r\\n| project AppGwId, name, SKUName, SKUTier, SKUCapacity\\r\\n| join (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n | mvexpand backendPools = properties.backendAddressPools\\r\\n | extend backendIPCount = array_length(backendPools.properties.backendIPConfigurations)\\r\\n | extend backendAddressesCount = array_length(backendPools.properties.backendAddresses)\\r\\n | extend backendPoolName = backendPools.properties.backendAddressPools.name\\r\\n | extend AppGwId = tostring(id)\\r\\n | summarize backendIPCount = sum(backendIPCount) ,backendAddressesCount=sum(backendAddressesCount) by AppGwId\\r\\n) on AppGwId\\r\\n| project-away AppGwId1\\r\\n| where (backendIPCount == 0 or isempty(backendIPCount)) and (backendAddressesCount==0 or isempty(backendAddressesCount))\\r\\n| summarize count(AppGwId) by tostring(SKUTier)\",\"size\":4,\"title\":\"Count by SKU\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Application Gateway by SKU\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend backendPoolsCount = array_length(properties.backendAddressPools),SKUName= tostring(properties.sku.name), SKUTier= tostring(properties.sku.tier),SKUCapacity=properties.sku.capacity,backendPools=properties.backendAddressPools , AppGwId = tostring(id)\\r\\n| project subscriptionId, AppGwId, resourceGroup, location, tags, name, SKUName, SKUTier, SKUCapacity\\r\\n| join (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/applicationgateways\\\"\\r\\n | mvexpand backendPools = properties.backendAddressPools\\r\\n | extend backendIPCount = array_length(backendPools.properties.backendIPConfigurations)\\r\\n | extend backendAddressesCount = array_length(backendPools.properties.backendAddresses)\\r\\n | extend backendPoolName = backendPools.properties.backendAddressPools.name\\r\\n | extend AppGwId = tostring(id)\\r\\n | summarize backendIPCount = sum(backendIPCount) ,backendAddressesCount=sum(backendAddressesCount) by AppGwId\\r\\n) on AppGwId\\r\\n| project-away AppGwId1\\r\\n| where (backendIPCount == 0 or isempty(backendIPCount)) and (backendAddressesCount==0 or isempty(backendAddressesCount))\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=AppGwId, resourceGroup, location, SKUTier, SKUCapacity, tags, Details\",\"size\":3,\"title\":\"Orphaned Application Gateway\",\"noDataMessage\":\"No orphaned Application Gateway found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"SKUTier\",\"formatter\":1},{\"columnMatch\":\"SKUCapacity\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"SKUTier\",\"label\":\"SKu\"},{\"columnId\":\"SKUCapacity\",\"label\":\"Capacity\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Application Gateway\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Application Gateway(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"appgw\"},\"name\":\"group - Networking - Application Gateway\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"tabs\",\"links\":[{\"id\":\"8e1c6962-5369-4cc3-9fe9-1ff6ed0d92af\",\"cellValue\":\"VirtualNetworksTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Virtual Networks\",\"subTarget\":\"vnets\",\"style\":\"link\",\"linkIsContextBlade\":true},{\"id\":\"85598350-5dc0-4087-ae66-b50d4aeadba7\",\"cellValue\":\"VirtualNetworksTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Subnets\",\"subTarget\":\"subnets\",\"style\":\"link\"}]},\"name\":\"links - Virtual Networks Tabs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Virtual Networks\"},\"name\":\"text - Title - Virtual Networks\"},{\"type\":1,\"content\":{\"json\":\"[Virtual Networks](https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview) (VNETs) without subnets.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.subnets == \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/virtualnetworks\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Virtual Networks\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.subnets == \\\"[]\\\"\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Virtual Networks by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworks\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.subnets == \\\"[]\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details\",\"size\":3,\"title\":\"Orphaned Virtual Networks\",\"noDataMessage\":\"No orphaned Virtual Networks found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Virtual Networks\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Virtual network(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"VirtualNetworksTab\",\"comparison\":\"isEqualTo\",\"value\":\"vnets\"},\"name\":\"group - Networking - Virtual Networks - VNETs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Subnets\"},\"name\":\"text - Title - Subnets\"},{\"type\":1,\"content\":{\"json\":\"Subnets without Connected Devices or Delegation. (Empty Subnets)\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type == \\\"microsoft.network/virtualnetworks\\\"\\r\\n| extend subnet = properties.subnets\\r\\n| mv-expand subnet\\r\\n| extend ipConfigurations = subnet.properties.ipConfigurations\\r\\n| extend delegations = subnet.properties.delegations\\r\\n| extend applicationGatewayIPConfigurations = subnet.properties.applicationGatewayIPConfigurations\\r\\n| where isnull(ipConfigurations) and delegations == \\\"[]\\\" and isnull(applicationGatewayIPConfigurations) \\r\\n| extend subnets_str = \\\"Subnets\\\"\\r\\n| summarize count_ = count() by type, subnets_str\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(subnets_str:string, count_:long) [\\\"Subnets\\\", 0]) // Add a row with 0 if no results\\r\\n| summarize total_count = max(count_) by subnets_str\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"subnets_str\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Subnets Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworks\\\"\\r\\n| extend subnet = properties.subnets\\r\\n| mv-expand subnet\\r\\n| extend ipConfigurations = subnet.properties.ipConfigurations\\r\\n| extend delegations = subnet.properties.delegations\\r\\n| extend applicationGatewayIPConfigurations = subnet.properties.applicationGatewayIPConfigurations\\r\\n| where isnull(ipConfigurations) and delegations == \\\"[]\\\" and isnull(applicationGatewayIPConfigurations) \\r\\n| summarize count(subnet) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Subnets by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworks\\\"\\r\\n| extend subnet = properties.subnets\\r\\n| mv-expand subnet\\r\\n| extend ipConfigurations = subnet.properties.ipConfigurations\\r\\n| extend delegations = subnet.properties.delegations\\r\\n| extend applicationGatewayIPConfigurations = subnet.properties.applicationGatewayIPConfigurations\\r\\n| where isnull(ipConfigurations) and delegations == \\\"[]\\\" and isnull(applicationGatewayIPConfigurations) \\r\\n| summarize count(subnet) by resourceGroup\",\"size\":4,\"title\":\"Count by Resource Group\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Subnets by Resource Group\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworks\\\"\\r\\n| extend subnet = properties.subnets\\r\\n| mv-expand subnet\\r\\n| extend ipConfigurations = subnet.properties.ipConfigurations\\r\\n| extend delegations = subnet.properties.delegations\\r\\n| extend applicationGatewayIPConfigurations = subnet.properties.applicationGatewayIPConfigurations\\r\\n| where isnull(ipConfigurations) and delegations == \\\"[]\\\" and isnull(applicationGatewayIPConfigurations) \\r\\n| extend SubnetName = subnet.name, SubnetId = subnet.id\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, SubnetName, vNetId=id, SubnetId ,resourceGroup, location, vNetName=name, Details\",\"size\":3,\"title\":\"Orphaned Subnets\",\"noDataMessage\":\"No orphaned Subnets found\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"SubnetId\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"SubnetName\",\"formatter\":5},{\"columnMatch\":\"vNetId\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"SubnetId\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"linkIsContextBlade\":true,\"showIcon\":true}},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"DeleteResource\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Resource\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"[\\\"SubnetId\\\"]\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"[\\\"apiVersion\\\"]\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"title\":\"Delete Subnet\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## **This action will permanently delete this subnet!**\\n\\n## **[\\\"SubnetName\\\"]**\\n\\n## Resource Details:\\n\\n| | |\\n| ---------------------- | --------------------- |\\n| Subnet Name | **[\\\"SubnetName\\\"]** |\\n| vNet Name | **[\\\"vNetName\\\"]** |\\n| Resource Group | **[\\\"resourceGroup\\\"]** |\\n| Location | **[\\\"location\\\"]** |\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource information thoroughly before continuing with the deletion.\\n- Ensure that this subnet is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group where the subnet located.\",\"actionName\":\"Delete Subnet\",\"runLabel\":\"Delete Resource\"}}},{\"columnMatch\":\"vNetName\",\"formatter\":5},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"SubnetName\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"SubnetName\",\"label\":\"Subnet Name\"},{\"columnId\":\"vNetId\",\"label\":\"vNet Name\"},{\"columnId\":\"SubnetId\",\"label\":\"vNet/Subnet\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource GRoup\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"vNetName\",\"label\":\"vNet Name\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Subnets\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Subnet(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"VirtualNetworksTab\",\"comparison\":\"isEqualTo\",\"value\":\"subnets\"},\"name\":\"group - Networking - Virtual Networks - Subnets\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"vnets\"},\"name\":\"group - Networking - Virtual Networks\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned NAT Gateways\"},\"name\":\"text - Title - NAT Gateway\"},{\"type\":1,\"content\":{\"json\":\"[NAT Gateways](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview) that not attached to any subnet.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/natgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/natgateways\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - NAT Gateways\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/natgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - NAT Gateways by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/natgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| summarize count(type) by tostring(sku.name)\",\"size\":4,\"title\":\"Count by SKU\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - NAT Gateways by SKU\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/natgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| summarize count(type) by tostring(sku.tier)\",\"size\":4,\"title\":\"Count by Tier\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - NAT Gateways by Tier\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/natgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.subnets)\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, Sku=tostring(sku.name), Tier=tostring(sku.tier), tags, Details\",\"size\":3,\"title\":\"Orphaned NAT Gateways\",\"noDataMessage\":\"No orphaned NAT Gateways found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Sku\",\"formatter\":1},{\"columnMatch\":\"Tier\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"Sku\",\"label\":\"Sku\"},{\"columnId\":\"Tier\",\"label\":\"Tier\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - NAT Gateways\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following NAT Gateway(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"natgw\"},\"name\":\"group - Networking - NAT Gateway\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# IP Groups\"},\"name\":\"text - Title - IP Group\"},{\"type\":1,\"content\":{\"json\":\"[IP Groups](https://learn.microsoft.com/en-us/azure/firewall/ip-groups) that not attached to any Azure Firewall.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/ipgroups\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.firewalls == \\\"[]\\\" and properties.firewallPolicies == \\\"[]\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/ipgroups\\\", 0])\\r\\n| summarize total_count = max(count_) by type\\r\\n\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - IP Group\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/ipgroups\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.firewalls == \\\"[]\\\" and properties.firewallPolicies == \\\"[]\\\"\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - IP Group by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/ipgroups\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.firewalls == \\\"[]\\\" and properties.firewallPolicies == \\\"[]\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details\",\"size\":3,\"title\":\"Orphaned IP Groups\",\"noDataMessage\":\"No orphaned IP Groups found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - IP Group\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following IP Group(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"ipgroup\"},\"name\":\"group - Networking - IP Group\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Private DNS zones\"},\"name\":\"text - Title - Private DNS zones\"},{\"type\":1,\"content\":{\"json\":\"[Private DNS zones](https://learn.microsoft.com/en-us/azure/dns/private-dns-privatednszone) without [Virtual Network Links](https://learn.microsoft.com/en-us/azure/dns/private-dns-virtual-network-links).\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privatednszones\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfVirtualNetworkLinks == 0\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/privatednszones\\\", 0])\\r\\n| summarize total_count = max(count_) by type\\r\\n\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Private DNS zones\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privatednszones\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfVirtualNetworkLinks == 0\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Private DNS zones by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privatednszones\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where properties.numberOfVirtualNetworkLinks == 0\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, NumberOfRecordSets=properties.numberOfRecordSets, tags, Details\",\"size\":3,\"title\":\"Orphaned Private DNS zones\",\"noDataMessage\":\"No orphaned Private DNS zones found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"NumberOfRecordSets\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"NumberOfRecordSets\",\"label\":\"Number Of Record Sets\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Private DNS zones\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Private DNS(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"privatednszones\"},\"name\":\"group - Networking - Private DNS Zone Group\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Private Endpoints\"},\"name\":\"text - Title - Private Endpoints\"},{\"type\":1,\"content\":{\"json\":\"[Private Endpoints](https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview) that are not connected to any resource.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privateendpoints\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend connection = iff(array_length(properties.manualPrivateLinkServiceConnections) > 0, properties.manualPrivateLinkServiceConnections[0], properties.privateLinkServiceConnections[0])\\r\\n| extend stateEnum = tostring(connection.properties.privateLinkServiceConnectionState.status)\\r\\n| where stateEnum == \\\"Disconnected\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/privateendpoints\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Private Endpoints\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privateendpoints\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend connection = iff(array_length(properties.manualPrivateLinkServiceConnections) > 0, properties.manualPrivateLinkServiceConnections[0], properties.privateLinkServiceConnections[0])\\r\\n| extend stateEnum = tostring(connection.properties.privateLinkServiceConnectionState.status)\\r\\n| where stateEnum == \\\"Disconnected\\\"\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Private Endpoints by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privateendpoints\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend connection = iff(array_length(properties.manualPrivateLinkServiceConnections) > 0, properties.manualPrivateLinkServiceConnections[0], properties.privateLinkServiceConnections[0])\\r\\n| extend serviceId = tostring(connection.properties.privateLinkServiceId)\\r\\n| extend serviceIdSplit = split(serviceId, \\\"/\\\")\\r\\n| extend serviceName = tostring(serviceIdSplit[8])\\r\\n| extend serviceTypeEnum = iff(isnotnull(serviceIdSplit[6]), tolower(strcat(serviceIdSplit[6], \\\"/\\\", serviceIdSplit[7])), \\\"microsoft.network/privatelinkservices\\\")\\r\\n| extend stateEnum = tostring(connection.properties.privateLinkServiceConnectionState.status)\\r\\n| where stateEnum == \\\"Disconnected\\\"\\r\\n| summarize count(type) by serviceTypeEnum\",\"size\":4,\"title\":\"Count by Resource type\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Private Endpoints by Resource type\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privateendpoints\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend connection = iff(array_length(properties.manualPrivateLinkServiceConnections) > 0, properties.manualPrivateLinkServiceConnections[0], properties.privateLinkServiceConnections[0])\\r\\n| extend stateEnum = tostring(connection.properties.privateLinkServiceConnectionState.status)\\r\\n| extend groupIds = tostring(connection.properties.groupIds[0])\\r\\n| where stateEnum == \\\"Disconnected\\\"\\r\\n| summarize count(type) by groupIds\",\"size\":4,\"title\":\"Count by Target sub-resource\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Private Endpoints by Target sub-resource\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/privateendpoints\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend connection = iff(array_length(properties.manualPrivateLinkServiceConnections) > 0, properties.manualPrivateLinkServiceConnections[0], properties.privateLinkServiceConnections[0])\\r\\n| extend subnetId = properties.subnet.id\\r\\n| extend subnetName = tostring(split(subnetId, \\\"/\\\")[-1])\\r\\n| extend subnetIdSplit = split(subnetId, \\\"/\\\")\\r\\n| extend vnetId = strcat_array(array_slice(subnetIdSplit,0,8), \\\"/\\\")\\r\\n| extend vnetName = tostring(split(vnetId, \\\"/\\\")[-1])\\r\\n| extend serviceId = tostring(connection.properties.privateLinkServiceId)\\r\\n| extend serviceIdSplit = split(serviceId, \\\"/\\\")\\r\\n| extend serviceName = tostring(serviceIdSplit[8])\\r\\n| extend serviceTypeEnum = iff(isnotnull(serviceIdSplit[6]), tolower(strcat(serviceIdSplit[6], \\\"/\\\", serviceIdSplit[7])), \\\"microsoft.network/privatelinkservices\\\")\\r\\n| extend stateEnum = tostring(connection.properties.privateLinkServiceConnectionState.status)\\r\\n| extend groupIds = tostring(connection.properties.groupIds[0])\\r\\n| where stateEnum == \\\"Disconnected\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, serviceName, serviceTypeEnum, groupIds, vnetId, vnetName, subnetId, subnetName, tags, Details\",\"size\":3,\"title\":\"Orphaned Private Endpoints\",\"noDataMessage\":\"No orphaned Private Endpoints found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"linkLabel\":\"\",\"linkIsContextBlade\":false,\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"vnetName\",\"formatter\":5},{\"columnMatch\":\"subnetId\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"linkIsContextBlade\":true,\"showIcon\":true}},{\"columnMatch\":\"subnetName\",\"formatter\":5},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}},{\"columnMatch\":\"PrivateEndpointNameId\",\"formatter\":5}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"serviceName\",\"label\":\"Private link resource\"},{\"columnId\":\"serviceTypeEnum\",\"label\":\"Resource type\"},{\"columnId\":\"groupIds\",\"label\":\"Target sub-resource\"},{\"columnId\":\"vnetId\",\"label\":\"Virtual Network\"},{\"columnId\":\"vnetName\",\"label\":\"Virtual Network Name\"},{\"columnId\":\"subnetId\",\"label\":\"Subnet\"},{\"columnId\":\"subnetName\",\"label\":\"Subnet Name\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Private Endpoints\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Private Endpoint(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"privateendpoints\"},\"name\":\"group - Networking - Private Endpoint\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Virtual Network Gateways\"},\"name\":\"text - Title - Virtual Network Gateways\"},{\"type\":1,\"content\":{\"json\":\"[Virtual Network Gateways](https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways) without Point-to-site configuration or Connections.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info - Virtual Network Gateways\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworkgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend vpnClientConfiguration = properties.vpnClientConfiguration\\r\\n| extend Resource = id\\r\\n| join kind=leftouter (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/connections\\\"\\r\\n | mv-expand Resource = pack_array(properties.virtualNetworkGateway1.id, properties.virtualNetworkGateway2.id) to typeof(string)\\r\\n | project Resource, connectionId = id, ConnectionProperties=properties\\r\\n ) on Resource \\r\\n| where isempty(vpnClientConfiguration) and isempty(connectionId)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/virtualnetworkgateways\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Virtual Network Gateways\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworkgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend vpnClientConfiguration = properties.vpnClientConfiguration\\r\\n| extend Resource = id\\r\\n| join kind=leftouter (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/connections\\\"\\r\\n | mv-expand Resource = pack_array(properties.virtualNetworkGateway1.id, properties.virtualNetworkGateway2.id) to typeof(string)\\r\\n | project Resource, connectionId = id, ConnectionProperties=properties\\r\\n ) on Resource \\r\\n| where isempty(vpnClientConfiguration) and isempty(connectionId)\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"20\",\"name\":\"query - Virtual Network Gateways by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworkgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend GatewayType = tostring(properties.gatewayType)\\r\\n| extend vpnClientConfiguration = properties.vpnClientConfiguration\\r\\n| extend Resource = id\\r\\n| join kind=leftouter (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/connections\\\"\\r\\n | mv-expand Resource = pack_array(properties.virtualNetworkGateway1.id, properties.virtualNetworkGateway2.id) to typeof(string)\\r\\n | project Resource, connectionId = id, ConnectionProperties=properties\\r\\n ) on Resource \\r\\n| where isempty(vpnClientConfiguration) and isempty(connectionId)\\r\\n| summarize count(type) by GatewayType\",\"size\":4,\"title\":\"Count by Gateway Type\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"20\",\"name\":\"query - Virtual Network Gateways by Gateway Type\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworkgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend SKU = tostring(properties.sku.name)\\r\\n| extend vpnClientConfiguration = properties.vpnClientConfiguration\\r\\n| extend Resource = id\\r\\n| join kind=leftouter (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/connections\\\"\\r\\n | mv-expand Resource = pack_array(properties.virtualNetworkGateway1.id, properties.virtualNetworkGateway2.id) to typeof(string)\\r\\n | project Resource, connectionId = id, ConnectionProperties=properties\\r\\n ) on Resource \\r\\n| where isempty(vpnClientConfiguration) and isempty(connectionId)\\r\\n| summarize count(type) by SKU\",\"size\":4,\"title\":\"Count by Sku\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"20\",\"name\":\"query - Virtual Network Gateways by Sku\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworkgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend Tier = tostring(properties.sku.tier)\\r\\n| extend vpnClientConfiguration = properties.vpnClientConfiguration\\r\\n| extend Resource = id\\r\\n| join kind=leftouter (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/connections\\\"\\r\\n | mv-expand Resource = pack_array(properties.virtualNetworkGateway1.id, properties.virtualNetworkGateway2.id) to typeof(string)\\r\\n | project Resource, connectionId = id, ConnectionProperties=properties\\r\\n ) on Resource \\r\\n| where isempty(vpnClientConfiguration) and isempty(connectionId)\\r\\n| summarize count(type) by Tier\",\"size\":4,\"title\":\"Count by Tier\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"20\",\"name\":\"query - Virtual Network Gateways by Tier\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/virtualnetworkgateways\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend Details = pack_all()\\r\\n| extend SKU = tostring(properties.sku.name)\\r\\n| extend Tier = tostring(properties.sku.tier)\\r\\n| extend GatewayType = tostring(properties.gatewayType)\\r\\n| extend vpnClientConfiguration = properties.vpnClientConfiguration\\r\\n| extend Resource = id\\r\\n| join kind=leftouter (\\r\\n resources\\r\\n | where type =~ \\\"microsoft.network/connections\\\"\\r\\n | mv-expand Resource = pack_array(properties.virtualNetworkGateway1.id, properties.virtualNetworkGateway2.id) to typeof(string)\\r\\n | project Resource, connectionId = id, ConnectionProperties=properties\\r\\n ) on Resource \\r\\n| where isempty(vpnClientConfiguration) and isempty(connectionId)\\r\\n| project subscriptionId, Resource, resourceGroup, location, GatewayType, SKU, Tier, tags, Details\",\"size\":3,\"title\":\"Orphaned Virtual Network Gateways\",\"noDataMessage\":\"No orphaned Virtual Network Gateways found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"GatewayType\",\"formatter\":1},{\"columnMatch\":\"SKU\",\"formatter\":1},{\"columnMatch\":\"Tier\",\"formatter\":1},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"GatewayType\",\"label\":\"Gateway Type\"},{\"columnId\":\"SKU\",\"label\":\"Sku\"},{\"columnId\":\"Tier\",\"label\":\"Tier\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Virtual Network Gateways\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Virtual Network Gateway(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"vngs\"},\"name\":\"group - Networking - Virtual Network Gateways\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# DDoS Protections\"},\"name\":\"text - Title - DDoS protection plans\"},{\"type\":1,\"content\":{\"json\":\"[DDoS protection](https://learn.microsoft.com/en-us/azure/ddos-protection/ddos-protection-overview) without protected resources. (=without Virtual Networks accosiated)\",\"style\":\"upsell\"},\"name\":\"text - Title - Info - DDoS protection plans\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/ddosprotectionplans\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.virtualNetworks)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.network/ddosprotectionplans\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"id\",\"formatter\":5},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"id\"}},\"sortBy\":[],\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true,\"compositeBarSettings\":{\"labelText\":\"\",\"columnSettings\":[]}}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"sortOrderField\":1,\"size\":\"auto\"},\"graphSettings\":{\"type\":0,\"topContent\":{\"columnMatch\":\"vmSize\",\"formatter\":1},\"centerContent\":{\"columnMatch\":\"Count\",\"formatter\":1,\"numberFormat\":{\"unit\":17,\"options\":{\"maximumSignificantDigits\":3,\"maximumFractionDigits\":2}}}},\"textSettings\":{\"style\":\"bignumber\"}},\"customWidth\":\"15\",\"name\":\"query - DDoS protection plans\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/ddosprotectionplans\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.virtualNetworks)\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"noDataMessage\":\"No results.\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"id\",\"formatter\":5},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"id\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource Name\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"}]},\"sortBy\":[],\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"DiskType\",\"formatter\":1},\"leftContent\":{\"columnMatch\":\"Count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"},\"numberFormat\":{\"unit\":17,\"options\":{\"maximumSignificantDigits\":3,\"maximumFractionDigits\":2}}},\"showBorder\":true},\"graphSettings\":{\"type\":0,\"topContent\":{\"columnMatch\":\"vmSize\",\"formatter\":1},\"centerContent\":{\"columnMatch\":\"Count\",\"formatter\":1,\"numberFormat\":{\"unit\":17,\"options\":{\"maximumSignificantDigits\":3,\"maximumFractionDigits\":2}}}},\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true},\"mapSettings\":{\"locInfo\":\"LatLong\",\"sizeSettings\":\"Count\",\"sizeAggregation\":\"Sum\",\"legendMetric\":\"Count\",\"legendAggregation\":\"Sum\",\"itemColorSettings\":{\"type\":\"heatmap\",\"colorAggregation\":\"Sum\",\"nodeColorField\":\"Count\",\"heatmapPalette\":\"greenRed\"}}},\"customWidth\":\"20\",\"name\":\"query - DDoS protection plans by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.network/ddosprotectionplans\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| where isnull(properties.virtualNetworks)\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details\",\"size\":3,\"title\":\"Orphaned DDoS protection plans\",\"noDataMessage\":\"No orphaned DDoS protection plans found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - DDoS protection plans\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following DDoS Protection(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"networkingTab\",\"comparison\":\"isEqualTo\",\"value\":\"DDoSplans\"},\"name\":\"group - Networking - DDoS protection plans\"}]},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"networking\"},\"name\":\"group - Networking\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"tabs\",\"links\":[{\"id\":\"75dbecf0-d939-484a-a9b6-7ac357384d56\",\"cellValue\":\"othersTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Resource Groups\",\"subTarget\":\"rgs\",\"style\":\"link\"},{\"id\":\"f1783382-6614-4f1a-9be3-ea8be37e9bb8\",\"cellValue\":\"othersTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"API Connections\",\"subTarget\":\"apiconnections\",\"style\":\"link\"},{\"id\":\"4397efb4-240b-4f96-b734-c946c59e941d\",\"cellValue\":\"othersTab\",\"linkTarget\":\"parameter\",\"linkLabel\":\"Certificates\",\"subTarget\":\"certificates\",\"style\":\"link\"}]},\"name\":\"links - Other Tabs\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Resource Groups\"},\"name\":\"text - Title - Resource Groups\"},{\"type\":1,\"content\":{\"json\":\"[Resource Groups](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/overview) without resources (including hidden types resources).\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"ResourceContainers\\r\\n| where type == \\\"microsoft.resources/subscriptions/resourcegroups\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend rgAndSub = strcat(resourceGroup, \\\"--\\\", subscriptionId)\\r\\n| join kind=leftouter (\\r\\n Resources\\r\\n | extend rgAndSub = strcat(resourceGroup, \\\"--\\\", subscriptionId)\\r\\n | summarize count() by rgAndSub\\r\\n) on rgAndSub\\r\\n| where isnull(count_)\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.resources/subscriptions/resourcegroups\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - Resource Groups Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"ResourceContainers\\r\\n| where type == \\\"microsoft.resources/subscriptions/resourcegroups\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend rgAndSub = strcat(resourceGroup, \\\"--\\\", subscriptionId)\\r\\n| join kind=leftouter (\\r\\n Resources\\r\\n | extend rgAndSub = strcat(resourceGroup, \\\"--\\\", subscriptionId)\\r\\n | summarize count() by rgAndSub\\r\\n ) on rgAndSub\\r\\n| where isnull(count_)\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - Resource Groups by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"ResourceContainers\\r\\n| where type =~ \\\"microsoft.resources/subscriptions/resourcegroups\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend rgAndSub = strcat(resourceGroup, \\\"--\\\", subscriptionId)\\r\\n| join kind=leftouter (\\r\\n Resources\\r\\n | extend rgAndSub = strcat(resourceGroup, \\\"--\\\", subscriptionId)\\r\\n | summarize count() by rgAndSub\\r\\n ) on rgAndSub\\r\\n| where isnull(count_)\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, tags ,Details\",\"size\":3,\"title\":\"Orphaned Resource Groups\",\"noDataMessage\":\"No orphaned Resource Groups found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5},{\"fieldName\":\"resourceGroup\",\"parameterName\":\"resourcegroups\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"resourceGroup\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"}]}},\"name\":\"query - Resource Groups\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Resource Group(s):\\n\\n{resourcegroups:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"othersTab\",\"comparison\":\"isEqualTo\",\"value\":\"rgs\"},\"name\":\"group - Others - Resource Groups\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned API Connections\"},\"name\":\"text - Title - API Connections\"},{\"type\":1,\"content\":{\"json\":\"[API Connections](https://learn.microsoft.com/en-us/azure/active-directory/external-identities/api-connectors-overview/) that not related to any Logic App.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/connections\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project resourceId = id , apiName = name, subscriptionId, resourceGroup, tags, location, type\\r\\n| join kind = leftouter (\\r\\n resources\\r\\n | where type == 'microsoft.logic/workflows'\\r\\n | extend resourceGroup, location, subscriptionId, properties\\r\\n | extend var_json = properties[\\\"parameters\\\"][\\\"$connections\\\"][\\\"value\\\"]\\r\\n\\t| mvexpand var_connection = var_json\\r\\n | where notnull(var_connection)\\r\\n | extend connectionId = extract(\\\"connectionId\\\\\\\":\\\\\\\"(.*?)\\\\\\\"\\\", 1, tostring(var_connection))\\r\\n | project connectionId, name\\r\\n )\\r\\n on $left.resourceId == $right.connectionId\\r\\n| where connectionId == \\\"\\\"\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"microsoft.web/connections\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"size\":\"auto\"}},\"customWidth\":\"15\",\"name\":\"query - API Connections Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/connections\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project resourceId = id , apiName = name, subscriptionId, resourceGroup, tags, location\\r\\n| join kind = leftouter (\\r\\n resources\\r\\n | where type =~ 'microsoft.logic/workflows'\\r\\n | extend resourceGroup, location, subscriptionId, properties\\r\\n | extend var_json = properties[\\\"parameters\\\"][\\\"$connections\\\"][\\\"value\\\"]\\r\\n\\t| mvexpand var_connection = var_json\\r\\n | where notnull(var_connection)\\r\\n | extend connectionId = extract(\\\"connectionId\\\\\\\":\\\\\\\"(.*?)\\\\\\\"\\\", 1, tostring(var_connection))\\r\\n | project connectionId, name\\r\\n )\\r\\n on $left.resourceId == $right.connectionId\\r\\n| where connectionId == \\\"\\\"\\r\\n| summarize count() by location\",\"size\":4,\"title\":\"Count by Location\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true}},\"customWidth\":\"25\",\"name\":\"query - API Connections by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/connections\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| project subscriptionId, Resource = id , apiName = name, resourceGroup, tags, location\\r\\n| join kind = leftouter (\\r\\n resources\\r\\n | where type =~ 'microsoft.logic/workflows'\\r\\n | extend resourceGroup, location, subscriptionId, properties\\r\\n | extend var_json = properties[\\\"parameters\\\"][\\\"$connections\\\"][\\\"value\\\"]\\r\\n\\t| mvexpand var_connection = var_json\\r\\n | where notnull(var_connection)\\r\\n | extend connectionId = extract(\\\"connectionId\\\\\\\":\\\\\\\"(.*?)\\\\\\\"\\\", 1, tostring(var_connection))\\r\\n | project connectionId, name\\r\\n )\\r\\n on $left.Resource == $right.connectionId\\r\\n| where connectionId == \\\"\\\"\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource, resourceGroup, location, tags, Details\",\"size\":3,\"title\":\"Orphaned API Connections\",\"noDataMessage\":\"No orphaned API Connections found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}},{\"columnMatch\":\"resourceId\",\"formatter\":5}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"tags\",\"label\":\"Tags\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - API Connections\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following API Connection(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"othersTab\",\"comparison\":\"isEqualTo\",\"value\":\"apiconnections\"},\"name\":\"group - Others - API Connections\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"# Orphaned Certificates\"},\"name\":\"text - Title - Certificates\"},{\"type\":1,\"content\":{\"json\":\"Expired certificates.\",\"style\":\"upsell\"},\"name\":\"text - Title - Info\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/certificates\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend expiresOn = todatetime(properties.expirationDate)\\r\\n| where expiresOn <= now()\\r\\n| summarize count_ = count() by type\\r\\n| extend count_ = iff(count_ == 0, 0, count_)\\r\\n| union (datatable(type:string, count_:long) [\\\"certificates\\\", 0])\\r\\n| summarize total_count = max(count_) by type\",\"size\":4,\"title\":\"Total\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"tiles\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"id\",\"formatter\":5},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"id\"}},\"sortBy\":[],\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"type\",\"formatter\":16,\"formatOptions\":{\"showIcon\":true}},\"leftContent\":{\"columnMatch\":\"total_count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"}},\"showBorder\":false,\"sortCriteriaField\":\"count_type\",\"sortOrderField\":2,\"size\":\"auto\"},\"graphSettings\":{\"type\":0,\"topContent\":{\"columnMatch\":\"vmSize\",\"formatter\":1},\"centerContent\":{\"columnMatch\":\"Count\",\"formatter\":1,\"numberFormat\":{\"unit\":17,\"options\":{\"maximumSignificantDigits\":3,\"maximumFractionDigits\":2}}}},\"textSettings\":{\"style\":\"bignumber\"}},\"customWidth\":\"15\",\"name\":\"query - Certificates Count\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/certificates\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend expiresOn = todatetime(properties.expirationDate)\\r\\n| where expiresOn <= now()\\r\\n| summarize count(type) by location\",\"size\":4,\"title\":\"Count by Location\",\"noDataMessage\":\"No results.\",\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"piechart\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"id\",\"formatter\":5},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"id\"}},\"sortBy\":[],\"tileSettings\":{\"titleContent\":{\"columnMatch\":\"DiskType\",\"formatter\":1},\"leftContent\":{\"columnMatch\":\"Count\",\"formatter\":12,\"formatOptions\":{\"palette\":\"auto\"},\"numberFormat\":{\"unit\":17,\"options\":{\"maximumSignificantDigits\":3,\"maximumFractionDigits\":2}}},\"showBorder\":true},\"graphSettings\":{\"type\":0,\"topContent\":{\"columnMatch\":\"vmSize\",\"formatter\":1},\"centerContent\":{\"columnMatch\":\"Count\",\"formatter\":1,\"numberFormat\":{\"unit\":17,\"options\":{\"maximumSignificantDigits\":3,\"maximumFractionDigits\":2}}}},\"chartSettings\":{\"showMetrics\":false,\"showLegend\":true},\"mapSettings\":{\"locInfo\":\"LatLong\",\"sizeSettings\":\"Count\",\"sizeAggregation\":\"Sum\",\"legendMetric\":\"Count\",\"legendAggregation\":\"Sum\",\"itemColorSettings\":{\"type\":\"heatmap\",\"colorAggregation\":\"Sum\",\"nodeColorField\":\"Count\",\"heatmapPalette\":\"greenRed\"}}},\"customWidth\":\"30\",\"name\":\"query - Certificates by Location\"},{\"type\":3,\"content\":{\"version\":\"KqlItem/1.0\",\"query\":\"resources\\r\\n| where type =~ \\\"microsoft.web/certificates\\\"\\r\\n| where resourceGroup in~ ({ResourceGroup:value})\\r\\n| extend expiresOn = todatetime(properties.expirationDate)\\r\\n| where expiresOn <= now()\\r\\n| extend Details = pack_all()\\r\\n| project subscriptionId, Resource=id, resourceGroup, location, Details\",\"size\":3,\"title\":\"Orphaned Certificates\",\"noDataMessage\":\"No orphaned Certificates found.\",\"exportMultipleValues\":true,\"exportedParameters\":[{\"fieldName\":\"Resource\",\"parameterName\":\"resources\",\"parameterType\":5}],\"showExportToExcel\":true,\"queryType\":1,\"resourceType\":\"microsoft.resourcegraph/resources\",\"crossComponentResources\":[\"{Subscription}\"],\"visualization\":\"table\",\"gridSettings\":{\"formatters\":[{\"columnMatch\":\"$gen_group\",\"formatter\":13,\"formatOptions\":{\"linkTarget\":\"Resource\",\"showIcon\":true}},{\"columnMatch\":\"subscriptionId\",\"formatter\":5},{\"columnMatch\":\"Resource\",\"formatter\":5},{\"columnMatch\":\"location\",\"formatter\":17},{\"columnMatch\":\"Details\",\"formatter\":7,\"formatOptions\":{\"linkTarget\":\"CellDetails\",\"linkLabel\":\"🔍 View Details\",\"linkIsContextBlade\":true}}],\"rowLimit\":1000,\"filter\":true,\"hierarchySettings\":{\"treeType\":1,\"groupBy\":[\"subscriptionId\"],\"expandTopLevel\":true,\"finalBy\":\"Resource\"},\"labelSettings\":[{\"columnId\":\"subscriptionId\",\"label\":\"Subscription\"},{\"columnId\":\"Resource\",\"label\":\"Resource\"},{\"columnId\":\"resourceGroup\",\"label\":\"Resource Group\"},{\"columnId\":\"location\",\"label\":\"Location\"},{\"columnId\":\"Details\",\"label\":\"Details\"}]}},\"name\":\"query - Certificates\"},{\"type\":12,\"content\":{\"version\":\"NotebookGroup/1.0\",\"groupType\":\"editable\",\"items\":[{\"type\":1,\"content\":{\"json\":\"### Delete Resource(s)\\r\\n\\r\\nTo delete resource(s), select the resource(s) from the table above and click the `⛔ Delete Selected Resource(s)` button below.\",\"style\":\"info\"},\"name\":\"text - Delete Resource(s)\"},{\"type\":11,\"content\":{\"version\":\"LinkItem/1.0\",\"style\":\"list\",\"links\":[{\"id\":\"d5b3b979-66d5-48e8-9008-1c39ffc04e1a\",\"cellValue\":\"{resources}\",\"linkTarget\":\"ArmAction\",\"linkLabel\":\"⛔ Delete Selected Resource(s)\",\"preText\":\"\",\"postText\":\"\",\"style\":\"primary\",\"linkIsContextBlade\":true,\"armActionContext\":{\"path\":\"/{resources}\",\"headers\":[],\"params\":[{\"key\":\"api-version\",\"value\":\"2021-04-01\"}],\"isLongOperation\":true,\"httpMethod\":\"DELETE\",\"applyToMultipleResourcesParameter\":\"resources\",\"title\":\"Delete Resource(s)\",\"description\":\"# ⛔ **Attention!** ⛔\\n\\n## This action will permanently delete the following Certificate(s):\\n\\n{resources:grid}\\n\\n\\n### Recommended steps before deletion\\n\\n- Review the resource(s) information thoroughly before continuing with the deletion.\\n- Ensure that the resource(s) is not currently in use.\\n\\n\\n### Required Permissions\\n\\n- To complete this action, you must have _Contributor_ permissions for the Resource Group(s) where the resource(s) are located.\",\"actionName\":\"Delete Resource(s)\",\"runLabel\":\"Delete Resource(s)\"}}]},\"name\":\"links - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"EnableDeletion\",\"comparison\":\"isEqualTo\",\"value\":\"true\"},\"name\":\"group - Delete Resource(s)\"}]},\"conditionalVisibility\":{\"parameterName\":\"othersTab\",\"comparison\":\"isEqualTo\",\"value\":\"certificates\"},\"name\":\"group - Others - Certificates\"}]},\"conditionalVisibility\":{\"parameterName\":\"mainTab\",\"comparison\":\"isEqualTo\",\"value\":\"others\"},\"name\":\"group - Others\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"Azure Monitor\"]}",
44 | "version": "1.0",
45 | "sourceId": "[parameters('workbookSourceId')]",
46 | "category": "[parameters('workbookType')]"
47 | }
48 | }
49 | ],
50 | "outputs": {
51 | "workbookId": {
52 | "type": "string",
53 | "value": "[resourceId( 'microsoft.insights/workbooks', parameters('workbookId'))]"
54 | }
55 | },
56 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
57 | }
58 |
--------------------------------------------------------------------------------