Skip to content

Commit 74c2032

Browse files
added new properties to application gateway
1 parent 8011544 commit 74c2032

11 files changed

+136
-0
lines changed

src/Network/Network/ApplicationGateway/BackendSettings/AzureApplicationGatewayBackendSettingsBase.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ public class AzureApplicationGatewayBackendSettingsBase : NetworkBaseCmdlet
7474
HelpMessage = "Sets host header to be sent to the backend servers.")]
7575
public string HostName { get; set; }
7676

77+
[Parameter(
78+
Mandatory = false,
79+
HelpMessage = "Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false.")]
80+
public bool? EnableL4ClientIpPreservation { get; set; }
81+
7782
public override void ExecuteCmdlet()
7883
{
7984
base.ExecuteCmdlet();
@@ -123,6 +128,16 @@ public PSApplicationGatewayBackendSettings NewObject()
123128
backendSettings.PickHostNameFromBackendAddress = true;
124129
}
125130

131+
if (this.EnableL4ClientIpPreservation.HasValue)
132+
{
133+
backendSettings.EnableL4ClientIpPreservation = this.EnableL4ClientIpPreservation.Value;
134+
}
135+
else
136+
{
137+
// Default value is false according to the API specification
138+
backendSettings.EnableL4ClientIpPreservation = false;
139+
}
140+
126141
if(this.HostName != null)
127142
{
128143
backendSettings.HostName = this.HostName;

src/Network/Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ public class AzureApplicationGatewayProbeConfigBase : NetworkBaseCmdlet
8080
[ValidateRange(1, 65535)]
8181
public int Port { get; set; }
8282

83+
[Parameter(
84+
Mandatory = false,
85+
HelpMessage = "Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false.")]
86+
public bool? EnableProbeProxyProtocolHeader { get; set; }
87+
8388
[Parameter(
8489
Mandatory = false,
8590
HelpMessage = "Body that must be contained in the health response. Default value is empty")]
@@ -107,6 +112,16 @@ public PSApplicationGatewayProbe NewObject()
107112
probe.Port = this.Port;
108113
}
109114

