Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3k forks source link

Some Service Connector flags are unexpected given context #30295

Open benjaminapetersen opened 5 days ago

benjaminapetersen commented 5 days ago

Describe the bug

I found this experience to be a little odd/unexpected:

# this was a little strange, name is ambiguous
# I would expect --name to be the name of the connection (or that <name> would be an arg, not a flag) as --connection implies a different thing (rather than "this" thing to show).  --name seems like it ought be "this" thing to show, which would be implied context.  If it was --cluster-name, then it would be a clear different context
az aks connection show --connection <name> --resource-group <rg-name> --name <i-think-this-is-aks-cluster-name-which-is-awkward>

I would find this more clear:

# for clarity, this would clarify ux:
az aks connection show <connection-name> --resource-group <rg-name> --cluster <aks-cluster-name>
# or alternatively
az aks connection show --name <connection-name> --resource-group <rg-name> --cluster <aks-cluster-name>

Related command

az aks connection

Errors

No error, this is a UX related bug.

Issue script & Debug output

No script needed.

Expected behavior

Clarification of resources given flags provided.

Environment Summary

az version { "azure-cli": "2.65.0", "azure-cli-core": "2.65.0", "azure-cli-telemetry": "1.1.0", "extensions": { "interactive": "1.0.0b1", "scenario-guide": "0.1.1" } }

Additional context

No response

yonzhan commented 5 days ago

Thank you for opening this issue, we will look into it.

benjaminapetersen commented 5 days ago

Great, thanks!