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]
[--disable-outbound-snat {false, true}]
[--enable-tcp-reset {false, true}]
[--floating-ip {false, true}]
[--frontend-ip-name]
[--idle-timeout]
[--load-distribution {Default, SourceIP, SourceIPProtocol}]
[--probe-name]
[--subscription]
Examples
Create a load balancing rule that assigns a front-facing IP configuration and port to an address pool and port.
az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Tcp \
--frontend-ip-name MyFrontEndIp --frontend-port 80 \
--backend-pool-name MyAddressPool --backend-port 80
Create a load balancing rule that assigns a front-facing IP configuration and port to an address pool and port with the floating ip feature.
az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Tcp \
--frontend-ip-name MyFrontEndIp --backend-pool-name MyAddressPool \
--floating-ip true --frontend-port 80 --backend-port 80
Create an HA ports load balancing rule that assigns a frontend IP and port to use all available backend IPs in a pool on the same port.
az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyHAPortsRule \
--protocol All --frontend-port 0 --backend-port 0 --frontend-ip-name MyFrontendIp \
--backend-pool-name MyAddressPool
Required Parameters
Port number.
Port number.
The load balancer name.
The name of the load balancing rule.
Network transport protocol.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The name of the backend address pool. If only one exists, omit to use as default.
Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
Receive bidirectional TCP reset on TCP flow idle timeout or unexpected connection termination. Only used when protocol is set to TCP.
Enable floating IP.
The name of the frontend IP configuration. If only one exists, omit to use as default.
Idle timeout in minutes.
Affinity rule settings.
Name of an existing probe to associate with this rule.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network lb rule delete
Delete a load balancing rule.
az network lb rule delete --lb-name
--name
--resource-group
[--subscription]
Examples
Delete a load balancing rule.
az network lb rule delete -g MyResourceGroup --lb-name MyLb -n MyLbRule
Required Parameters
The name of the load balancer.
The name of the load balancing rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network lb rule list
List load balancing rules.
az network lb rule list --lb-name
--resource-group
[--query-examples]
[--subscription]
Examples
List load balancing rules.
az network lb rule list -g MyResourceGroup --lb-name MyLb -o table
Required Parameters
The name of the load balancer.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network lb rule show
Get the details of a load balancing rule.
az network lb rule show --lb-name
--name
--resource-group
[--query-examples]
[--subscription]
Examples
Get the details of a load balancing rule.
az network lb rule show -g MyResourceGroup --lb-name MyLb -n MyLbRule
Required Parameters
The name of the load balancer.
The name of the load balancing rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network lb rule update
Update a load balancing rule.
az network lb rule update [--add]
[--backend-pool-name]
[--backend-port]
[--disable-outbound-snat {false, true}]
[--enable-tcp-reset {false, true}]
[--floating-ip {false, true}]
[--force-string]
[--frontend-ip-name]
[--frontend-port]
[--idle-timeout]
[--ids]
[--lb-name]
[--load-distribution {Default, SourceIP, SourceIPProtocol}]
[--name]
[--probe-name]
[--protocol {All, Tcp, Udp}]
[--remove]
[--resource-group]
[--set]
[--subscription]
Examples
Update a load balancing rule to change the protocol to UDP.
az network lb rule update -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Udp
Update a load balancing rule to support HA ports.
az network lb rule update -g MyResourceGroup --lb-name MyLb -n MyLbRule \ --protocol All --frontend-port 0 --backend-port 0
Update a load balancing rule. (autogenerated)
az network lb rule update --disable-outbound-snat true --lb-name MyLb --name MyLbRule --resource-group MyResourceGroup
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
The name of the backend address pool.
Port number.
Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
Receive bidirectional TCP reset on TCP flow idle timeout or unexpected connection termination. Only used when protocol is set to TCP.
Enable floating IP.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
The name of the frontend IP configuration.
Port number.
Idle timeout in minutes.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The load balancer name.
Affinity rule settings.
The name of the load balancing rule.
Name of an existing probe to associate with this rule.
Network transport protocol.
Remove a property or an element from a list. Example: --remove property.list
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.