summary import { ConnectionResetSharedKey , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function resetVirtualNetworkGatewayConnectionSharedKey ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const virtualNetworkGatewayConnectionName = "conn1" ; const parameters = { keyLength : 128 } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . virtualNetworkGatewayConnections . beginResetSharedKeyAndWait ( resourceGroupName , virtualNetworkGatewayConnectionName , parameters ) ; console . log ( result ) ; } resetVirtualNetworkGatewayConnectionSharedKey ( ) . catch ( console . error ) ;