Skip to content

Commit 27d946a

Browse files
authored
Merge pull request #4305 from akshaysngupta/preview
Bug: Missing hostname parameter
2 parents 6f6af4f + f0a4697 commit 27d946a

11 files changed

+92
-34
lines changed

src/ResourceManager/Network/Commands.Network/ApplicationGateway/BackendHttpSettings/AzureApplicationGatewayBackendHttpSettingsBase.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ public class AzureApplicationGatewayBackendHttpSettingsBase : NetworkBaseCmdlet
8282
HelpMessage = "Flag if host header should be picked from the host name of the backend server.")]
8383
public SwitchParameter PickHostNameFromBackendAddress { get; set; }
8484

85+
[Parameter(
86+
Mandatory = false,
87+
HelpMessage = "Sets host header to be sent to the backend servers.")]
88+
public string HostName { get; set; }
89+
8590
[Parameter(
8691
Mandatory = false,
8792
HelpMessage = "Cookie name to use for the affinity cookie")]
@@ -148,6 +153,10 @@ public PSApplicationGatewayBackendHttpSettings NewObject()
148153
{
149154
backendHttpSettings.PickHostNameFromBackendAddress = true;
150155
}
156+
if(this.HostName != null)
157+
{
158+
backendHttpSettings.HostName = this.HostName;
159+
}
151160
if (this.AffinityCookieName != null)
152161
{
153162
backendHttpSettings.AffinityCookieName = this.AffinityCookieName;

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Adds back-end HTTP settings to an application gateway.
1313

1414
```
1515
Add-AzureRmApplicationGatewayBackendHttpSettings -ApplicationGateway <PSApplicationGateway> -Name <String>
16-
-Port <Int32> -Protocol <String> -CookieBasedAffinity <String> [-RequestTimeout <UInt32>]
16+
-Port <Int32> -Protocol <String> -CookieBasedAffinity <String> [-RequestTimeout <Int32>]
1717
[-ConnectionDraining <PSApplicationGatewayConnectionDraining>] [-ProbeId <String>]
1818
[-Probe <PSApplicationGatewayProbe>]
1919
[-AuthenticationCertificates <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate]>]
20-
[-PickHostNameFromBackendAddress] [-AffinityCookieName <String>] [-ProbeEnabled] [-Path <String>]
21-
[<CommonParameters>]
20+
[-PickHostNameFromBackendAddress] [-HostName <String>] [-AffinityCookieName <String>] [-ProbeEnabled]
21+
[-Path <String>] [<CommonParameters>]
2222
```
2323

2424
## DESCRIPTION
@@ -115,6 +115,21 @@ Accept pipeline input: False
115115
Accept wildcard characters: False
116116
```
117117
118+
### -HostName
119+
Sets host header to be sent to the backend servers.
120+
121+
```yaml
122+
Type: String
123+
Parameter Sets: (All)
124+
Aliases:
125+
126+
Required: False
127+
Position: Named
128+
Default value: None
129+
Accept pipeline input: False
130+
Accept wildcard characters: False
131+
```
132+
118133
### -Name
119134
Specifies the name of the back-end HTTP settings which this cmdlet adds.
120135
@@ -242,7 +257,7 @@ Accept wildcard characters: False
242257
Specifies the request time-out value.
243258
244259
```yaml
245-
Type: UInt32
260+
Type: Int32
246261
Parameter Sets: (All)
247262
Aliases:
248263

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Adds a health probe to an Application Gateway.
1313

1414
```
1515
Add-AzureRmApplicationGatewayProbeConfig -ApplicationGateway <PSApplicationGateway> -Name <String>
16-
-Protocol <String> [-HostName <String>] -Path <String> -Interval <UInt32> -Timeout <UInt32>
17-
-UnhealthyThreshold <UInt32> [-PickHostNameFromBackendHttpSettings] [-MinServers <UInt32>]
16+
-Protocol <String> [-HostName <String>] -Path <String> -Interval <Int32> -Timeout <Int32>
17+
-UnhealthyThreshold <Int32> [-PickHostNameFromBackendHttpSettings] [-MinServers <Int32>]
1818
[-Match <PSApplicationGatewayProbeHealthResponseMatch>] [<CommonParameters>]
1919
```
2020

@@ -69,7 +69,7 @@ This is the time interval between two consecutive probes.
6969
This value is between 1 second and 86400 seconds.
7070
7171
```yaml
72-
Type: UInt32
72+
Type: Int32
7373
Parameter Sets: (All)
7474
Aliases:
7575

@@ -101,7 +101,7 @@ Minimum number of servers that are always marked healthy.
101101
Default value is 0
102102
103103
```yaml
104-
Type: UInt32
104+
Type: Int32
105105
Parameter Sets: (All)
106106
Aliases:
107107

@@ -183,7 +183,7 @@ This cmdlet marks the probe as failed if a valid response is not received with t
183183
Valid values are between 1 second and 86400 seconds.
184184
185185
```yaml
186-
Type: UInt32
186+
Type: Int32
187187
Parameter Sets: (All)
188188
Aliases:
189189

@@ -200,7 +200,7 @@ The backend server is marked down after consecutive probe failure count reaches
200200
Valid values are between 1 second and 20 seconds.
201201
202202
```yaml
203-
Type: UInt32
203+
Type: Int32
204204
Parameter Sets: (All)
205205
Aliases:
206206

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Creates back-end HTTP settings for an application gateway.
1313

1414
```
1515
New-AzureRmApplicationGatewayBackendHttpSettings -Name <String> -Port <Int32> -Protocol <String>
16-
-CookieBasedAffinity <String> [-RequestTimeout <UInt32>]
16+
-CookieBasedAffinity <String> [-RequestTimeout <Int32>]
1717
[-ConnectionDraining <PSApplicationGatewayConnectionDraining>] [-ProbeId <String>]
1818
[-Probe <PSApplicationGatewayProbe>]
1919
[-AuthenticationCertificates <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate]>]
20-
[-PickHostNameFromBackendAddress] [-AffinityCookieName <String>] [-ProbeEnabled] [-Path <String>]
21-
[<CommonParameters>]
20+
[-PickHostNameFromBackendAddress] [-HostName <String>] [-AffinityCookieName <String>] [-ProbeEnabled]
21+
[-Path <String>] [<CommonParameters>]
2222
```
2323

2424
## DESCRIPTION
@@ -98,6 +98,21 @@ Accept pipeline input: False
9898
Accept wildcard characters: False
9999
```
100100
101+
### -HostName
102+
Sets host header to be sent to the backend servers.
103+
104+
```yaml
105+
Type: String
106+
Parameter Sets: (All)
107+
Aliases:
108+
109+
Required: False
110+
Position: Named
111+
Default value: None
112+
Accept pipeline input: False
113+
Accept wildcard characters: False
114+
```
115+
101116
### -Name
102117
Specifies the name of the back-end HTTP settings that this cmdlet creates.
103118
@@ -225,7 +240,7 @@ Accept wildcard characters: False
225240
Specifies a request time-out value.
226241
227242
```yaml
228-
Type: UInt32
243+
Type: Int32
229244
Parameter Sets: (All)
230245
Aliases:
231246

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Creates a new connection draining configuration for back-end HTTP settings.
1212
## SYNTAX
1313

1414
```
15-
New-AzureRmApplicationGatewayConnectionDraining -Enabled <Boolean> -DrainTimeoutInSec <UInt32>
15+
New-AzureRmApplicationGatewayConnectionDraining -Enabled <Boolean> -DrainTimeoutInSec <Int32>
1616
[<CommonParameters>]
1717
```
1818

@@ -35,7 +35,7 @@ The number of seconds connection draining is active.
3535
Acceptable values are from 1 second to 3600 seconds.
3636

3737
```yaml
38-
Type: UInt32
38+
Type: Int32
3939
Parameter Sets: (All)
4040
Aliases:
4141

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Creates a health probe.
1313

1414
```
1515
New-AzureRmApplicationGatewayProbeConfig -Name <String> -Protocol <String> [-HostName <String>] -Path <String>
16-
-Interval <UInt32> -Timeout <UInt32> -UnhealthyThreshold <UInt32> [-PickHostNameFromBackendHttpSettings]
17-
[-MinServers <UInt32>] [-Match <PSApplicationGatewayProbeHealthResponseMatch>] [<CommonParameters>]
16+
-Interval <Int32> -Timeout <Int32> -UnhealthyThreshold <Int32> [-PickHostNameFromBackendHttpSettings]
17+
[-MinServers <Int32>] [-Match <PSApplicationGatewayProbeHealthResponseMatch>] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -52,7 +52,7 @@ This is the time interval between two consecutive probes.
5252
This value is between 1 second and 86400 seconds.
5353
5454
```yaml
55-
Type: UInt32
55+
Type: Int32
5656
Parameter Sets: (All)
5757
Aliases:
5858

@@ -84,7 +84,7 @@ Minimum number of servers that are always marked healthy.
8484
Default value is 0
8585
8686
```yaml
87-
Type: UInt32
87+
Type: Int32
8888
Parameter Sets: (All)
8989
Aliases:
9090

@@ -165,7 +165,7 @@ This cmdlet marks the probe as failed if a valid response is not received with t
165165
Valid values are between 1 second and 86400 seconds.
166166
167167
```yaml
168-
Type: UInt32
168+
Type: Int32
169169
Parameter Sets: (All)
170170
Aliases:
171171

@@ -182,7 +182,7 @@ The backend server is marked down after consecutive probe failure count reaches
182182
Valid values are between 1 second and 20 seconds.
183183
184184
```yaml
185-
Type: UInt32
185+
Type: Int32
186186
Parameter Sets: (All)
187187
Aliases:
188188

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Minimum version of Ssl protocol to be supported on application gateway
7676
Type: String
7777
Parameter Sets: (All)
7878
Aliases:
79+
Accepted values: TLSv1_0, TLSv1_1, TLSv1_2
7980

8081
Required: False
8182
Position: Named
@@ -106,6 +107,7 @@ Type of Ssl Policy
106107
Type: String
107108
Parameter Sets: (All)
108109
Aliases:
110+
Accepted values: Predefined, Custom
109111

110112
Required: False
111113
Position: Named

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Updates back-end HTTP settings for an application gateway.
1313

1414
```
1515
Set-AzureRmApplicationGatewayBackendHttpSettings -ApplicationGateway <PSApplicationGateway> -Name <String>
16-
-Port <Int32> -Protocol <String> -CookieBasedAffinity <String> [-RequestTimeout <UInt32>]
16+
-Port <Int32> -Protocol <String> -CookieBasedAffinity <String> [-RequestTimeout <Int32>]
1717
[-ConnectionDraining <PSApplicationGatewayConnectionDraining>] [-ProbeId <String>]
1818
[-Probe <PSApplicationGatewayProbe>]
1919
[-AuthenticationCertificates <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate]>]
20-
[-PickHostNameFromBackendAddress] [-AffinityCookieName <String>] [-ProbeEnabled] [-Path <String>]
21-
[<CommonParameters>]
20+
[-PickHostNameFromBackendAddress] [-HostName <String>] [-AffinityCookieName <String>] [-ProbeEnabled]
21+
[-Path <String>] [<CommonParameters>]
2222
```
2323

2424
## DESCRIPTION
@@ -116,6 +116,21 @@ Accept pipeline input: False
116116
Accept wildcard characters: False
117117
```
118118
119+
### -HostName
120+
Sets host header to be sent to the backend servers.
121+
122+
```yaml
123+
Type: String
124+
Parameter Sets: (All)
125+
Aliases:
126+
127+
Required: False
128+
Position: Named
129+
Default value: None
130+
Accept pipeline input: False
131+
Accept wildcard characters: False
132+
```
133+
119134
### -Name
120135
Specifies the name of the back-end HTTP settings object.
121136
@@ -244,7 +259,7 @@ Accept wildcard characters: False
244259
Specifies a request time-out value.
245260
246261
```yaml
247-
Type: UInt32
262+
Type: Int32
248263
Parameter Sets: (All)
249264
Aliases:
250265

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Modifies the connection draining configuration of a back-end HTTP settings objec
1313

1414
```
1515
Set-AzureRmApplicationGatewayConnectionDraining -BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
16-
-Enabled <Boolean> -DrainTimeoutInSec <UInt32> [<CommonParameters>]
16+
-Enabled <Boolean> -DrainTimeoutInSec <Int32> [<CommonParameters>]
1717
```
1818

1919
## DESCRIPTION
@@ -54,7 +54,7 @@ The number of seconds connection draining is active.
5454
Acceptable values are from 1 second to 3600 seconds.
5555
5656
```yaml
57-
Type: UInt32
57+
Type: Int32
5858
Parameter Sets: (All)
5959
Aliases:
6060

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Sets the health probe configuration on an existing Application Gateway.
1313

1414
```
1515
Set-AzureRmApplicationGatewayProbeConfig -ApplicationGateway <PSApplicationGateway> -Name <String>
16-
-Protocol <String> [-HostName <String>] -Path <String> -Interval <UInt32> -Timeout <UInt32>
17-
-UnhealthyThreshold <UInt32> [-PickHostNameFromBackendHttpSettings] [-MinServers <UInt32>]
16+
-Protocol <String> [-HostName <String>] -Path <String> -Interval <Int32> -Timeout <Int32>
17+
-UnhealthyThreshold <Int32> [-PickHostNameFromBackendHttpSettings] [-MinServers <Int32>]
1818
[-Match <PSApplicationGatewayProbeHealthResponseMatch>] [<CommonParameters>]
1919
```
2020

@@ -69,7 +69,7 @@ This is the time interval between two consecutive probes.
6969
This value is between 1 second and 86400 seconds.
7070
7171
```yaml
72-
Type: UInt32
72+
Type: Int32
7373
Parameter Sets: (All)
7474
Aliases:
7575

@@ -101,7 +101,7 @@ Minimum number of servers that are always marked healthy.
101101
Default value is 0
102102
103103
```yaml
104-
Type: UInt32
104+
Type: Int32
105105
Parameter Sets: (All)
106106
Aliases:
107107

@@ -182,7 +182,7 @@ This cmdlet marks the probe as failed if a valid response is not received with t
182182
Valid values are between 1 second and 86400 seconds.
183183
184184
```yaml
185-
Type: UInt32
185+
Type: Int32
186186
Parameter Sets: (All)
187187
Aliases:
188188

@@ -199,7 +199,7 @@ The backend server is marked down after consecutive probe failure count reaches
199199
Valid values are between 1 second and 20 seconds.
200200
201201
```yaml
202-
Type: UInt32
202+
Type: Int32
203203
Parameter Sets: (All)
204204
Aliases:
205205

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Minimum version of Ssl protocol to be supported on application gateway
9494
Type: String
9595
Parameter Sets: (All)
9696
Aliases:
97+
Accepted values: TLSv1_0, TLSv1_1, TLSv1_2
9798

9899
Required: False
99100
Position: Named
@@ -124,6 +125,7 @@ Type of Ssl Policy
124125
Type: String
125126
Parameter Sets: (All)
126127
Aliases:
128+
Accepted values: Predefined, Custom
127129

128130
Required: False
129131
Position: Named

0 commit comments

Comments
 (0)