Skip to content

Instantly share code, notes, and snippets.

@ealsur
Last active February 15, 2019 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ealsur/372cce28d42c9f554ce7d43ff9e99eec to your computer and use it in GitHub Desktop.
Save ealsur/372cce28d42c9f554ce7d43ff9e99eec to your computer and use it in GitHub Desktop.
Azure Cosmos DB + Functions Cookbook - monitoring - trigger
[FunctionName("Trigger")]
public static void Trigger([CosmosDBTrigger(
databaseName: "%MonitoredDatabase%",
collectionName: "%MonitoredCollection%",
ConnectionStringSetting = "CosmosDB",
LeaseCollectionPrefix = "%MonitoredDatabaseLeasePrefix%",
LeaseCollectionName = "leases",
CreateLeaseCollectionIfNotExists = true)] IReadOnlyList<Document> documents,
ILogger log)
{
// Do something with the documents
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment