I am trying to change the backend address pool on a pre-existing Load Balancer rule.
I have looked into using Set-AzLoadBalancerRuleConfig but it would appear I need to provide all the information for the rule to be rebuilt... ie: the FrontendIpConfiguration, Protocol, FrontendPort, BackendPort, and Probe, as well at the new BackendAddressPool to be used:
ForEach($Rule in $BAPFrom.LoadBalancingRules){
$LbRule = $slb.LoadBalancingRules | Where-Object {$_.Id -eq $Rule.Id}
$slb | Set-AzLoadBalancerRuleConfig -Name $LbRule.Name `
-FrontendIPConfiguration $slb.FrontendIpConfigurations[0] `
-Protocol $LbRule.Protocol `
-FrontendPort $LbRule.FrontendPort `
-BackendPort $LbRule.BackendPort `
-BackendAddressPool $BAP #`
#-Probe $LbRule.Probe}
Is there not a way to just change the BackendAddressPool on a pre-existing rule, without needing to pass in each of these parameters again?