summary import { LoadBalancer , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createLoadBalancerWithInboundNatPool ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const loadBalancerName = "lb" ; const parameters = { backendAddressPools : [ ] , frontendIPConfigurations : [ { name : "test" , id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test" , privateIPAllocationMethod : "Dynamic" , subnet : { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet" } , zones : [ ] } ] , inboundNatPools : [ { name : "test" , backendPort : 8888 , enableFloatingIP : true , enableTcpReset : true , frontendIPConfiguration : { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test" } , frontendPortRangeEnd : 8085 , frontendPortRangeStart : 8080 , id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test" , idleTimeoutInMinutes : 10 , protocol : "Tcp" } ] , inboundNatRules : [ ] , loadBalancingRules : [ ] , location : "eastus" , outboundRules : [ ] , probes : [ ] , sku : { name : "Standard" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . loadBalancers . beginCreateOrUpdateAndWait ( resourceGroupName , loadBalancerName , parameters ) ; console . log ( result ) ; } createLoadBalancerWithInboundNatPool ( ) . catch ( console . error ) ;