115+
if (this.EnableProbeProxyProtocolHeader.HasValue)
116+
{
117+
probe.EnableProbeProxyProtocolHeader = this.EnableProbeProxyProtocolHeader.Value;
118+
}
119+
else
120+
{
121+
// Default value is false according to the API specification
122+
probe.EnableProbeProxyProtocolHeader = false;
123+
}
124+
110125
probe.Id =
111126
ApplicationGatewayChildResourceHelper.GetResourceNotSetId(
112127
this.NetworkClient.NetworkManagementClient.SubscriptionId,

src/Network/Network/ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
- Added `-AuthenticationType` and `-CertificateAuthentication` parameters to `New-AzVirtualNetworkGatewayConnection` and `Set-AzVirtualNetworkGatewayConnection`
2525
- Added `-UserAssignedIdentityId` parameter to `Set-AzVirtualNetworkGateway` and `New-AzVirtualNetworkGateway` for managed identity configuration
2626
* Upgraded the api version from 2024-10-01 to 2025-01-01
27+
* Added property 'EnableL4ClientIpPreservation' to Application Gateway Backend Settings, as well as support for them in the following cmdlets:
28+
- `New-AzApplicationGatewayBackendSetting`
29+
- `Add-AzApplicationGatewayBackendSetting`
30+
- `Set-AzApplicationGatewayBackendSetting`
31+
* Added property 'EnableProbeProxyProtocolHeader' to Application Gateway Probes, as well as support for them in the following cmdlets:
32+
- `Set-AzApplicationGatewayProbeConfig`
33+
- `Add-AzApplicationGatewayProbeConfig`
34+
- `New-AzApplicationGatewayProbeConfig`
2735

2836
## Version 7.21.0
2937
- Added deprecation warning for cmdlet `Invoke-AzFirewallPacketCapture`

src/Network/Network/Models/PSApplicationGatewayBackendSettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public class PSApplicationGatewayBackendSettings : PSChildResource
3535
[Ps1Xml(Target = ViewControl.Table)]
3636
public bool? PickHostNameFromBackendAddress { get; set; }
3737
[Ps1Xml(Target = ViewControl.Table)]
38+
public bool? EnableL4ClientIpPreservation { get; set; }
39+
[Ps1Xml(Target = ViewControl.Table)]
3840
public string ProvisioningState { get; set; }
3941
public string Type { get; set; }
4042

src/Network/Network/Models/PSApplicationGatewayProbe.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public class PSApplicationGatewayProbe : PSChildResource
3838
public int? MinServers { get; set; }
3939
[Ps1Xml(Target = ViewControl.Table)]
4040
public int? Port { get; set; }
41+
[Ps1Xml(Target = ViewControl.Table)]
42+
public bool? EnableProbeProxyProtocolHeader { get; set; }
4143
public PSApplicationGatewayProbeHealthResponseMatch Match { get; set; }
4244
[Ps1Xml(Target = ViewControl.Table)]
4345
public string ProvisioningState { get; set; }

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Add-AzApplicationGatewayBackendSetting -ApplicationGateway <PSApplicationGateway
1717
-Protocol <String> [-Timeout <Int32>] [-ProbeId <String>] [-Probe <PSApplicationGatewayProbe>]
1818
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>] [-PickHostNameFromBackendAddress]
1919
[-HostName <String>] [-DefaultProfile <IAzureContextContainer>]
20+
[-EnableL4ClientIpPreservation <Boolean>]
2021
[<CommonParameters>]
2122
```
2223

@@ -202,6 +203,20 @@ Default value: None
202203
Accept pipeline input: False
203204
Accept wildcard characters: False
204205
```
206+
### -EnableL4ClientIpPreservation
207+
Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false.
208+
209+
```yaml
210+
Type: System.Boolean
211+
Parameter Sets: (All)
212+
Aliases:
213+
214+
Required: False
215+
Position: Named
216+
Default value: False
217+
Accept pipeline input: False
218+
Accept wildcard characters: False
219+
```
205220
206221
### CommonParameters
207222
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).

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Add-AzApplicationGatewayProbeConfig -ApplicationGateway <PSApplicationGateway> -
1717
-Protocol <String> [-HostName <String>] [-Path <String>] -Interval <Int32> -Timeout <Int32>
1818
-UnhealthyThreshold <Int32> [-PickHostNameFromBackendHttpSettings] [-MinServers <Int32>] [-Port <Int32>]
1919
[-Match <PSApplicationGatewayProbeHealthResponseMatch>] [-DefaultProfile <IAzureContextContainer>]
20+
[-EnableProbeProxyProtocolHeader <Boolean>]
2021
[<CommonParameters>]
2122
```
2223

@@ -177,6 +178,21 @@ Accept pipeline input: False
177178
Accept wildcard characters: False
178179
```
179180
181+
### -EnableProbeProxyProtocolHeader
182+
Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false.
183+
184+
```yaml
185+
Type: System.Boolean
186+
Parameter Sets: (All)
187+
Aliases:
188+
189+
Required: False
190+
Position: Named
191+
Default value: False
192+
Accept pipeline input: False
193+
Accept wildcard characters: False
194+
```
195+
180196
### -Port
181197
Port that is used for probing the backend server
182198

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ New-AzApplicationGatewayBackendSetting -Name <String> -Port <Int32> -Protocol <S
1717
[-ProbeId <String>] [-Probe <PSApplicationGatewayProbe>]
1818
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>] [-PickHostNameFromBackendAddress]
1919
[-HostName <String>] [-DefaultProfile <IAzureContextContainer>]
20+
[-EnableL4ClientIpPreservation <Boolean>]
2021
[<CommonParameters>]
2122
```
2223

@@ -188,6 +189,21 @@ Accept pipeline input: False
188189
Accept wildcard characters: False
189190
```
190191
192+
### -EnableL4ClientIpPresrevation
193+
Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false.
194+
195+
```yaml
196+
Type: System.Boolean
197+
Parameter Sets: (All)
198+
Aliases:
199+
200+
Required: False
201+
Position: Named
202+
Default value: False
203+
Accept pipeline input: False
204+
Accept wildcard characters: False
205+
```
206+
191207
### CommonParameters
192208
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).
193209

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Creates a health probe.
1616
New-AzApplicationGatewayProbeConfig -Name <String> -Protocol <String> [-HostName <String>] [-Path <String>]
1717
-Interval <Int32> -Timeout <Int32> -UnhealthyThreshold <Int32> [-PickHostNameFromBackendHttpSettings]
1818
[-MinServers <Int32>] [-Port <Int32>] [-Match <PSApplicationGatewayProbeHealthResponseMatch>]
19+
[-EnableProbeProxyProtocolHeader <Boolean>]
1920
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2021
```
2122

@@ -219,6 +220,21 @@ Accept pipeline input: False
219220
Accept wildcard characters: False
220221
```
221222
223+
### -EnableProbeProxyProtocolHeader
224+
Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false.
225+
226+
```yaml
227+
Type: System.Boolean
228+
Parameter Sets: (All)
229+
Aliases:
230+
231+
Required: False
232+
Position: Named
233+
Default value: False
234+
Accept pipeline input: False
235+
Accept wildcard characters: False
236+
```
237+
222238
### -UnhealthyThreshold
223239
Specifies the probe retry count.
224240
The backend server is marked down after consecutive probe failure count reaches the unhealthy threshold.

src/Network/Network/help/Set-AzApplicationGatewayBackendSetting.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Set-AzApplicationGatewayBackendSetting -ApplicationGateway <PSApplicationGateway
1717
-Protocol <String> [-Timeout <Int32>] [-ProbeId <String>] [-Probe <PSApplicationGatewayProbe>]
1818
[-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>] [-PickHostNameFromBackendAddress]
1919
[-HostName <String>] [-DefaultProfile <IAzureContextContainer>]
20+
[-EnableL4ClientIpPreservation <Boolean>]
2021
[<CommonParameters>]
2122
```
2223

@@ -203,6 +204,20 @@ Default value: None
203204
Accept pipeline input: False
204205
Accept wildcard characters: False
205206
```
207+
### -EnableL4ClientIpPreservation
208+
Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false.
209+
210+
```yaml
211+
Type: System.Boolean
212+
Parameter Sets: (All)
213+
Aliases:
214+
215+
Required: False
216+
Position: Named
217+
Default value: False
218+
Accept pipeline input: False
219+
Accept wildcard characters: False
220+
```
206221
207222
### CommonParameters
208223
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).

0 commit comments

Comments
 (0)