Jaa


az network lb

Manage and configure load balancers.

To learn more about Azure Load Balancer visit https://learn.microsoft.com/en-us/azure/load-balancer/quickstart-load-balancer-standard-public-cli.

Commands

Name Description Type Status
az network lb address-pool

Manage address pools of a load balancer.

Core GA
az network lb address-pool address

Manage backend addresses of the cross-region load balance backend address pool.

Core GA
az network lb address-pool address add

Add one backend address into the load balance backend address pool.

Core GA
az network lb address-pool address list

List all backend addresses of the load balance backend address pool.

Core GA
az network lb address-pool address remove

Remove one backend address from the load balance backend address pool.

Core GA
az network lb address-pool address show

Show the backend address from the load balance backend address pool.

Core GA
az network lb address-pool address update

Update the backend address into the load balance backend address pool.

Core GA
az network lb address-pool address wait

Place the CLI in a waiting state until a condition is met.

Core GA
az network lb address-pool create

Create load balancer backend address pool.

Core GA
az network lb address-pool delete

Delete the specified load balancer backend address pool.

Core GA
az network lb address-pool list

List address pools.

Core GA
az network lb address-pool show

Get the details of an address pool.

Core GA
az network lb address-pool tunnel-interface

Manage tunnel interfaces of a load balancer.

Core Preview
az network lb address-pool tunnel-interface add

Add one tunnel interface into the load balance tunnel interface pool.

Core Preview
az network lb address-pool tunnel-interface list

List all tunnel interfacees of the load balance tunnel interface pool.

Core Preview
az network lb address-pool tunnel-interface remove

Remove one tunnel interface from the load balance tunnel interface pool.

Core Preview
az network lb address-pool tunnel-interface show

Get one tunnel interface of load balance tunnel interface pool.

Core Preview
az network lb address-pool tunnel-interface update

Update one tunnel interface of load balance tunnel interface pool.

Core Preview
az network lb address-pool tunnel-interface wait

Place the CLI in a waiting state until a condition is met.

Core Preview
az network lb address-pool update

Update an address pool.

Core GA
az network lb address-pool wait

Place the CLI in a waiting state until a condition is met.

Core GA
az network lb create

Create a load balancer.

Core GA
az network lb delete

Delete the specified load balancer.

Core GA
az network lb frontend-ip

Manage frontend IP addresses of a load balancer.

Core GA
az network lb frontend-ip create

Create a frontend IP address.

Core GA
az network lb frontend-ip delete

Delete a frontend IP address.

Core GA
az network lb frontend-ip list

List frontend IP addresses.

Core GA
az network lb frontend-ip show

Get the details of a frontend IP address.

Core GA
az network lb frontend-ip update

Update a frontend IP address.

Core GA
az network lb frontend-ip wait

Place the CLI in a waiting state until a condition is met.

Core GA
az network lb inbound-nat-pool

Manage inbound NAT address pools of a load balancer.

Core GA
az network lb inbound-nat-pool create

Create an inbound NAT address pool.

Core GA
az network lb inbound-nat-pool delete

Delete an inbound NAT address pool.

Core GA
az network lb inbound-nat-pool list

List inbound NAT address pools.

Core GA
az network lb inbound-nat-pool show

Get the details of an inbound NAT address pool.

Core GA
az network lb inbound-nat-pool update

Update an inbound NAT address pool.

Core GA
az network lb inbound-nat-pool wait

Place the CLI in a waiting state until a condition is met.

Core GA
az network lb inbound-nat-rule

Manage inbound NAT rules of a load balancer.

Core GA
az network lb inbound-nat-rule create

Create an inbound NAT rule.

Core GA
az network lb inbound-nat-rule delete

Delete an inbound NAT rule.

Core GA
az network lb inbound-nat-rule list

List inbound NAT rules.

Core GA
az network lb inbound-nat-rule show

Get the details of an inbound NAT rule.

Core GA
az network lb inbound-nat-rule update

Update an inbound NAT rule.

Core GA
az network lb inbound-nat-rule wait

Place the CLI in a waiting state until a condition is met.

Core GA
az network lb list

List load balancers.

Core GA
az network lb list-mapping

List inbound NAT rule port mappings.

Core GA
az network lb list-nic

List associated load balancer network interfaces.

