Skip to content

Commit ccca8b9

Browse files
authored
Merge pull request #9165 from khannarheams/master
Update alias for NatGateway and NatGatewayId
2 parents 2bddfe5 + d1bbdae commit ccca8b9

12 files changed

+208
-77
lines changed

src/Network/Network/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
--->
2020
## Upcoming Release
21+
* Update ResourceId and InputObject for Nat Gateway
22+
- Add alias for ResourceId and InputObject
2123

2224
## Version 1.8.1
2325
* Add DisableBgpRoutePropagation flag to Effective Route Table output

src/Network/Network/NatGateway/RemoveAzureRMNatGatewayCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ public partial class RemoveAzureRmNatGateway : NetworkBaseCmdlet
4545

4646
[Parameter(Mandatory = true, ValueFromPipeline = true, ParameterSetName = DeleteByInputObjectParameterSet)]
4747
[ValidateNotNull]
48+
[Alias("NatGateway")]
4849
public PSNatGateway InputObject { get; set; }
4950

5051
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = DeleteByResourceIdParameterSet)]
5152
[ValidateNotNullOrEmpty]
53+
[Alias("NatGatewayId")]
5254
public string ResourceId { get; set; }
5355

5456
[Parameter(

src/Network/Network/NatGateway/SetAzureRMNatGatewayCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@ public class SetAzureNatGatewayCommand : NetworkBaseCmdlet
5151
ParameterSetName = SetByResourceIdParameterSet,
5252
ValueFromPipelineByPropertyName = true)]
5353
[ValidateNotNullOrEmpty]
54+
[Alias("NatGatewayId")]
5455
public string ResourceId { get; set; }
5556

5657
[Parameter(
5758
Mandatory = true,
5859
ValueFromPipeline = true,
5960
ParameterSetName = SetByInputObjectParameterSet,
6061
HelpMessage = "The nat gateway")]
62+
[Alias("NatGateway")]
6163
public PSNatGateway InputObject { get; set; }
6264

6365
[Parameter(

src/Network/Network/VirtualNetwork/Subnet/AzureVirtualNetworkSubnetConfigBase.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.Commands.Network.Models;
1616
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1718
using System.Collections.Generic;
1819
using System.Management.Automation;
1920

@@ -61,18 +62,22 @@ public class AzureVirtualNetworkSubnetConfigBase : NetworkBaseCmdlet
6162
HelpMessage = "RouteTable")]
6263
public PSRouteTable RouteTable { get; set; }
6364

65+
[GenericBreakingChange("Update Property Name", OldWay = "-ResourceId", NewWay = "-NatGatewayId")]
66+
[Alias("NatGatewayId")]
6467
[Parameter(
6568
Mandatory = false,
6669
ValueFromPipelineByPropertyName = true,
6770
ParameterSetName = "SetByResourceId",
68-
HelpMessage = "ResourceId")]
71+
HelpMessage = "Specifies the Id of NAT Gateway resource associated with the subnet configuration")]
6972
public string ResourceId { get; set; }
7073

74+
[GenericBreakingChange("Update Property Name", OldWay = "-InputObject", NewWay = "-NatGateway")]
75+
[Alias("NatGateway")]
7176
[Parameter(
7277
Mandatory = false,
7378
ValueFromPipelineByPropertyName = true,
7479
ParameterSetName = "SetByResource",
75-
HelpMessage = "NatGateway")]
80+
HelpMessage = "Specifies the nat gateway associated with the subnet configuration")]
7681
public PSNatGateway InputObject { get; set; }
7782

