Skip to content

Commit f4affad

Browse files
author
Rupali Vohra
committed
Modifications to existing subnet commands
1 parent df32a96 commit f4affad

8 files changed

+120
-7
lines changed

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AddAzureVirtualNetworkSubnetConfigCommand.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ public override void Execute()
9191
}
9292
}
9393

94+
if (this.Delegation != null)
95+
{
96+
subnet.Delegations = this.Delegation;
97+
}
98+
9499
this.VirtualNetwork.Subnets.Add(subnet);
95100

96101
WriteObject(this.VirtualNetwork);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ public class AzureVirtualNetworkSubnetConfigBase : NetworkBaseCmdlet
7676
Mandatory = false,
7777
ValueFromPipelineByPropertyName = true,
7878
HelpMessage = "Delegations")]
79-
public List<PSDelegation> Delegations { get; set; }
79+
public List<PSDelegation> Delegation { get; set; }
8080
}
8181
}

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/NewAzureVirtualNetworkSubnetConfigCommand.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ public override void Execute()
7676
subnet.ServiceEndpointPolicies = this.ServiceEndpointPolicy;
7777
}
7878

79+
if (this.Delegation != null)
80+
{
81+
subnet.Delegations = this.Delegation;
82+
}
83+
7984
WriteObject(subnet);
8085
}
8186
}

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/SetAzureVirtualNetworkSubnetConfigCommand.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ public override void Execute()
101101
subnet.ServiceEndpointPolicies = null;
102102
}
103103

104+
if (this.Delegation != null)
105+
{
106+
subnet.Delegations = this.Delegation;
107+
}
108+
else
109+
{
110+
subnet.Delegations = null;
111+
}
112+
104113
WriteObject(this.VirtualNetwork);
105114
}
106115
}

