az network cross-region-lb rule

Manage cross-region load balancing rules.

Commands

az network cross-region-lb rule create

Create a load balancing rule.

az network cross-region-lb rule delete

Delete a load balancing rule.

az network cross-region-lb rule list

List load balancing rules.

az network cross-region-lb rule show

Get the details of a load balancing rule.

az network cross-region-lb rule update

Update a load balancing rule.

az network cross-region-lb rule create

Create a load balancing rule.

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

Examples

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

az network cross-region-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 cross-region-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 cross-region-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

--backend-port

Port number.

--frontend-port

Port number.

--lb-name

The load balancer name.

--name -n

The name of the load balancing rule.

--protocol

Network transport 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.

--backend-pools-name

List of name of the backend address pool.

--enable-tcp-reset

Receive bidirectional TCP reset on TCP flow idle timeout or unexpected connection termination. Only used when protocol is set to TCP.

accepted values: false, true
--floating-ip

Enable floating IP.

accepted values: false, true
--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

Name of an existing probe to associate with this rule.

az network cross-region-lb rule delete

Delete a load balancing rule.

az network cross-region-lb rule delete --lb-name
                                       --name
                                       --resource-group

Examples

Delete a load balancing rule.

az network cross-region-lb rule delete -g MyResourceGroup --lb-name MyLb -n MyLbRule

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 cross-region-lb rule list

List load balancing rules.

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

Examples

List load balancing rules.

az network cross-region-lb rule list -g MyResourceGroup --lb-name MyLb -o table

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 cross-region-lb rule show

Get the details of a load balancing rule.

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

Examples

Get the details of a load balancing rule.

az network cross-region-lb rule show -g MyResourceGroup --lb-name MyLb -n MyLbRule

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 cross-region-lb rule update

Update a load balancing rule.

az network cross-region-lb rule update [--add]
                                       [--backend-pool-name]
                                       [--backend-pools-name]
                                       [--backend-port]
                                       [--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]

Examples

Update a load balancing rule to change the protocol to UDP.

az network cross-region-lb rule update -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Udp

Update a load balancing rule to support HA ports.

az network cross-region-lb rule update -g MyResourceGroup --lb-name MyLb -n MyLbRule \ --protocol All --frontend-port 0 --backend-port 0

Optional Parameters

--add

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>.

--backend-pool-name

The name of the backend address pool.

--backend-pools-name

List of name of the backend address pool.

--backend-port

Port number.

--enable-tcp-reset

Receive bidirectional TCP reset on TCP flow idle timeout or unexpected connection termination. Only used when protocol is set to TCP.

accepted values: false, true
--floating-ip

Enable floating IP.

accepted values: false, true
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--frontend-ip-name

The name of the frontend IP configuration.

--frontend-port

Port number.

--idle-timeout

Idle timeout in minutes.

--ids

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.

--lb-name

The load balancer name.

--load-distribution

Affinity rule settings.

accepted values: Default, SourceIP, SourceIPProtocol
--name -n

The name of the load balancing rule.

--probe-name

Name of an existing probe to associate with this rule.

--protocol

Network transport protocol.

accepted values: All, Tcp, Udp
--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.