Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.98k forks source link

az storage account show | command is requiring non-required parameters #14119

Open dbradish-microsoft opened 4 years ago

dbradish-microsoft commented 4 years ago

Link to reference content:

https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show

All of these parameters are listed as optional:

az storage account show [--expand] [--ids] [--name] [--resource-group] [--subscription]

Azure Cloud Shell syntax and error:

$ az storage account show --resource-group RG1inAzCLI --subscription dbradish-msft (--name | --ids) are required $

Issue #14110 is a similar issue.

UPDATE: There must be an IF...THEN...ELSE sitting behind this reference command which does NOT require the --ids if the --name parameter is specified. So maybe what we really need to do is find a way to communicate this in our documentation.

yonzhan commented 4 years ago

add to S173

Juliehzl commented 4 years ago

Hi @dbradish-microsoft , it is because for such design, there are two options to run the command:

  1. az storage account show --ids <resource-id>
  2. az storage account show -g <rg>-n <name> --subscriptrion.

SO none of them is required and isn't marked as required.

dbradish-microsoft commented 2 weeks ago

@juliehzl, but there is no information in the parameter descriptions that explains this to the customer. Unfortunately we do not have a third parameter category for optional only if or conditional. Parameters that are listed as optional but are actually required if is one of our primary recurring customer complaints. Can you kindly add more information in the short-summary that brings more clarity on this to our customer?

github-actions[bot] commented 2 weeks ago

Here are some similar issues that might help you. Please check if they can solve your problem.