summary import { VpnPacketCaptureStopParameters , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function stopPacketCaptureOnVirtualNetworkGatewayConnection ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const virtualNetworkGatewayConnectionName = "vpngwcn1" ; const parameters = { sasUrl : "https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . virtualNetworkGatewayConnections . beginStopPacketCaptureAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters ) ; console . log ( result ) ; } stopPacketCaptureOnVirtualNetworkGatewayConnection ( ) . catch ( console . error ) ;