This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0", | |
"logging": { | |
"fileLoggingMode": "always", | |
"logLevel": { | |
"Host.Triggers.CosmosDB": "Trace" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static async Task<HttpResponseMessage> Run( | |
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req, | |
[CosmosDB(databaseName: "%CosmosDBDatabase%", | |
collectionName: "%CosmosDBCollection%", | |
ConnectionStringSetting = "CosmosDBConnectionString", | |
UseMultipleWriteLocations = true, | |
PreferredLocations = "Central US" | |
)] IAsyncCollector<MyClass> documentsToSave, | |
ILogger log) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static HttpResponseMessage Run( | |
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "HttpInputBindingByIdInRoute/{id}")] HttpRequestMessage req, | |
[CosmosDB(databaseName: "%CosmosDBDatabase%", | |
collectionName: "%CosmosDBCollection%", | |
ConnectionStringSetting = "CosmosDBConnectionString", | |
UseMultipleWriteLocations = true, | |
PreferredLocations = "Central US,North Central US" | |
Id = "{id}")] Document document, | |
ILogger log) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cosmosDB": { | |
"connectionMode": "Direct", | |
"protocol": "Tcp" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"documentDB": { | |
"connectionMode": "Direct", | |
"protocol": "Tcp" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bindings": [ | |
{ | |
"type": "cosmosDBTrigger", | |
"name": "input", | |
"direction": "in", | |
"leaseCollectionName": "leases", | |
"connectionStringSetting": "<your-connectionstring-setting>", | |
"databaseName": "<your-monitored-database>", | |
"collectionName": "<your-monitored-collection>", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bindings": [ | |
{ | |
"type": "cosmosDBTrigger", | |
"name": "input", | |
"direction": "in", | |
"leaseCollectionName": "leases", | |
"connectionStringSetting": "<your-connectionstring-setting>", | |
"databaseName": "<your-monitored-database>", | |
"collectionName": "<your-monitored-collection>", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"Microsoft.Azure.KeyVault": "2.3.2", | |
"Microsoft.Azure.Services.AppAuthentication": "1.1.0-preview" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bindings": [ | |
{ | |
"name": "req", | |
"type": "httpTrigger", | |
"direction": "in" | |
}, | |
{ | |
"name": "$return", | |
"type": "http", |