summary import { LocalNetworkGateway , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createLocalNetworkGateway ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const localNetworkGatewayName = "localgw" ; const parameters = { fqdn : "site1.contoso.com" , gatewayIpAddress : "11.12.13.14" , localNetworkAddressSpace : { addressPrefixes : [ "10.1.0.0/16" ] } , location : "Central US" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . localNetworkGateways . beginCreateOrUpdateAndWait ( resourceGroupName , localNetworkGatewayName , parameters ) ; console . log ( result ) ; } createLocalNetworkGateway ( ) . catch ( console . error ) ;