summary import { VirtualNetworkTap , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createVirtualNetworkTap ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const tapName = "test-vtap" ; const parameters = { destinationNetworkInterfaceIPConfiguration : { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1" } , location : "centraluseuap" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . virtualNetworkTaps . beginCreateOrUpdateAndWait ( resourceGroupName , tapName , parameters ) ; console . log ( result ) ; } createVirtualNetworkTap ( ) . catch ( console . error ) ;