Core GA
az network lb outbound-rule

Manage outbound rules of a load balancer.

Core GA
az network lb outbound-rule create

Create an outbound-rule.

Core GA
az network lb outbound-rule delete

Delete an outbound-rule.

Core GA
az network lb outbound-rule list

List outbound rules.

Core GA
az network lb outbound-rule show

Get the details of an outbound rule.

Core GA
az network lb outbound-rule update

Update an outbound-rule.

Core GA
az network lb outbound-rule wait

Place the CLI in a waiting state until a condition is met.

Core GA
az network lb probe

Evaluate probe information and define routing rules.

Core GA
az network lb probe create

Create a probe in the load balance.

Core GA
az network lb probe delete

Delete a probe in the load balancer.

Core GA
az network lb probe list

List probes in the load balancer.

Core GA
az network lb probe show

Get the details of a probe in the load balancer.

Core GA
az network lb probe update

Update a probe in the load balancer.

Core GA
az network lb probe wait

Place the CLI in a waiting state until a condition is met.

Core GA
az network lb rule

Manage load balancing rules.

Core GA
az network lb rule create

Create a load balancing rule.

Core GA
az network lb rule delete

Delete a load balancing rule.

Core GA
az network lb rule list

List load balancing rules.

Core GA
az network lb rule show

Get the details of a load balancing rule.

Core GA
az network lb rule update

Update a load balancing rule.

Core GA
az network lb rule wait

Place the CLI in a waiting state until a condition is met.

Core GA
az network lb show

Get the details of a load balancer.

Core GA
az network lb update

Update a load balancer.

Core GA
az network lb wait

Place the CLI in a waiting state until a condition is met.

Core GA

az network lb create

Create a load balancer.

az network lb create --name
                     --resource-group
                     [--backend-pool-name]
                     [--edge-zone]
                     [--frontend-ip-name]
                     [--frontend-ip-zone]
                     [--location]
                     [--no-wait]
                     [--private-ip-address]
                     [--private-ip-address-version {IPv4, IPv6}]
                     [--public-ip-address]
                     [--public-ip-address-allocation {Dynamic, Static}]
                     [--public-ip-dns-name]
                     [--public-ip-zone]
                     [--sku {Basic, Gateway, Standard}]
                     [--subnet]
                     [--subnet-address-prefix]
                     [--tags]
                     [--validate]
                     [--vnet-address-prefix]
                     [--vnet-name]

Examples

Create a basic load balancer.

az network lb create -g MyResourceGroup -n MyLb --sku Basic

Create a basic load balancer on a specific virtual network and subnet. If a virtual network with the same name is found in the same resource group, the load balancer will utilize this virtual network. If one is not found a new one will be created.

az network lb create -g MyResourceGroup -n MyLb --sku Basic --vnet-name MyVnet --subnet MySubnet

Create a basic load balancer on a subnet of a pre-existing virtual network. The subnet can be in arbitary resource group or subscription by providing the ID of the subnet.

az network lb create -g MyResourceGroup -n MyLb --sku Basic --subnet {subnetID}

Create a basic zone flavored internal load balancer, through provisioning a zonal public ip.

az network lb create -g MyResourceGroup -n MyLb --sku Basic --public-ip-zone 2

Create a standard zone flavored public-facing load balancer, through provisioning a zonal frontend ip configuration and Vnet.

az network lb create -g MyResourceGroup -n MyLb --sku Standard --frontend-ip-zone 1 --vnet-name MyVnet --subnet MySubnet

Required Parameters

--name -n

The load balancer name.

--resource-group -g

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--backend-pool-name

The name of the backend address pool.

--edge-zone

The name of edge zone.

--frontend-ip-name

The name of the frontend IP configuration.

Property Value
Default value: LoadBalancerFrontEnd
--frontend-ip-zone

Used to create internal facing Load balancer.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--private-ip-address

Static private IP address to use.

--private-ip-address-version

The private IP address version to use.

Property Value
Default value: IPv4
Accepted values: IPv4, IPv6
--public-ip-address

Name or ID of the public IP address, or "" for none. Uses existing resource if available or will create a new resource with defaults if omitted.

Property Value
Parameter group: Public IP Arguments
--public-ip-address-allocation

IP allocation method.

Property Value
Parameter group: Public IP Arguments
Accepted values: Dynamic, Static
--public-ip-dns-name

