Azure / Azure/azure-powershell
Set-AzApiManagement: Unrecognized Sku 'StandardV2'
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
I attempted to update the Standard V2 APIM using the Set-AzApiManagement cmdlet but encountered the error: ‘**Set-AzApiManagement: Unrecognized Sku StandardV2’**. Upon reviewing the code, I noticed that the V2 tiers are not included in the MapSku method.
https://github.com/Azure/azure-powershell/blob/main/src/ApiManagement/ApiManagement/Helpers/Mappers.cs#L76
### Issue script & Debug output
```PowerShell
$apimServiceInstance = Get-AzApiManagement -ResourceGroupName $resourceGroupName -Name $apimServiceName
Set-AzApiManagement -InputObject $apimServiceInstance
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Azure Linux 3.0
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 5.3.0 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 10.5.0 Az.Compute {Add-AzGalleryInVMAccessControlProfileVersionRulesIdentity, Add-AzGalleryInVMAccessControlProfileVersionRulesPrivilege, Add-AzGaller…
Script 7.23.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Add-AzApplicationGatewayBackendAddressPool, Add-AzApplicationGatewayBackendHttpS…
Script 8.1.1 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
Script 9.3.0 Az.Storage {Add-AzRmStorageContainerLegalHold, Add-AzStorageAccountManagementPolicyAction, Add-AzStorageAccountNetworkRule, Close-AzStorageFile…
Script 1.1.3 Az.Tools.Predictor {Disable-AzPredictor, Enable-AzPredictor, Open-AzPredictorSurvey, Send-AzPredictorRating}
Script 0.0.0.10 AzureAD.Standard.Preview {Add-AzureADApplicationOwner, Add-AzureADDeviceRegisteredOwner, Add-AzureADDeviceRegisteredUser, Add-AzureADDirectoryRoleMember…}
Script 0.9.3 AzurePSDrive
```
### Error output
```PowerShell
Set-AzApiManagement: Unrecognized Sku 'StandardV2'
```
Contributor guide
Assessment
This issue has not been assessed yet.