summary import { ApplicationGatewayOnDemandProbe , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function testBackendHealth ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const applicationGatewayName = "appgw" ; const probeRequest = { path : "/" , backendAddressPool : { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool" } , backendHttpSettings : { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings" } , pickHostNameFromBackendHttpSettings : true , timeout : 30 , protocol : "Http" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . applicationGateways . beginBackendHealthOnDemandAndWait ( resourceGroupName , applicationGatewayName , probeRequest ) ; console . log ( result ) ; } testBackendHealth ( ) . catch ( console . error ) ;