question

matthewblessing avatar image
0 Votes"
matthewblessing asked deherman-MSFT commented

Trying to automate reporting on managed disk properties using PS module Az.ResourceGraph and cannot get the tier, like "P10" to show up, but AZ Resource Graph Explorer shows that property in the portal?

144596-disk-resource-graph-tier.jpg



I get all my managed disks using a query in PS version 7.1.5 module az.resourcegraph (version 0.11.0) but the response does not return the $disk.properties.tier (like in the picture when pulling the same data using Azure Resource Graph Explorer). Why is this data getting truncated or omitted?

PS output: $disk.properties
provisioningState : Succeeded
diskSizeGB : 128
networkAccessPolicy : AllowAll
encryption : @{type=EncryptionAtRestWithPlatformKey}
hyperVGeneration : V1
diskSizeBytes : 137438953472
diskMBpsReadWrite : 60
diskIOPSReadWrite : 500
creationData : @{createOption=FromImage; imageReference=}
timeCreated : 6/19/2021 5:48:51 PM
diskState : Unattached
uniqueId : xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
osType : Windows

azure-managed-disks
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

deherman-MSFT avatar image
0 Votes"
deherman-MSFT answered deherman-MSFT commented

@matthewblessing
I was able to see the tier by using the below query:

 (Search-AzGraph -Query "Resources | where type =~ 'microsoft.compute/disks' | limit 1").Data | ConvertTo-Json -Depth 100

Please try this to see if it resolves your issue.



Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@deherman-MSFT
Thank you for the response and checking on this, but do you see that attribute for non-premium disks?

It looks like only the Premium disks have the tier sku populated. Standard SSD and HDDs don't have the actual disk sku like "S10" or "E10", but I can see all "P*" skus in properties.tier

I guess this is by design, but seems to be a missing attribute for non-premium disks.

0 Votes 0 ·

@matthewblessing
Yes, it appears that the tier property is only available for premium disks. I test with "az disk show" and tier shows as null.

0 Votes 0 ·