Skip to content

Commit a25c903

Browse files
committed
Fix docs
1 parent 487b32f commit a25c903

19 files changed

+182
-54
lines changed

src/ResourceManager/Network/Commands.Network/ApplicationSecurityGroup/GetAzureRMApplicationSecurityGroupCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public partial class GetAzureRmApplicationSecurityGroup : NetworkBaseCmdlet
3939
{
4040
[Parameter(
4141
Mandatory = false,
42-
HelpMessage = "The resource group name of application security group.",
42+
HelpMessage = "The resource group name of the application security group.",
4343
ValueFromPipelineByPropertyName = true)]
4444
[ValidateNotNullOrEmpty]
4545
public string ResourceGroupName { get; set; }
4646

4747
[Alias("ResourceName")]
4848
[Parameter(
4949
Mandatory = false,
50-
HelpMessage = "The name of application security group.",
50+
HelpMessage = "The name of the application security group.",
5151
ValueFromPipelineByPropertyName = true)]
5252
[ValidateNotNullOrEmpty]
5353
public string Name { get; set; }

src/ResourceManager/Network/Commands.Network/ApplicationSecurityGroup/GetAzureRMApplicationSecurityGroupListCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public partial class GetAzureRmApplicationSecurityGroupList : NetworkBaseCmdlet
3737
{
3838
[Parameter(
3939
Mandatory = true,
40-
HelpMessage = "The resource group name of application security group.",
40+
HelpMessage = "The resource group name of the application security group.",
4141
ValueFromPipelineByPropertyName = true)]
4242
[ValidateNotNullOrEmpty]
4343
public string ResourceGroupName { get; set; }

src/ResourceManager/Network/Commands.Network/ApplicationSecurityGroup/NewAzureRMApplicationSecurityGroupCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public partial class NewAzureRmApplicationSecurityGroup : NetworkBaseCmdlet
3939
{
4040
[Parameter(
4141
Mandatory = true,
42-
HelpMessage = "The resource group name of application security group.",
42+
HelpMessage = "The resource group name of the application security group.",
4343
ValueFromPipelineByPropertyName = true)]
4444
[ValidateNotNullOrEmpty]
4545
public string ResourceGroupName { get; set; }
4646

4747
[Alias("ResourceName")]
4848
[Parameter(
4949
Mandatory = true,
50-
HelpMessage = "The name of application security group.",
50+
HelpMessage = "The name of the application security group.",
5151
ValueFromPipelineByPropertyName = true)]
5252
[ValidateNotNullOrEmpty]
5353
public string Name { get; set; }

src/ResourceManager/Network/Commands.Network/ApplicationSecurityGroup/RemoveAzureRMApplicationSecurityGroupCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ public partial class RemoveAzureRmApplicationSecurityGroup : NetworkBaseCmdlet
3636
{
3737
[Parameter(
3838
Mandatory = true,
39-
HelpMessage = "The resource group name of application security group.",
39+
HelpMessage = "The resource group name of the application security group.",
4040
ValueFromPipelineByPropertyName = true)]
4141
[ValidateNotNullOrEmpty]
4242
public string ResourceGroupName { get; set; }
4343

4444
[Alias("ResourceName")]
4545
[Parameter(
4646
Mandatory = true,
47-
HelpMessage = "The name of application security group.",
47+
HelpMessage = "The name of the application security group.",
4848
ValueFromPipelineByPropertyName = true)]
4949
[ValidateNotNullOrEmpty]
5050
public string Name { get; set; }

src/ResourceManager/Network/Commands.Network/NetworkInterface/IpConfiguration/AzureNetworkInterfaceIpConfigBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ public class AzureNetworkInterfaceIpConfigBase : NetworkBaseCmdlet
118118
Mandatory = false,
119119
ValueFromPipelineByPropertyName = true,
120120
ParameterSetName = "SetByResourceId",
121-
HelpMessage = "ApplicationSecurityGroupId")]
121+
HelpMessage = "Specifies a collection of application security group references to which this network interface IP configuration belongs.")]
122122
public List<string> ApplicationSecurityGroupId { get; set; }
123123

124124
[Parameter(
125125
Mandatory = false,
126126
ValueFromPipelineByPropertyName = true,
127127
ParameterSetName = "SetByResource",
128-
HelpMessage = "ApplicationSecurityGroup")]
128+
HelpMessage = "Specifies a collection of application security group references to which this network interface IP configuration belongs.")]
129129
public List<PSApplicationSecurityGroup> ApplicationSecurityGroup { get; set; }
130130

131131
public override void Execute()

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

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,22 @@ The **Add-AzureRmNetworkInterfaceIpConfig** cmdlet adds a network interface IP c
4242

