summary import { VpnClientIPsecParameters , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function setVirtualNetworkGatewayVpnClientIpsecParameters ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const virtualNetworkGatewayName = "vpngw" ; const vpnclientIpsecParams = { dhGroup : "DHGroup2" , ikeEncryption : "AES256" , ikeIntegrity : "SHA384" , ipsecEncryption : "AES256" , ipsecIntegrity : "SHA256" , pfsGroup : "PFS2" , saDataSizeKilobytes : 429497 , saLifeTimeSeconds : 86473 } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . virtualNetworkGateways . beginSetVpnclientIpsecParametersAndWait ( resourceGroupName , virtualNetworkGatewayName , vpnclientIpsecParams ) ; console . log ( result ) ; } setVirtualNetworkGatewayVpnClientIpsecParameters ( ) . catch ( console . error ) ;