Get-AzResourceProvider does not return defaultApiVersion #26486
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
needs-triage
This is a new issue that needs to be triaged to the appropriate team.
Description
Description
The
Get-AzResourceProvider
cmdlet does not make thedefaultApiVersion
part of the response available in the resulting PsObjectThe API itself does return the defaultApiVersion, but the command itself does not:
(Get-AzResourceProvider -Debug -ProviderNamespace "Microsoft.Compute").ResourceTypes[0].PsObject.Properties
Details
It appears the
GetAzureProviderCmdlet
class methodOnProcessRecord
does not load that particular part of the response:azure-powershell/src/Resources/ResourceManager/Implementation/Providers/GetAzureProviderCmdlet.cs
Lines 84 to 90 in 4011e52
The
PSResourceProviderResourceType
class itself does not include this property yet.azure-powershell/src/Resources/ResourceManager/SdkModels/ResourceProvider/PSResourceProviderResourceType.cs
Lines 21 to 42 in 4011e52
However, the
ProviderResourceType
class used to deserialize the API response does include it already:azure-powershell/src/Resources/Resources.Management.Sdk/Generated/Models/ProviderResourceType.cs
Lines 113 to 114 in 4011e52
Issue script & Debug output
(Get-AzResourceProvider -debug -ProviderNamespace "Microsoft.Compute").ResourceTypes[0].PsObject.Properties
Environment data
Module versions
Error output
N/A
The text was updated successfully, but these errors were encountered: