Azure / Azure/autorest.powershell
Revise Set cmdlet variants, update ValueFromPipeline parameter name
- Dominant language
- C#
- Stars
- 123
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Currently, you get something like this:
```powershell
### Update (Default)
Set-AzNsg -Name -ResourceGroupName -SubscriptionId
[-Parameter ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[]
### UpdateExpanded
Set-AzNsg -Name -ResourceGroupName -SubscriptionId
[-DefaultSecurityRule ] [-Etag ] [-Id ] [-Location ]
[-ProvisioningState ] [-ResourceGuid ] [-SecurityRule ] [-Tag ]
[-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] []
```
Instead, we want something like this:
```powershell
### Update (Default)
Set-AzNsg -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
[]
### UpdateExpanded
Set-AzNsg -Name -ResourceGroupName -SubscriptionId
[-DefaultSecurityRule ] [-Etag ] [-Id ] [-Location ]
[-ProvisioningState ] [-ResourceGuid ] [-SecurityRule ] [-Tag ]
[-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] []
```
Basically, the non-Expanded variant needs to have a single parameter, `InputObject`, that is the type of the body parameter (in this case, `INetworkSecurityGroup`). This replaces the path parameters (Name, ResourceGroupName, SubscriptionId) with the separate body parameter.
Additionally, any time a body parameter is created (aka, a ValueFromPipeline parameter), we name it `InputObject`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.