4343
## EXAMPLES
4444

45-
### 1:
45+
### Example 1: Add a new IP configuration with an application security group
4646
```
47+
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name MySubnet -AddressPrefix 10.0.1.0/24
48+
$vnet = New-AzureRmvirtualNetwork -Name MyVNET -ResourceGroupName MyResourceGroup -Location "West US" -AddressPrefix 10.0.0.0/16 -Subnet $subnet
4749
50+
$nic = New-AzureRmNetworkInterface -Name MyNetworkInterface -ResourceGroupName MyResourceGroup -Location "West US" -Subnet $vnet.Subnets[0]
51+
52+
$asg = New-AzureRmApplicationSecurityGroup -ResourceGroupName MyResourceGroup -Name MyASG -Location "West US"
53+
54+
$nic | Set-AzureRmNetworkInterfaceIpConfig -Name $nic.IpConfigurations[0].Name -Subnet $vnet.Subnets[0] -ApplicationSecurityGroup $asg | Set-AzureRmNetworkInterface
55+
56+
$nic | Add-AzureRmNetworkInterfaceIpConfig -Name MyNewIpConfig -Subnet $vnet.Subnets[0] -ApplicationSecurityGroup $asg | Set-AzureRmNetworkInterface
4857
```
4958

59+
In this example, we create a new network interface MyNetworkInterface that belongs to a subnet in the new virtual network MyVNET. We also create an empty application security group MyASG to associate with the IP configurations in the network interface. Once both objects are created, we link the default IP configuration to the MyASG object. At last, we create a new IP configuration in the network interface also linked to the application security group object.
60+
5061
## PARAMETERS
5162

5263
### -ApplicationGatewayBackendAddressPool
@@ -80,7 +91,9 @@ Accept wildcard characters: False
8091
```
8192
8293
### -ApplicationSecurityGroup
83-
PSApplicationSecurityGroup```yaml
94+
Specifies a collection of application security group references to which this network interface IP configuration belongs.
95+
96+
```yaml
8497
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]
8598
Parameter Sets: SetByResource
8699
Aliases:
@@ -93,7 +106,9 @@ Accept wildcard characters: False
93106
```
94107
95108
### -ApplicationSecurityGroupId
96-
ApplicationSecurityGroupId```yaml
109+
Specifies a collection of application security group references to which this network interface IP configuration belongs.
110+
111+
```yaml
97112
Type: System.Collections.Generic.List`1[System.String]
98113
Parameter Sets: SetByResourceId
99114
Aliases:
@@ -106,7 +121,9 @@ Accept wildcard characters: False
106121
```
107122
108123
### -DefaultProfile
109-
The credentials, account, tenant, and subscription used for communication with azure.```yaml
124+
The credentials, account, tenant, and subscription used for communication with azure.
125+
126+
```yaml
110127
Type: IAzureContextContainer
111128
Parameter Sets: (All)
112129
Aliases: AzureRmContext, AzureCredential

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

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ Add-AzureRmNetworkSecurityRuleConfig -Name rdp-rule -Description "Allow RDP" -Ac
5656

5757
The first command retrieves an Azure network security group named "nsg1" from resource group "rg1". The second command dds a network security rule named "rdp-rule" that allows traffic from internet on port 3389 to the retrieved network security group object. Persists the modified Azure network security group.
5858

59+
### 1: Adding a new security rule with application security groups
60+
```
61+
$srcAsg = New-AzureRmApplicationSecurityGroup -ResourceGroupName MyResourceGroup -Name srcAsg -Location "West US"
62+
$destAsg = New-AzureRmApplicationSecurityGroup -ResourceGroupName MyResourceGroup -Name destAsg -Location "West US"
63+
64+
Get-AzureRmNetworkSecurityGroup -Name nsg1 -ResourceGroupName rg1 |
65+
Add-AzureRmNetworkSecurityRuleConfig -Name rdp-rule -Description "Allow RDP" -Access
66+
Allow -Protocol Tcp -Direction Inbound -Priority 100 -SourceApplicationSecurityGroup
67+
$srcAsg -SourcePortRange * -DestinationApplicationSecurityGroup $destAsg -DestinationPortRange 3389 |
68+
Set-AzureRmNetworkSecurityGroup
69+
```
70+
71+
First, we create two new application security groups. Then, we retrieve an Azure network security group named "nsg1" from resource group "rg1". and add a network security rule named "rdp-rule" to it. The rule allows traffic from all the IP configurations in the application security group "srcAsg" to all the IP configurations in "destAsg" on port 3389. After adding the rule, we persist the modified Azure network security group.
72+
5973
## PARAMETERS
6074

