using System; using System.Collections.Generic; using Microsoft.Azure.Documents; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Host; using Microsoft.Extensions.Logging; namespace TEAMModelOSFunction { public static class Function1 { [FunctionName("Function1")] public static void Run([CosmosDBTrigger( databaseName: "TEAMModelOS", collectionName: "Teacher", ConnectionStringSetting = "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;", LeaseCollectionName = "leases")] IReadOnlyList input, ILogger log) { if (input != null && input.Count > 0) { log.LogInformation("Documents modified " + input.Count); log.LogInformation("First document Id " + input[0].Id); } } } }