Inbound NAT address rules - az network lb inbound-nat-rule

Manage inbound NAT rules for a load balancer.

Commands

az network lb inbound-nat-rule create Create an inbound NAT rule.
az network lb inbound-nat-rule delete Delete an inbound NAT rule.
az network lb inbound-nat-rule list List inbound NAT rules.
az network lb inbound-nat-rule show Show details of an inbound NAT rule.
az network lb inbound-nat-rule update Update an inbound NAT rule.

az network lb inbound-nat-rule create

Create an inbound NAT rule.

az network lb inbound-nat-rule create --backend-port
--frontend-port
--lb-name
--name
--protocol {Tcp, Udp}
--resource-group
[--floating-ip {false, true}]
[--frontend-ip-name]
[--idle-timeout]

Examples

Create a basic inbound NAT rule for port 80.

az network lb inbound-nat-rule create -g MyResourceGroup --lb-name MyLb -n MyNatRule --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 inbound NAT rule.

--protocol
accepted values: Tcp, Udp
--resource-group -g

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

Optional Parameters

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

az network lb inbound-nat-rule delete

Delete an inbound NAT rule.

az network lb inbound-nat-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 inbound NAT rule.

--resource-group -g

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

Optional Parameters

--no-wait

az network lb inbound-nat-rule list

List inbound NAT rules.

az network lb inbound-nat-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=.

az network lb inbound-nat-rule show

Show details of an inbound NAT rule.

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

Required Parameters

--lb-name

The name of the load balancer.

--name -n

The name of the inbound NAT rule.

--resource-group -g

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

az network lb inbound-nat-rule update

Update an inbound NAT rule.

az network lb inbound-nat-rule update --lb-name
--name
--resource-group
[--add]
[--backend-port]
[--floating-ip {false, true}]
[--frontend-ip-name]
[--frontend-port]
[--idle-timeout]
[--protocol {Tcp, Udp}]
[--remove]
[--set]

Required Parameters

--lb-name

The load balancer name.

--name -n

The name of the inbound NAT rule.

--resource-group -g

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

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .

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

--protocol
accepted values: 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=.