6175
### -Access
@@ -76,7 +90,9 @@ Accept wildcard characters: False
7690
```
7791
7892
### -DefaultProfile
79-
The credentials, account, tenant, and subscription used for communication with azure.```yaml
93+
The credentials, account, tenant, and subscription used for communication with azure.
94+
95+
```yaml
8096
Type: IAzureContextContainer
8197
Parameter Sets: (All)
8298
Aliases: AzureRmContext, AzureCredential
@@ -126,7 +142,9 @@ Accept wildcard characters: False
126142
```
127143
128144
### -DestinationApplicationSecurityGroup
129-
The application security group set as destination for the rule. It cannot be used with 'DestinationAddressPrefix' parameter.```yaml
145+
The application security group set as destination for the rule. It cannot be used with 'DestinationAddressPrefix' parameter.
146+
147+
```yaml
130148
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]
131149
Parameter Sets: SetByResource
132150
Aliases:
@@ -139,7 +157,9 @@ Accept wildcard characters: False
139157
```
140158
141159
### -DestinationApplicationSecurityGroupId
142-
The application security group set as destination for the rule. It cannot be used with 'DestinationAddressPrefix' parameter.```yaml
160+
The application security group set as destination for the rule. It cannot be used with 'DestinationAddressPrefix' parameter.
161+
162+
```yaml
143163
Type: System.Collections.Generic.List`1[System.String]
144164
Parameter Sets: SetByResourceId
145165
Aliases:
@@ -282,7 +302,9 @@ Accept wildcard characters: False
282302
```
283303
284304
### -SourceApplicationSecurityGroup
285-
The application security group set as source for the rule. It cannot be used with 'SourceAddressPrefix' parameter.```yaml
305+
The application security group set as source for the rule. It cannot be used with 'SourceAddressPrefix' parameter.
306+
307+
```yaml
286308
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]
287309
Parameter Sets: SetByResource
288310
Aliases:
@@ -295,7 +317,9 @@ Accept wildcard characters: False
295317
```
296318
297319
### -SourceApplicationSecurityGroupId
298-
The application security group set as source for the rule. It cannot be used with 'SourceAddressPrefix' parameter.```yaml
320+
The application security group set as source for the rule. It cannot be used with 'SourceAddressPrefix' parameter.
321+
322+
```yaml
299323
Type: System.Collections.Generic.List`1[System.String]
300324
Parameter Sets: SetByResourceId
301325
Aliases:

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

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,34 @@ The **Get-AzureRmApplicationSecurityGroup** cmdlet gets an application security
2222

2323
## EXAMPLES
2424

25-
### Example 1
25+
### Example 1: Retrieve all application security groups.
2626
```
27-
PS C:\> Get-AzureRmApplicationSecurityGroup -Name "MyApplicationSecurityGroup" -ResourceGroup "MyResourceGroup"
27+
PS C:\> Get-AzureRmApplicationSecurityGroup
2828
```
2929

30-
The command above returns the application security group named as `MyApplicationSecurityGroup` that belongs to the resource group `MyResourceGroup`.
30+
The command above returns the all application security groups in the subscription.
31+
32+
### Example 2: Retrieve application security groups in a resource group.
33+
```
34+
PS C:\> Get-AzureRmApplicationSecurityGroup -ResourceGroupName MyResourceGroup
35+
```
36+
37+
The command above returns all application security groups that belong to the resource group MyResourceGroup.
38+
39+
### Example 3: Retrieve a specific application security group.
40+
```
41+
PS C:\> Get-AzureRmApplicationSecurityGroup -ResourceGroupName MyResourceGroup -Name MyApplicationSecurityGroup
42+
```
43+
44+
The command above returns the application security group MyApplicationSecurityGroup under the resource group MyResourceGroup.
45+
3146

3247
## PARAMETERS
3348

3449
### -DefaultProfile
35-
The credentials, account, tenant, and subscription used for communication with azure.```yaml
50+
The credentials, account, tenant, and subscription used for communication with azure.
51+
52+
```yaml
3653
Type: IAzureContextContainer
3754
Parameter Sets: (All)
3855
Aliases: AzureRmContext, AzureCredential

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ The first command gets an existing network interface called mynic and stores it
3636
## PARAMETERS
3737

3838
### -DefaultProfile
39-
The credentials, account, tenant, and subscription used for communication with azure.```yaml
39+
The credentials, account, tenant, and subscription used for communication with azure.
40+
41+
```yaml
4042
Type: IAzureContextContainer
4143
Parameter Sets: (All)
4244
Aliases: AzureRmContext, AzureCredential

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ This command retrieves user defined rule named "rdp-rule" from Azure network sec
4242
## PARAMETERS
4343

4444
### -DefaultProfile
45-
The credentials, account, tenant, and subscription used for communication with azure.```yaml
45+
The credentials, account, tenant, and subscription used for communication with azure.
46+
47+
```yaml
4648
Type: IAzureContextContainer
4749
Parameter Sets: (All)
4850
Aliases: AzureRmContext, AzureCredential

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ The **New-AzureRmApplicationSecurityGroup** cmdlet creates an application securi
2828
PS C:\> New-AzureRmPublicIpAddress -ResourceGroupName "MyResourceGroup" -Name "MyApplicationSecurityGroup" -Location "West US"
2929
```
3030