src/ResourceManager/Network/Commands.Network/help/Add-AzureRmVirtualNetworkSubnetConfig.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Add-AzureRmVirtualNetworkSubnetConfig -Name <String> -VirtualNetwork <PSVirtualN
1919
-AddressPrefix <System.Collections.Generic.List`1[System.String]>
2020
[-NetworkSecurityGroup <PSNetworkSecurityGroup>] [-RouteTable <PSRouteTable>]
2121
[-ServiceEndpoint <System.Collections.Generic.List`1[System.String]>]
22-
[-ServiceEndpointPolicies <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]>]
22+
[-ServiceEndpointPolicy <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]>]
23+
[-Delegation <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]>]
2324
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2425
```
2526

@@ -28,7 +29,8 @@ Add-AzureRmVirtualNetworkSubnetConfig -Name <String> -VirtualNetwork <PSVirtualN
2829
Add-AzureRmVirtualNetworkSubnetConfig -Name <String> -VirtualNetwork <PSVirtualNetwork>
2930
-AddressPrefix <System.Collections.Generic.List`1[System.String]> [-NetworkSecurityGroupId <String>]
3031
[-RouteTableId <String>] [-ServiceEndpoint <System.Collections.Generic.List`1[System.String]>]
31-
[-ServiceEndpointPolicies <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]>]
32+
[-ServiceEndpointPolicy <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]>]
33+
[-Delegation <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]>]
3234
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3335
```
3436

@@ -93,6 +95,21 @@ Accept pipeline input: False
9395
Accept wildcard characters: False
9496
```
9597
98+
### -Delegation
99+
List of services that have permission to perform operations on this subnet.
100+
101+
```yaml
102+
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]
103+
Parameter Sets: (All)
104+
Aliases:
105+
106+
Required: False
107+
Position: Named
108+
Default value: None
109+
Accept pipeline input: True (ByPropertyName)
110+
Accept wildcard characters: False
111+
```
112+
96113
### -Name
97114
Specifies the name of the subnet configuration to add.
98115
@@ -180,7 +197,7 @@ Accept pipeline input: True (ByPropertyName)
180197
Accept wildcard characters: False
181198
```
182199
183-
### -ServiceEndpointPolicies
200+
### -ServiceEndpointPolicy
184201
Service Endpoint Policies
185202
186203
```yaml
@@ -216,7 +233,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
216233
## INPUTS
217234
218235
### Microsoft.Azure.Commands.Network.Models.PSVirtualNetwork
219-
Parameters: VirtualNetwork (ByValue)
220236
221237
### System.String
222238
@@ -226,6 +242,10 @@ Parameters: VirtualNetwork (ByValue)
226242
227243
### System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
228244

245+
### System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy, Microsoft.Azure.Commands.Network, Version=6.7.0.0, Culture=neutral, PublicKeyToken=null]]
246+
247+
### System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Network.Models.PSDelegation, Microsoft.Azure.Commands.Network, Version=6.7.0.0, Culture=neutral, PublicKeyToken=null]]
248+
229249
## OUTPUTS
230250

231251
### Microsoft.Azure.Commands.Network.Models.PSVirtualNetwork

src/ResourceManager/Network/Commands.Network/help/Get-AzureRmVirtualNetworkSubnetConfig.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
8888
## INPUTS
8989
9090
### Microsoft.Azure.Commands.Network.Models.PSVirtualNetwork
91-
Parameters: VirtualNetwork (ByValue)
9291
9392
## OUTPUTS
9493

src/ResourceManager/Network/Commands.Network/help/New-AzureRmVirtualNetworkSubnetConfig.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ New-AzureRmVirtualNetworkSubnetConfig -Name <String>
1919
-AddressPrefix <System.Collections.Generic.List`1[System.String]>
2020
[-NetworkSecurityGroup <PSNetworkSecurityGroup>] [-RouteTable <PSRouteTable>]
2121
[-ServiceEndpoint <System.Collections.Generic.List`1[System.String]>]
22+
[-ServiceEndpointPolicy <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]>]
23+
[-Delegation <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]>]
2224
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2325
```
2426

@@ -27,6 +29,8 @@ New-AzureRmVirtualNetworkSubnetConfig -Name <String>
2729
New-AzureRmVirtualNetworkSubnetConfig -Name <String>
2830
-AddressPrefix <System.Collections.Generic.List`1[System.String]> [-NetworkSecurityGroupId <String>]
2931
[-RouteTableId <String>] [-ServiceEndpoint <System.Collections.Generic.List`1[System.String]>]
32+
[-ServiceEndpointPolicy <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]>]
33+
[-Delegation <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]>]
3034
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3135
```
3236

@@ -96,6 +100,21 @@ Accept pipeline input: False
96100
Accept wildcard characters: False
97101
```
98102
103+
### -Delegation
104+
Delegations
105+
106+
```yaml
107+
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]
108+
Parameter Sets: (All)
109+
Aliases:
110+
111+
Required: False
112+
Position: Named
113+
Default value: None
114+
Accept pipeline input: True (ByPropertyName)
115+
Accept wildcard characters: False
116+
```
117+
99118
### -Name
100119
Specifies the name of the subnet configuration to create.
101120
@@ -186,6 +205,21 @@ Accept pipeline input: True (ByPropertyName)
186205
Accept wildcard characters: False
187206
```
188207
208+
### -ServiceEndpointPolicy
209+
Service Endpoint Policies
210+
211+
```yaml
212+
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]
213+
Parameter Sets: (All)
214+
Aliases:
215+
216+
Required: False
217+
Position: Named
218+
Default value: None
219+
Accept pipeline input: True (ByPropertyName)
220+
Accept wildcard characters: False
221+
```
222+
189223
### CommonParameters
190224
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).
191225
@@ -199,6 +233,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
199233
200234
### System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
201235

236+
### System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy, Microsoft.Azure.Commands.Network, Version=6.7.0.0, Culture=neutral, PublicKeyToken=null]]
237+
238+
### System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Network.Models.PSDelegation, Microsoft.Azure.Commands.Network, Version=6.7.0.0, Culture=neutral, PublicKeyToken=null]]
239+
202240
## OUTPUTS
203241

204242
### Microsoft.Azure.Commands.Network.Models.PSSubnet

src/ResourceManager/Network/Commands.Network/help/Set-AzureRmVirtualNetworkSubnetConfig.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Set-AzureRmVirtualNetworkSubnetConfig -Name <String> -VirtualNetwork <PSVirtualN
1919
-AddressPrefix <System.Collections.Generic.List`1[System.String]>
2020
[-NetworkSecurityGroup <PSNetworkSecurityGroup>] [-RouteTable <PSRouteTable>]
2121
[-ServiceEndpoint <System.Collections.Generic.List`1[System.String]>]
22+
[-ServiceEndpointPolicy <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]>]
23+
[-Delegation <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]>]
2224
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2325
```
2426

@@ -27,6 +29,8 @@ Set-AzureRmVirtualNetworkSubnetConfig -Name <String> -VirtualNetwork <PSVirtualN
2729
Set-AzureRmVirtualNetworkSubnetConfig -Name <String> -VirtualNetwork <PSVirtualNetwork>
2830
-AddressPrefix <System.Collections.Generic.List`1[System.String]> [-NetworkSecurityGroupId <String>]
2931
[-RouteTableId <String>] [-ServiceEndpoint <System.Collections.Generic.List`1[System.String]>]
32+
[-ServiceEndpointPolicy <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]>]
33+
[-Delegation <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]>]
3034
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3135
```
3236

@@ -114,6 +118,21 @@ Accept pipeline input: False
114118
Accept wildcard characters: False
115119
```
116120
121+
### -Delegation
122+
Delegations
123+
124+
```yaml
125+
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSDelegation]
126+
Parameter Sets: (All)
127+
Aliases:
128+
129+
Required: False
130+
Position: Named
131+
Default value: None
132+
Accept pipeline input: True (ByPropertyName)
133+
Accept wildcard characters: False
134+
```
135+
117136
### -Name
118137
Specifies the name of a subnet configuration that this cmdlet configures.
119138
@@ -204,6 +223,21 @@ Accept pipeline input: True (ByPropertyName)
204223
Accept wildcard characters: False
205224
```
206225
226+
### -ServiceEndpointPolicy
227+
Service Endpoint Policies
228+
229+
```yaml
230+
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy]
231+
Parameter Sets: (All)
232+
Aliases:
233+
234+
Required: False
235+
Position: Named
236+
Default value: None
237+
Accept pipeline input: True (ByPropertyName)
238+
Accept wildcard characters: False
239+
```
240+
207241
### -VirtualNetwork
208242
Specifies the **VirtualNetwork** object that contains the subnet configuration.
209243
@@ -225,7 +259,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
225259
## INPUTS
226260
227261
### Microsoft.Azure.Commands.Network.Models.PSVirtualNetwork
228-
Parameters: VirtualNetwork (ByValue)
229262
230263
### System.String
231264
@@ -235,6 +268,10 @@ Parameters: VirtualNetwork (ByValue)
235268
236269
### System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
237270

271+
### System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Network.Models.PSServiceEndpointPolicy, Microsoft.Azure.Commands.Network, Version=6.7.0.0, Culture=neutral, PublicKeyToken=null]]
272+
273+
### System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Network.Models.PSDelegation, Microsoft.Azure.Commands.Network, Version=6.7.0.0, Culture=neutral, PublicKeyToken=null]]
274+
238275
## OUTPUTS
239276

240277
### Microsoft.Azure.Commands.Network.Models.PSVirtualNetwork

0 commit comments

Comments
 (0)