Azure / Azure/azure-powershell

Set-AzSqlElasticPool : Invalid SKU name 'GP' | Vcore not getting changed from PS

Open
#9,046 7 comments 1 reaction 1 assignee Claimed by @jaredmoo View on GitHub
act-codegen-extensibility-squad customer-reported feature-request Service Attention SQL
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

## Description

Trying to change dtu of Elastic pool which is in Vcore model from Powershell, but it is throwing error. Same behavior from runbook also.
When I'm doing the same with Az CLI it is working.

## Steps to reproduce

```
Set-AzSqlElasticPool -ElasticPoolName -ServerName -ResourceGroupName -Dtu <>
```

## Environment data

```
Name Value
---- -----
PSVersion 5.1.16299.1004
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.1004
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

## Module versions

```
Script 1.5.0 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-Az...
Script 1.1.0 Az.AnalysisServices {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServic...
Script 1.2.1 Az.Automation {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomati...
Script 1.1.0 Az.Cdn {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}
Script 1.0.1 Az.CognitiveServices {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServi...
Script 1.7.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvaila...
Script 1.0.1 Az.ContainerInstance {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerIns...
Script 1.1.0 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV...
Script 1.1.0 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-A...
Script 1.0.1 Az.EventHub {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEve...
Script 1.1.0 Az.KeyVault {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOper...
Script 1.2.1 Az.LogicApp {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountAssembly, Get-AzIntegrationA...
Script 1.0.1 Az.Monitor {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script 1.6.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticati...
Script 1.1.0 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLog...
Script 1.2.0 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServic...
Script 0.7.1 Az.ResourceGraph Search-AzGraph
Script 1.3.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssig...
Script 1.8.0 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionA...
Script 1.2.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccou...
Script 1.1.2 Az.Websites {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePl...
Binary 2.0.2.4 AzureAD {Add-AzureADApplicationOwner, Get-AzureADApplication, Get-AzureADApplicationExtensionPro...
```

## Debug output

```
PS C:\Users\M1046504> Set $DebugPreference='Continue'
PS C:\Users\M1046504> Set-AzSqlElasticPool -ElasticPoolName -ServerName -ResourceGroupName
-Dtu 3
Set-AzSqlElasticPool : Invalid SKU name 'GP'.
At line:1 char:2

Set-AzSqlElasticPool -ElasticPoolName testpool -ServerName testpool ...
+ CategoryInfo : CloseError: (:) [Set-AzSqlElasticPool], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet.SetAzureSqlElasticPool

```

## Error output

```
HistoryId: 3

RequestId : d989d7f2-960e-4657-8800-b15a9ddbbb44
Message : Invalid SKU name 'GP'.
ServerMessage : InvalidSkuName: Invalid SKU name 'GP'. (System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError])
ServerResponse : {BadRequest}
RequestMessage : {PATCH https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers/testpool/elasticPools/testpool?api-version=2017-10-01-preview}
InvocationInfo : {Set-AzSqlElasticPool}
Line : Set-AzSqlElasticPool -ElasticPoolName testpool -ServerName testpool -ResourceGroupName
-Dtu 3
Position : At line:1 char:2
+ Set-AzSqlElasticPool -ElasticPoolName testpool -ServerName testpool ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace : at Microsoft.Azure.Management.Sql.ElasticPoolsOperations.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperations.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperationsExtensions.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperationsExtensions.Update(IElasticPoolsOperations operations, String
resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters)
at Microsoft.Azure.Commands.Sql.ElasticPool.Services.AzureSqlElasticPoolAdapter.UpsertElasticPool(AzureSqlElasticPoolModel model)
at Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet.SetAzureSqlElasticPool.PersistChanges(IEnumerable`1 entity)
at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.<>c__DisplayClass16_0.b__0()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ConfirmAction(String processMessage, String target, Action
action)
at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId : 3

HistoryId: -1

Message : Unable to find type [Microsoft.PowerShell.Commands.PowerShellGet.Telemetry].
StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line : $telemetryMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | Get-Member -Static).Name

Position : At C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:715 char:26
+ ... yMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.