31-
This example creates an application security group with no associations. Once it is created, IP configurations in the network interface can be included in the group. Security rules may refer to the group as its source or destination.
31+
This example creates an application security group with no associations. Once it is created, IP configurations in the network interface can be included in the group. Security rules may also refer to the group as their sources or destinations.
3232

3333
## PARAMETERS
3434

3535
### -DefaultProfile
36-
The credentials, account, tenant, and subscription used for communication with azure.```yaml
36+
The credentials, account, tenant, and subscription used for communication with azure.
37+
38+
```yaml
3739
Type: IAzureContextContainer
3840
Parameter Sets: (All)
3941
Aliases: AzureRmContext, AzureCredential
@@ -46,7 +48,7 @@ Accept wildcard characters: False
4648
```
4749
4850
### -Force
49-
Do not ask for confirmation if you want to overwrite a resource
51+
Do not ask for confirmation if you want to overwrite a resource.
5052
5153
```yaml
5254
Type: SwitchParameter
@@ -76,7 +78,7 @@ Accept wildcard characters: False
7678
```
7779
7880
### -Name
79-
The name of application security group.
81+
The name of the application security group.
8082
8183
```yaml
8284
Type: String
@@ -91,7 +93,7 @@ Accept wildcard characters: False
9193
```
9294
9395
### -ResourceGroupName
94-
The resource group name of application security group.
96+
The resource group name of the application security group.
9597
9698
```yaml
9799
Type: String

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ Accept wildcard characters: False
122122
```
123123
124124
### -ApplicationSecurityGroup
125-
ApplicationSecurityGroup```yaml
125+
Specifies a collection of application security group references to which the network interface IP configuration should belong to.
126+
127+
```yaml
126128
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]
127129
Parameter Sets: SetByResource
128130
Aliases:
@@ -135,7 +137,9 @@ Accept wildcard characters: False
135137
```
136138
137139
### -ApplicationSecurityGroupId
138-
ApplicationSecurityGroupId```yaml
140+
Specifies a collection of application security group references to which the network interface IP configuration should belong to.
141+
142+
```yaml
139143
Type: System.Collections.Generic.List`1[System.String]
140144
Parameter Sets: SetByResourceId
141145
Aliases:
@@ -148,7 +152,9 @@ Accept wildcard characters: False
148152
```
149153
150154
### -DefaultProfile
151-
The credentials, account, tenant, and subscription used for communication with azure.```yaml
155+
The credentials, account, tenant, and subscription used for communication with azure.
156+
157+
```yaml
152158
Type: IAzureContextContainer
153159
Parameter Sets: (All)
154160
Aliases: AzureRmContext, AzureCredential

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ Accept wildcard characters: False
109109
```
110110
111111
### -ApplicationSecurityGroup
112-
PSApplicationSecurityGroup```yaml
112+
Specifies a collection of application security group references to which this network interface IP configuration belongs.
113+
114+
```yaml
113115
Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationSecurityGroup]
114116
Parameter Sets: SetByResource
115117
Aliases:
@@ -122,7 +124,9 @@ Accept wildcard characters: False
122124
```
123125
124126
### -ApplicationSecurityGroupId
125-
ApplicationSecurityGroupId```yaml
127+
Specifies a collection of application security group references to which this network interface IP configuration belongs.
128+
129+
```yaml
126130
Type: System.Collections.Generic.List`1[System.String]
127131
Parameter Sets: SetByResourceId
128132
Aliases:
@@ -135,7 +139,9 @@ Accept wildcard characters: False
135139
```
136140
137141
### -DefaultProfile
138-
The credentials, account, tenant, and subscription used for communication with azure.```yaml
142+
The credentials, account, tenant, and subscription used for communication with azure.
143+
144+
```yaml
139145
Type: IAzureContextContainer
140146
Parameter Sets: (All)
141147
Aliases: AzureRmContext, AzureCredential

0 commit comments

Comments
 (0)