summary import { ApplicationGatewayPrivateEndpointConnection , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function updateApplicationGatewayPrivateEndpointConnection ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const applicationGatewayName = "appgw" ; const connectionName = "connection1" ; const parameters = { name : "connection1" , privateEndpoint : { id : "/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe" } , privateLinkServiceConnectionState : { description : "approved it for some reason." , status : "Approved" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . applicationGatewayPrivateEndpointConnections . beginUpdateAndWait ( resourceGroupName , applicationGatewayName , connectionName , parameters ) ; console . log ( result ) ; } updateApplicationGatewayPrivateEndpointConnection ( ) . catch ( console . error ) ;