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] Generate cmdlet to Add/remove elements for a complex array parameter #1300

Open
dolauli opened this issue Jan 18, 2024 · 1 comment

Comments

@dolauli
Copy link
Contributor

dolauli commented Jan 18, 2024

Following is a valid user case from the user side.

Let's say we have the cmdlet as below.

New-AzResourceA [-network <Network[]>] -Name <string> ...

Users may need to update the network configuration for ResoureA by adding/removing elements.

So it is better We could generate two cmdlets like add-AzResourceANetwork, remove-AzResourceANetwork to support this scenario.

@dolauli dolauli changed the title [Feature] Generate cmdlet to Add/remove elements from a complex array parameter [Feature] Generate cmdlet to Add/remove elements for a complex array parameter Jan 18, 2024
@isra-fel
Copy link
Member

We can even expand the scope to not only complex objects, but also primitive types.
Also, since enabling this will introduce a lot of new cmdlets, we should probably design it to be a property level directive. For example:

directives:
    - where:
        - cmdlet: New-AzResource
        - parameter: Network
    - set:
        - collection-extra-cmdlets: true

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