From 74c2032d2df3ce7e77bb32e66cf238e7c46566c7 Mon Sep 17 00:00:00 2001 From: Akshi Mittal Date: Tue, 14 Oct 2025 12:47:28 +0530 Subject: [PATCH 1/2] added new properties to application gateway --- ...AzureApplicationGatewayBackendSettingsBase.cs | 15 +++++++++++++++ .../AzureApplicationGatewayProbeConfigBase.cs | 15 +++++++++++++++ src/Network/Network/ChangeLog.md | 8 ++++++++ .../PSApplicationGatewayBackendSettings.cs | 2 ++ .../Network/Models/PSApplicationGatewayProbe.cs | 2 ++ .../Add-AzApplicationGatewayBackendSetting.md | 15 +++++++++++++++ .../help/Add-AzApplicationGatewayProbeConfig.md | 16 ++++++++++++++++ .../New-AzApplicationGatewayBackendSetting.md | 16 ++++++++++++++++ .../help/New-AzApplicationGatewayProbeConfig.md | 16 ++++++++++++++++ .../Set-AzApplicationGatewayBackendSetting.md | 15 +++++++++++++++ .../help/Set-AzApplicationGatewayProbeConfig.md | 16 ++++++++++++++++ 11 files changed, 136 insertions(+) diff --git a/src/Network/Network/ApplicationGateway/BackendSettings/AzureApplicationGatewayBackendSettingsBase.cs b/src/Network/Network/ApplicationGateway/BackendSettings/AzureApplicationGatewayBackendSettingsBase.cs index 8fcddca22bd1..297c4575f9f6 100644 --- a/src/Network/Network/ApplicationGateway/BackendSettings/AzureApplicationGatewayBackendSettingsBase.cs +++ b/src/Network/Network/ApplicationGateway/BackendSettings/AzureApplicationGatewayBackendSettingsBase.cs @@ -74,6 +74,11 @@ public class AzureApplicationGatewayBackendSettingsBase : NetworkBaseCmdlet HelpMessage = "Sets host header to be sent to the backend servers.")] public string HostName { get; set; } + [Parameter( + Mandatory = false, + HelpMessage = "Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false.")] + public bool? EnableL4ClientIpPreservation { get; set; } + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); @@ -123,6 +128,16 @@ public PSApplicationGatewayBackendSettings NewObject() backendSettings.PickHostNameFromBackendAddress = true; } + if (this.EnableL4ClientIpPreservation.HasValue) + { + backendSettings.EnableL4ClientIpPreservation = this.EnableL4ClientIpPreservation.Value; + } + else + { + // Default value is false according to the API specification + backendSettings.EnableL4ClientIpPreservation = false; + } + if(this.HostName != null) { backendSettings.HostName = this.HostName; diff --git a/src/Network/Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs b/src/Network/Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs index 2fa43bcb8e46..16329245dd96 100644 --- a/src/Network/Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs +++ b/src/Network/Network/ApplicationGateway/Probe/AzureApplicationGatewayProbeConfigBase.cs @@ -80,6 +80,11 @@ public class AzureApplicationGatewayProbeConfigBase : NetworkBaseCmdlet [ValidateRange(1, 65535)] public int Port { get; set; } + [Parameter( + Mandatory = false, + HelpMessage = "Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false.")] + public bool? EnableProbeProxyProtocolHeader { get; set; } + [Parameter( Mandatory = false, HelpMessage = "Body that must be contained in the health response. Default value is empty")] @@ -107,6 +112,16 @@ public PSApplicationGatewayProbe NewObject() probe.Port = this.Port; } + if (this.EnableProbeProxyProtocolHeader.HasValue) + { + probe.EnableProbeProxyProtocolHeader = this.EnableProbeProxyProtocolHeader.Value; + } + else + { + // Default value is false according to the API specification + probe.EnableProbeProxyProtocolHeader = false; + } + probe.Id = ApplicationGatewayChildResourceHelper.GetResourceNotSetId( this.NetworkClient.NetworkManagementClient.SubscriptionId, diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index 24eac613106b..27c0c5091c6c 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -24,6 +24,14 @@ - Added `-AuthenticationType` and `-CertificateAuthentication` parameters to `New-AzVirtualNetworkGatewayConnection` and `Set-AzVirtualNetworkGatewayConnection` - Added `-UserAssignedIdentityId` parameter to `Set-AzVirtualNetworkGateway` and `New-AzVirtualNetworkGateway` for managed identity configuration * Upgraded the api version from 2024-10-01 to 2025-01-01 +* Added property 'EnableL4ClientIpPreservation' to Application Gateway Backend Settings, as well as support for them in the following cmdlets: + - `New-AzApplicationGatewayBackendSetting` + - `Add-AzApplicationGatewayBackendSetting` + - `Set-AzApplicationGatewayBackendSetting` +* Added property 'EnableProbeProxyProtocolHeader' to Application Gateway Probes, as well as support for them in the following cmdlets: + - `Set-AzApplicationGatewayProbeConfig` + - `Add-AzApplicationGatewayProbeConfig` + - `New-AzApplicationGatewayProbeConfig` ## Version 7.21.0 - Added deprecation warning for cmdlet `Invoke-AzFirewallPacketCapture` diff --git a/src/Network/Network/Models/PSApplicationGatewayBackendSettings.cs b/src/Network/Network/Models/PSApplicationGatewayBackendSettings.cs index 27d937ae32d7..7439436db9cb 100644 --- a/src/Network/Network/Models/PSApplicationGatewayBackendSettings.cs +++ b/src/Network/Network/Models/PSApplicationGatewayBackendSettings.cs @@ -35,6 +35,8 @@ public class PSApplicationGatewayBackendSettings : PSChildResource [Ps1Xml(Target = ViewControl.Table)] public bool? PickHostNameFromBackendAddress { get; set; } [Ps1Xml(Target = ViewControl.Table)] + public bool? EnableL4ClientIpPreservation { get; set; } + [Ps1Xml(Target = ViewControl.Table)] public string ProvisioningState { get; set; } public string Type { get; set; } diff --git a/src/Network/Network/Models/PSApplicationGatewayProbe.cs b/src/Network/Network/Models/PSApplicationGatewayProbe.cs index 900f4af6d403..00465b11fde4 100644 --- a/src/Network/Network/Models/PSApplicationGatewayProbe.cs +++ b/src/Network/Network/Models/PSApplicationGatewayProbe.cs @@ -38,6 +38,8 @@ public class PSApplicationGatewayProbe : PSChildResource public int? MinServers { get; set; } [Ps1Xml(Target = ViewControl.Table)] public int? Port { get; set; } + [Ps1Xml(Target = ViewControl.Table)] + public bool? EnableProbeProxyProtocolHeader { get; set; } public PSApplicationGatewayProbeHealthResponseMatch Match { get; set; } [Ps1Xml(Target = ViewControl.Table)] public string ProvisioningState { get; set; } diff --git a/src/Network/Network/help/Add-AzApplicationGatewayBackendSetting.md b/src/Network/Network/help/Add-AzApplicationGatewayBackendSetting.md index d6cc57242759..c91913f1d27b 100644 --- a/src/Network/Network/help/Add-AzApplicationGatewayBackendSetting.md +++ b/src/Network/Network/help/Add-AzApplicationGatewayBackendSetting.md @@ -17,6 +17,7 @@ Add-AzApplicationGatewayBackendSetting -ApplicationGateway [-Timeout ] [-ProbeId ] [-Probe ] [-TrustedRootCertificate ] [-PickHostNameFromBackendAddress] [-HostName ] [-DefaultProfile ] + [-EnableL4ClientIpPreservation ] [] ``` @@ -202,6 +203,20 @@ Default value: None Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableL4ClientIpPreservation +Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` ### CommonParameters 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). diff --git a/src/Network/Network/help/Add-AzApplicationGatewayProbeConfig.md b/src/Network/Network/help/Add-AzApplicationGatewayProbeConfig.md index fb0fe8960e9e..7ad94f5731e9 100644 --- a/src/Network/Network/help/Add-AzApplicationGatewayProbeConfig.md +++ b/src/Network/Network/help/Add-AzApplicationGatewayProbeConfig.md @@ -17,6 +17,7 @@ Add-AzApplicationGatewayProbeConfig -ApplicationGateway - -Protocol [-HostName ] [-Path ] -Interval -Timeout -UnhealthyThreshold [-PickHostNameFromBackendHttpSettings] [-MinServers ] [-Port ] [-Match ] [-DefaultProfile ] + [-EnableProbeProxyProtocolHeader ] [] ``` @@ -177,6 +178,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableProbeProxyProtocolHeader +Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Port Port that is used for probing the backend server diff --git a/src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md b/src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md index b265d2c4f64c..9d5abf4851b6 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md +++ b/src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md @@ -17,6 +17,7 @@ New-AzApplicationGatewayBackendSetting -Name -Port -Protocol ] [-Probe ] [-TrustedRootCertificate ] [-PickHostNameFromBackendAddress] [-HostName ] [-DefaultProfile ] + [-EnableL4ClientIpPreservation ] [] ``` @@ -188,6 +189,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableL4ClientIpPresrevation +Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters 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). diff --git a/src/Network/Network/help/New-AzApplicationGatewayProbeConfig.md b/src/Network/Network/help/New-AzApplicationGatewayProbeConfig.md index 4bf7cda5b6d1..2dc9a8f7e5df 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayProbeConfig.md +++ b/src/Network/Network/help/New-AzApplicationGatewayProbeConfig.md @@ -16,6 +16,7 @@ Creates a health probe. New-AzApplicationGatewayProbeConfig -Name -Protocol [-HostName ] [-Path ] -Interval -Timeout -UnhealthyThreshold [-PickHostNameFromBackendHttpSettings] [-MinServers ] [-Port ] [-Match ] + [-EnableProbeProxyProtocolHeader ] [-DefaultProfile ] [] ``` @@ -219,6 +220,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableProbeProxyProtocolHeader +Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -UnhealthyThreshold Specifies the probe retry count. The backend server is marked down after consecutive probe failure count reaches the unhealthy threshold. diff --git a/src/Network/Network/help/Set-AzApplicationGatewayBackendSetting.md b/src/Network/Network/help/Set-AzApplicationGatewayBackendSetting.md index 0c86d75f0876..7c426f26ba31 100644 --- a/src/Network/Network/help/Set-AzApplicationGatewayBackendSetting.md +++ b/src/Network/Network/help/Set-AzApplicationGatewayBackendSetting.md @@ -17,6 +17,7 @@ Set-AzApplicationGatewayBackendSetting -ApplicationGateway [-Timeout ] [-ProbeId ] [-Probe ] [-TrustedRootCertificate ] [-PickHostNameFromBackendAddress] [-HostName ] [-DefaultProfile ] + [-EnableL4ClientIpPreservation ] [] ``` @@ -203,6 +204,20 @@ Default value: None Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableL4ClientIpPreservation +Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` ### CommonParameters 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). diff --git a/src/Network/Network/help/Set-AzApplicationGatewayProbeConfig.md b/src/Network/Network/help/Set-AzApplicationGatewayProbeConfig.md index 3e3d68c79151..e91f1b81bf30 100644 --- a/src/Network/Network/help/Set-AzApplicationGatewayProbeConfig.md +++ b/src/Network/Network/help/Set-AzApplicationGatewayProbeConfig.md @@ -17,6 +17,7 @@ Set-AzApplicationGatewayProbeConfig -ApplicationGateway - -Protocol [-HostName ] [-Path ] -Interval -Timeout -UnhealthyThreshold [-PickHostNameFromBackendHttpSettings] [-MinServers ] [-Port ] [-Match ] [-DefaultProfile ] + [-EnableProbeProxyProtocolHeader ] [] ``` @@ -253,6 +254,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableProbeProxyProtocolHeader +Whether to send Proxy Protocol header along with the Health Probe over TCP or TLS protocol. Default value is false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters 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). From 3d2e847fad48118bff72ef1776ef63606be404b6 Mon Sep 17 00:00:00 2001 From: akshimittal1310 <129746463+akshimittal1310@users.noreply.github.com> Date: Tue, 14 Oct 2025 13:26:37 +0530 Subject: [PATCH 2/2] Update src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Network/help/New-AzApplicationGatewayBackendSetting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md b/src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md index 9d5abf4851b6..a8023819aca3 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md +++ b/src/Network/Network/help/New-AzApplicationGatewayBackendSetting.md @@ -189,7 +189,7 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -EnableL4ClientIpPresrevation +### -EnableL4ClientIpPreservation Whether to send Proxy Protocol header to backend servers over TCP or TLS protocols. Default value is false. ```yaml