7883
[Parameter(

src/Network/Network/help/Add-AzVirtualNetworkSubnetConfig.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ Adds a subnet configuration to a virtual network.
1616
### SetByResource (Default)
1717
```
1818
Add-AzVirtualNetworkSubnetConfig -Name <String> -VirtualNetwork <PSVirtualNetwork> -AddressPrefix <String[]>
19-
[-NetworkSecurityGroup <PSNetworkSecurityGroup>] [-RouteTable <PSRouteTable>] [-ServiceEndpoint <String[]>]
20-
[-ServiceEndpointPolicy <PSServiceEndpointPolicy[]>] [-Delegation <PSDelegation[]>]
21-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
19+
[-NetworkSecurityGroup <PSNetworkSecurityGroup>] [-RouteTable <PSRouteTable>] [-InputObject <PSNatGateway>]
20+
[-ServiceEndpoint <String[]>] [-ServiceEndpointPolicy <PSServiceEndpointPolicy[]>]
21+
[-Delegation <PSDelegation[]>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2222
```
2323

2424
### SetByResourceId
2525
```
2626
Add-AzVirtualNetworkSubnetConfig -Name <String> -VirtualNetwork <PSVirtualNetwork> -AddressPrefix <String[]>
27-
[-NetworkSecurityGroupId <String>] [-RouteTableId <String>] [-ServiceEndpoint <String[]>]
28-
[-ServiceEndpointPolicy <PSServiceEndpointPolicy[]>] [-Delegation <PSDelegation[]>]
29-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
27+
[-NetworkSecurityGroupId <String>] [-RouteTableId <String>] [-ResourceId <String>]
28+
[-ServiceEndpoint <String[]>] [-ServiceEndpointPolicy <PSServiceEndpointPolicy[]>]
29+
[-Delegation <PSDelegation[]>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3030
```
3131

3232
## DESCRIPTION
@@ -105,6 +105,21 @@ Accept pipeline input: True (ByPropertyName)
105105
Accept wildcard characters: False
106106
```
107107
108+
### -InputObject
109+
Specifies the nat gateway associated with the subnet configuration.
110+
111+
```yaml
112+
Type: Microsoft.Azure.Commands.Network.Models.PSNatGateway
113+
Parameter Sets: SetByResource
114+
Aliases: NatGateway
115+
116+
Required: False
117+
Position: Named
118+
Default value: None
119+
Accept pipeline input: True (ByPropertyName)
120+
Accept wildcard characters: False
121+
```
122+
108123
### -Name
109124
Specifies the name of the subnet configuration to add.
110125
@@ -151,6 +166,21 @@ Accept pipeline input: True (ByPropertyName)
151166
Accept wildcard characters: False
152167
```
153168
169+
### -ResourceId
170+
Specifies the Id of NAT Gateway resource associated with the subnet configuration.
171+
172+
```yaml
173+
Type: System.String
174+
Parameter Sets: SetByResourceId
175+
Aliases: NatGatewayId
176+
177+
Required: False
178+
Position: Named
179+
Default value: None
180+
Accept pipeline input: True (ByPropertyName)
181+
Accept wildcard characters: False
182+
```
183+
154184
### -RouteTable
155185
```yaml
156186
Type: Microsoft.Azure.Commands.Network.Models.PSRouteTable
@@ -223,7 +253,7 @@ Accept wildcard characters: False
223253
```
224254
225255
### CommonParameters
226-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
256+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
227257
228258
## INPUTS
229259

src/Network/Network/help/Get-AzNatGateway.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Id : /subscriptions/<subid>/resourceGroups/natgateway_test/pr
144144
The credentials, account, tenant, and subscription used for communication with Azure.
145145

146146
```yaml
147-
Type: IAzureContextContainer
147+
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
148148
Parameter Sets: (All)
149149
Aliases: AzContext, AzureRmContext, AzureCredential
150150

@@ -159,7 +159,7 @@ Accept wildcard characters: False
159159
The name of the nat gateway.
160160
161161
```yaml
162-
Type: String
162+
Type: System.String
163163
Parameter Sets: GetByNameParameterSet
164164
Aliases: ResourceName
165165

@@ -174,7 +174,7 @@ Accept wildcard characters: False
174174
The resource group name of the nat gateway.
175175
176176
```yaml
177-
Type: String
177+
Type: System.String
178178
Parameter Sets: ListParameterSet
179179
Aliases:
180180

@@ -186,7 +186,7 @@ Accept wildcard characters: False
186186
```
187187
188188
```yaml
189-
Type: String
189+
Type: System.String
190190
Parameter Sets: GetByNameParameterSet
191191
Aliases:
192192

@@ -201,7 +201,7 @@ Accept wildcard characters: False
201201
Nat Gateway Id
202202
203203
```yaml
204-
Type: String
204+
Type: System.String
205205
Parameter Sets: GetByResourceIdParameterSet
206206
Aliases:
207207

@@ -213,7 +213,7 @@ Accept wildcard characters: False
213213
```
214214
215215
### CommonParameters
216-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
216+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
217217
218218
## INPUTS
219219

src/Network/Network/help/New-AzNatGateway.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PS C:> $natgateway = New-AzNatGateway -ResourceGroupName "natgateway_test" -Name
4848
Run cmdlet in the background
4949

5050
```yaml
51-
Type: SwitchParameter
51+
Type: System.Management.Automation.SwitchParameter
5252
Parameter Sets: (All)
5353
Aliases:
5454

@@ -63,7 +63,7 @@ Accept wildcard characters: False
6363
The credentials, account, tenant, and subscription used for communication with Azure.
6464
6565
```yaml
66-
Type: IAzureContextContainer
66+
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
6767
Parameter Sets: (All)
6868
Aliases: AzContext, AzureRmContext, AzureCredential
6969

@@ -78,7 +78,7 @@ Accept wildcard characters: False
7878
Do not ask for confirmation if you want to overwrite a resource
7979
8080
```yaml
81-
Type: SwitchParameter
81+
Type: System.Management.Automation.SwitchParameter
8282
Parameter Sets: (All)
8383
Aliases:
8484

@@ -93,7 +93,7 @@ Accept wildcard characters: False
9393
The idle timeout of the nat gateway.
9494
9595
```yaml
96-
Type: Int32
96+
Type: System.Int32
9797
Parameter Sets: (All)
9898
Aliases:
9999

@@ -108,7 +108,7 @@ Accept wildcard characters: False
108108
The location.
109109
110110
```yaml
111-
Type: String
111+
Type: System.String
112112
Parameter Sets: (All)
113113
Aliases:
114114

@@ -123,7 +123,7 @@ Accept wildcard characters: False
123123
The name of the nat gateway.
124124
125125
```yaml
126-
Type: String
126+
Type: System.String
127127
Parameter Sets: (All)
128128
Aliases: ResourceName
129129

@@ -138,7 +138,7 @@ Accept wildcard characters: False
138138
An array of public ip addresses associated with the nat gateway resource.
139139
140140
```yaml
141-
Type: PSResourceId[]
141+
Type: Microsoft.Azure.Commands.Network.Models.PSResourceId[]
142142
Parameter Sets: (All)
143143
Aliases:
144144

@@ -153,7 +153,7 @@ Accept wildcard characters: False
153153
An array of public ip prefixes associated with the nat gateway resource.
154154
155155
```yaml
156-
Type: PSResourceId[]
156+
Type: Microsoft.Azure.Commands.Network.Models.PSResourceId[]
157157
Parameter Sets: (All)
158158
Aliases:
159159

@@ -168,7 +168,7 @@ Accept wildcard characters: False
168168
The resource group name of the nat gateway.
169169
170170
```yaml
171-
Type: String
171+
Type: System.String
172172
Parameter Sets: (All)
173173
Aliases:
174174

@@ -183,7 +183,7 @@ Accept wildcard characters: False
183183
Name of a NAT gateway SKU.
184184
185185
```yaml
186-
Type: String
186+
Type: System.String
187187
Parameter Sets: (All)
188188
Aliases:
189189

@@ -198,7 +198,7 @@ Accept wildcard characters: False
198198
A hashtable which represents resource tags.
199199
200200
```yaml
201-
Type: Hashtable
201+
Type: System.Collections.Hashtable
202202
Parameter Sets: (All)
203203
Aliases:
204204

@@ -213,7 +213,7 @@ Accept wildcard characters: False
213213
Prompts you for confirmation before running the cmdlet.
214214
215215
```yaml
216-
Type: SwitchParameter
216+
Type: System.Management.Automation.SwitchParameter
217217
Parameter Sets: (All)
218218
Aliases: cf
219219

@@ -229,7 +229,7 @@ Shows what would happen if the cmdlet runs.
229229
The cmdlet is not run.
230230
231231
```yaml
232-
Type: SwitchParameter
232+
Type: System.Management.Automation.SwitchParameter
233233
Parameter Sets: (All)
234234
Aliases: wi
235235

@@ -241,7 +241,7 @@ Accept wildcard characters: False
241241
```
242242
243243
### CommonParameters
244-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
244+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
245245
246246
## INPUTS
247247

0 commit comments

Comments
 (0)