Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Omit a mandatory parameter if resource can be queried by List #1224

Open
BethanyZhou opened this issue Aug 31, 2023 · 1 comment

Comments

@BethanyZhou
Copy link
Contributor

For example:
There is a generated cmdlet, which matches API design, where HsmName and ResourceGroupName are mandatory.

Get-AzKeyVaultManagedHsmRegion -HsmName <String> -ResourceGroupName <String> [-SubscriptionId <String[]>]
 [-DefaultProfile <PSObject>] [<CommonParameters>]

But we can list all HSMs by HsmName and then get its ResourceGroupName so that ResourceGroupName can be omitted in this case. That's one of CLI common design.
See

az keyvault region list --hsm-name
                        [--resource-group]

Proposal:
Autorest.PowerShell supports this as its built-in function.

@dolauli
Copy link
Contributor

dolauli commented Aug 31, 2023

  1. how to handle conflict
    1. two resources group names contain resource with the same names
    2. resource graph may be a better choice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants