Open dbradish-microsoft opened 4 years ago
add to S173
Hi @dbradish-microsoft , it is because for such design, there are two options to run the command:
az storage account show --ids <resource-id>
az storage account show -g <rg>-n <name> --subscriptrion
.SO none of them is required and isn't marked as required.
@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?
Here are some similar issues that might help you. Please check if they can solve your problem.
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.