Subscription Error
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing the script in an Azure PowerShell Runbook and inspect how the subscription context is initialized before Get-AzSqlDatabase runs. The issue is resolved when the runbook supplies a non-null SubscriptionId and completes without the subscription or Client.SubscriptionId errors.
Written by the indexing model from the issue text.
Description
Running the script in an Azure PowerShell Runbook. I have verified that I have the correct SubscriptionId in $SubscriptionId
Mode : Process
ContextDirectory :
ContextFile :
CacheDirectory :
CacheFile :
Settings : {}
System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'Subscription'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
at System.Management.Automation.ValidateNotNullOrEmptyAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics)
at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
--- End of inner exception stack trace ---
at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
at System.Management.Automation.CmdletParameterBinderController.BindParameters(UInt32 parameterSets, Collection1 arguments)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection1 arguments)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection1 arguments)
at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
'this.Client.SubscriptionId' cannot be null.
Getting Data Sync Log from to 03/03/2023 17:34:25
Upcoming breaking changes in the cmdlet 'Get-AzSqlDatabase' :
- The output type 'Microsoft.Azure.Commands.Sql.Database.Model.AzureSqlDatabaseModel' is changing
- The following properties in the output type are being deprecated : 'BackupStorageRedundancy'
- The following properties are being added to the output type : 'CurrentBackupStorageRedundancy' 'RequestedBackupStorageRedundancy'
- The change is expected to take effect from the version : '3.0.0'
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
'this.Client.SubscriptionId' cannot be null.
'this.Client.SubscriptionId' cannot be null.
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/sql-server-samples
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
microsoft/sql-server-samples#1499 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
microsoft/sql-server-samples#1495 · 3 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
microsoft/sql-server-samples#1341 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 64/100
microsoft/sql-server-samples#276 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
microsoft/sql-server-samples#1497 ·
All issues in microsoft/sql-server-samples
Similar issues
-
Language: Terraform :globe_with_meridians: Needs: Triage :mag: Type: Bug :bug:
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Azure/terraform-azurerm-avm-res-containerregistry-registry#230 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100