summary import { TroubleshootingParameters , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function getTroubleshooting ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const networkWatcherName = "nw1" ; const parameters = { storageId : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1" , storagePath : "https://st1.blob.core.windows.net/cn1" , targetResourceId : "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . networkWatchers . beginGetTroubleshootingAndWait ( resourceGroupName , networkWatcherName , parameters ) ; console . log ( result ) ; } getTroubleshooting ( ) . catch ( console . error ) ;