Skip to content

Commit e6139ae

Browse files
authored
Merge pull request #90633 from chicago-dev-ui/patch-1
Update azure-virtual-machines/md - Unattached Disk
2 parents 7b8ac3b + fb81168 commit e6139ae

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

includes/resource-graph/samples/bycat/azure-virtual-machines.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,26 @@ Search-AzGraph -Query "PatchAssessmentResources | where type has 'softwarepatche
355355

356356
---
357357

358+
### List of unattached disks with details
359+
360+
Returns the list of disks that have a status of unattached with details. The query also includes the disk name, resource group, and location to enable triaging and mitigation as part of auditing or cost optimization efforts.
361+
362+
```kusto
363+
Resources
364+
| where type == "microsoft.compute/disks"
365+
| where properties['diskState'] == "Unattached"
366+
| project name,resourceGroup,id,type,kind,location,subscriptionId,tags,properties['diskState']
367+
```
368+
369+
# [Portal](#tab/azure-portal)
370+
371+
:::image type="icon" source="../../../../articles/governance/resource-graph/media/resource-graph-small.png"::: Try this query in Azure Resource Graph Explorer:
372+
373+
- Azure portal: <a href="https://portal.azure.com/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/HealthResources%0a%7c%20where%20type%20%3d%7e%20%27microsoft.resourcehealth%2favailabilitystatuses%27%0a%7c%20summarize%20by%20ResourceId%20%3d%20tolower(tostring(properties.targetResourceId))%2c%20AvailabilityState%20%3d%20tostring(properties.availabilityState)" target="_blank">portal.azure.com</a>
374+
- Azure Government portal: <a href="https://portal.azure.us/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/HealthResources%0a%7c%20where%20type%20%3d%7e%20%27microsoft.resourcehealth%2favailabilitystatuses%27%0a%7c%20summarize%20by%20ResourceId%20%3d%20tolower(tostring(properties.targetResourceId))%2c%20AvailabilityState%20%3d%20tostring(properties.availabilityState)" target="_blank">portal.azure.us</a>
375+
- Azure China 21Vianet portal: <a href="https://portal.azure.cn/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/HealthResources%0a%7c%20where%20type%20%3d%7e%20%27microsoft.resourcehealth%2favailabilitystatuses%27%0a%7c%20summarize%20by%20ResourceId%20%3d%20tolower(tostring(properties.targetResourceId))%2c%20AvailabilityState%20%3d%20tostring(properties.availabilityState)" target="_blank">portal.azure.cn</a>
376+
```
377+
358378
### List of virtual machines and associated availability states by Resource Ids
359379
360380
Returns the latest list of virtual machines (type `Microsoft.Compute/virtualMachines`) aggregated by availability state. The query also provides the associated Resource Id based on `properties.targetResourceId`, for easy debugging and mitigation. Availability states can be one of four values: Available, Unavailable, Degraded and Unknown. For more details on what each of the availability states mean, please see [Azure Resource Health overview](../../../../articles/service-health/resource-health-overview.md#health-status).

0 commit comments

Comments
 (0)