Open blueelvis opened 5 years ago
@dcaro I think the underlying ask is for a generic mechanism for tracking usage across RPs
@markcowl @dcaro - Fully agreed. I would to have a single commandlet to get the usage/quota consumption across RPs which should fix this as well. Right now, for my reporting purposes, I need to call 3 separate commandlets just to get the same data across different resource providers.
Description
The properties contained by the
Get-AzStorageUsage
is different as compared to theGet-AzVmUsage
&Get-AzNetworkUsage
. This should be same for consistency purposes. Current issues -Get-AzStorageUsage
is aPSUsage with BaseType System.Object
, whereas for the other mentioned commandlets, it isObject[] with a BaseType of System.Array
Steps to reproduce
Run the
Get-AzVmUsage
and you will notice the following properties for each element of the array -Name MemberType Definition
Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() ToString Method string ToString() CurrentValue Property System.Nullable[int] CurrentValue {get;set;} Limit Property System.Nullable[long] Limit {get;set;} Name Property Microsoft.Azure.Management.Compute.Models.UsageName Name {get;set;} RequestId Property string RequestId {get;set;} StatusCode Property System.Net.HttpStatusCode StatusCode {get;set;} Unit Property string Unit {get;set;}
Even though the
Get-AzStorageUsage
has only quotas for Storage Accounts, is it possible to return an Array object with only 1 element instead of checking it manually for consistency?Environment data
Module versions
Debug output
Thanks, Pranav