View precompiled.cs
[FunctionName("Trigger1")]
public static void Run(
[CosmosDBTrigger("<your-monitored-database>",
"<your-monitored-collection>",
ConnectionStringSetting = "<your-connectionstring-setting>"
LeaseCollectionPrefix = "trigger1")]
IReadOnlyList<Document> input,
TraceWriter log)
{
log.Info("Documents modified " + input.Count);
View function2.json
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "input",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "<your-connectionstring-setting>",
"databaseName": "<your-monitored-database>",
"collectionName": "<your-monitored-collection>",
View function.json
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "input",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "<your-connectionstring-setting>",
"databaseName": "<your-monitored-database>",
"collectionName": "<your-monitored-collection>",
View project.json
{
"frameworks": {
"net46":{
"dependencies": {
"Microsoft.Azure.KeyVault": "2.3.2",
"Microsoft.Azure.Services.AppAuthentication": "1.1.0-preview"
}
}
}
}
View function.json
{
"bindings": [
{
"name": "req",
"type": "httpTrigger",
"direction": "in"
},
{
"name": "$return",
"type": "http",
View run.csx
#r "Microsoft.Azure.Documents.Client"
using Microsoft.Azure.Documents;
using Microsoft.Azure.Documents.Client;
using System.Net;
using System.Configuration;
using Microsoft.Azure.KeyVault;
using Microsoft.Azure.Services.AppAuthentication;
private static HttpClient httpClient = new HttpClient();
private static DocumentClient client = null;
View sample.json
{
"name": "john",
"born": "1983-05-07",
"id": "f08cfd6b-303e-654b-9c49-41a47ebbeae7"
}
View project.json
{
"frameworks": {
"net46":{
"dependencies": {
"Microsoft.Azure.Search": "3.0.5"
}
}
}
}
View run.csx
#r "Microsoft.Azure.Documents.Client"
using System;
using System.Configuration;
using System.Collections.Generic;
using Microsoft.Azure.Documents;
using Microsoft.Azure.Search;
private static string searchServiceName = ConfigurationManager.AppSettings["SearchServiceName"];
private static string searchServiceKey = ConfigurationManager.AppSettings["SearchServiceKey"];
private static SearchServiceClient serviceClient = new SearchServiceClient(searchServiceName, new SearchCredentials(searchServiceKey));