Describe the bug
According this documentation, commands which COULD return more than one object should return an array.
az vm get-instance-view --ids "$MY_IDS"
- Returns an array with objects when $MY_IDS contains more than one value.
- Returns an object when $MY_IDS contains a single value
This makes queries unreliable. For example: az vm get-instance-view --ids "$MY_IDS" --query "[].id"
Related command
az vm get-instance-view
Errors
No errors
Issue script & Debug output
After having a look at them I don't think they are relevant. Please let me know if actually required and I will spare some time to remove all the sensitive information and provide the logs.
Expected behavior
az vm get-instance-view --ids "my-vm-id" returns an array with a single object
Environment Summary
azure-cli 2.56.0
core 2.56.0
telemetry 1.1.0
Extensions:
azure-devops 0.26.0
bastion 0.3.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location '/opt/az/bin/python3'
Extensions directory '/home/<my_user>/.azure/cliextensions'
Python (Linux) 3.11.5 (main, Jan 8 2024, 09:08:51) [GCC 9.4.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
Describe the bug
According this documentation, commands which COULD return more than one object should return an array.
az vm get-instance-view --ids "$MY_IDS"This makes queries unreliable. For example:
az vm get-instance-view --ids "$MY_IDS" --query "[].id"Related command
az vm get-instance-viewErrors
No errors
Issue script & Debug output
After having a look at them I don't think they are relevant. Please let me know if actually required and I will spare some time to remove all the sensitive information and provide the logs.
Expected behavior
az vm get-instance-view --ids "my-vm-id"returns an array with a single objectEnvironment Summary
Additional context
No response