Globally unique DNS name for a new public IP.

Property Value
Parameter group: Public IP Arguments
--public-ip-zone

Used to created a new public ip for the load balancer, a.k.a public facing Load balancer.

Property Value
Parameter group: Public IP Arguments
--sku

Load balancer SKU.

Property Value
Default value: Standard
Accepted values: Basic, Gateway, Standard
--subnet

Name or ID of a subnet. Uses existing resource or creates new if specified, or none if omitted. If name specified, also specify --vnet-name. If you want to use an existing subnet in other resource group or subscription, please provide the ID instead of the name of the subnet.

Property Value
Parameter group: Subnet Arguments
--subnet-address-prefix

The CIDR address prefix to use when creating a new subnet.

Property Value
Parameter group: Subnet Arguments
Default value: 10.0.0.0/24
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--validate

Generate and validate the ARM template without creating any resources.

Property Value
Default value: False
--vnet-address-prefix

The CIDR address prefix to use when creating a new VNet.

Property Value
Parameter group: Subnet Arguments
Default value: 10.0.0.0/16
--vnet-name

The virtual network (VNet) name.

Property Value
Parameter group: Subnet Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network lb delete

Delete the specified load balancer.

az network lb delete [--ids]
                     [--name]
                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                     [--resource-group]
                     [--subscription]

Examples

Delete a load balancer.

az network lb delete -g MyResourceGroup -n MyLb

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The load balancer name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network lb list

List load balancers.

az network lb list [--max-items]
                   [--next-token]
                   [--resource-group]

Examples

List load balancers.

az network lb list -g MyResourceGroup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network lb list-mapping

List inbound NAT rule port mappings.

az network lb list-mapping --backend-pool-name
                           --request
                           [--ids]
                           [--name]
                           [--resource-group]
                           [--subscription]

Examples

List inbound NAT rule port mappings based on IP.

az network lb list-mapping -n MyLb -g MyResourceGroup --backend-pool-name MyAddressPool --request ip=XX

List inbound NAT rule port mappings based on NIC.

az network lb list-mapping -n MyLb -g MyResourceGroup --backend-pool-name MyAddressPool --request nic=XX

Required Parameters

--backend-pool-name

The name of the backend address pool.

--request

Query inbound NAT rule port mapping request.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The load balancer name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network lb list-nic

List associated load balancer network interfaces.

az network lb list-nic --name
                       --resource-group
                       [--max-items]
                       [--next-token]

Examples

List associated load balancer network interfaces.

az network lb list-nic -g MyResourceGroup --name MyLb

Required Parameters

--name -n

The load balancer name.

--resource-group -g

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network lb show

Get the details of a load balancer.

az network lb show [--expand]
                   [--ids]
                   [--name]
                   [--resource-group]
                   [--subscription]

Examples

Get the details of a load balancer.

az network lb show -g MyResourceGroup -n MyLb

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--expand

Expands referenced resources. Default value is None.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The load balancer name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network lb update

Update a load balancer.

This command can only be used to update the tags for a load balancer. Name and resource group are immutable and cannot be updated.

az network lb update [--add]
                     [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                     [--ids]
                     [--name]
                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                     [--probes]
                     [--remove]
                     [--resource-group]
                     [--set]
                     [--subscription]
                     [--tags]

Examples

Update the tags of a load balancer.

az network lb update -g MyResourceGroup -n MyLB --tags CostCenter=MyTestGroup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Generic Update Arguments
--force-string

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

Property Value
Parameter group: Generic Update Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--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.

Property Value
Parameter group: Resource Id Arguments
--name -n

The load balancer name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--probes

Collection of probe objects used in the load balancer. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--remove

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

Property Value
Parameter group: Generic Update Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--set

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

Property Value
Parameter group: Generic Update Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--tags

Space-separated tags: key[=value] [key[=value] ...]. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az network lb wait

Place the CLI in a waiting state until a condition is met.

az network lb wait [--created]
                   [--custom]
                   [--deleted]
                   [--exists]
                   [--expand]
                   [--ids]
                   [--interval]
                   [--name]
                   [--resource-group]
                   [--subscription]
                   [--timeout]
                   [--updated]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--expand

Expands referenced resources. Default value is None.

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

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--name -n

The load balancer name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False