summary import { WebSiteManagementClient } from "@msinternal/web-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function listResourceHealthMetadataForASite ( ) { const subscriptionId = "4adb32ad-8327-4cbb-b775-b84b4465bb38" ; const resourceGroupName = "Default-Web-NorthCentralUS" ; const name = "newsiteinnewASE-NCUS" ; const slot = "Production" ; const credential = new DefaultAzureCredential ( ) ; const client = new WebSiteManagementClient ( credential , subscriptionId ) ; const resArray = new Array ( ) ; for await ( let item of client . resourceHealthMetadataOperations . listBySiteSlot ( resourceGroupName , name , slot ) ) { resArray . push ( item ) ; } console . log ( resArray ) ; } listResourceHealthMetadataForASite ( ) . catch ( console . error ) ;