summary import { NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function vpnConnectionDelete ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const gatewayName = "gateway1" ; const connectionName = "vpnConnection1" ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . vpnConnections . beginDeleteAndWait ( resourceGroupName , gatewayName , connectionName ) ; console . log ( result ) ; } vpnConnectionDelete ( ) . catch ( console . error ) ;