summary import { P2SVpnProfileParameters , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function generateP2SVpnGatewayVpnprofile ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const gatewayName = "p2sVpnGateway1" ; const parameters = { authenticationMethod : "EAPTLS" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . p2SVpnGateways . beginGenerateVpnProfileAndWait ( resourceGroupName , gatewayName , parameters ) ; console . log ( result ) ; } generateP2SVpnGatewayVpnprofile ( ) . catch ( console . error ) ;