summary import { NetworkInterface , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createNetworkInterface ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const networkInterfaceName = "test-nic" ; const parameters = { enableAcceleratedNetworking : true , ipConfigurations : [ { name : "ipconfig1" , publicIPAddress : { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip" } , subnet : { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default" } } ] , location : "eastus" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . networkInterfaces . beginCreateOrUpdateAndWait ( resourceGroupName , networkInterfaceName , parameters ) ; console . log ( result ) ; } createNetworkInterface ( ) . catch ( console . error ) ;