az network lb rule

Manage load balancing rules.

Commands

az network lb rule create Create a load balancing rule.
az network lb rule delete Delete a load balancing rule.
az network lb rule list List load balancing rules.
az network lb rule show Get the details of a load balancing rule.
az network lb rule update Update a load balancing rule.

az network lb rule create

Create a load balancing rule.

az network lb rule create --backend-port
--frontend-port
--lb-name
--name
--protocol {All, Tcp, Udp}
--resource-group
[--backend-pool-name]
[--floating-ip {false, true}]
[--frontend-ip-name]
[--idle-timeout]
[--load-distribution {Default, SourceIP, SourceIPProtocol}]
[--probe-name]

Examples

Create a basic load balancing rule that assigns a front-facing IP configuration and port to a backend address pool and port.

az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Tcp --frontend-port 80 --backend-port 80

Required Parameters

--backend-port
Port number.
--frontend-port
Port number.
--lb-name
The load balancer name.
--name -n
The name of the load balancing rule.
--protocol
accepted values: All, Tcp, Udp
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

Optional Parameters

--backend-pool-name
The name of the backend address pool. If only one exists, omit to use as default.
--floating-ip
Enable floating IP.
accepted values: false, true
default value: false
--frontend-ip-name
The name of the frontend IP configuration. If only one exists, omit to use as default.
--idle-timeout
Idle timeout in minutes.
--load-distribution
Affinity rule settings.
accepted values: Default, SourceIP, SourceIPProtocol
default value: default
--probe-name

az network lb rule delete

Delete a load balancing rule.

az network lb rule delete --lb-name
--name
--resource-group
[--no-wait]

Required Parameters

--lb-name
The name of the load balancer.
--name -n
The name of the load balancing rule.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

Optional Parameters

--no-wait

az network lb rule list

List load balancing rules.

az network lb rule list --lb-name
--resource-group

Required Parameters

--lb-name
The name of the load balancer.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az network lb rule show

Get the details of a load balancing rule.

az network lb rule show --lb-name
--name
--resource-group

Required Parameters

--lb-name
The name of the load balancer.
--name -n
The name of the load balancing rule.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az network lb rule update

Update a load balancing rule.

az network lb rule update --lb-name
--name
--resource-group
[--add]
[--backend-pool-name]
[--backend-port]
[--floating-ip {false, true}]
[--frontend-ip-name]
[--frontend-port]
[--idle-timeout]
[--load-distribution {Default, SourceIP, SourceIPProtocol}]
[--probe-name]
[--protocol {All, Tcp, Udp}]
[--remove]
[--set]

Required Parameters

--lb-name
The load balancer name.
--name -n
The name of the load balancing rule.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

Optional Parameters

--add
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .
--backend-pool-name
The name of the backend address pool.
--backend-port
Port number.
--floating-ip
Enable floating IP.
accepted values: false, true
--frontend-ip-name
The name of the frontend IP configuration.
--frontend-port
Port number.
--idle-timeout
Idle timeout in minutes.
--load-distribution
Affinity rule settings.
accepted values: Default, SourceIP, SourceIPProtocol
default value: default
--probe-name
--protocol
accepted values: All, Tcp, Udp
--remove
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
--set
Update an object by specifying a property path and value to set. Example: --set property1.property2=.