Created
October 21, 2022 22:19
-
-
Save ealsur/913387a2414efaf4a5670c26dc55baea to your computer and use it in GitHub Desktop.
Azure Functions CosmosClient binding
This file contains hidden or 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("DocsByUsingCosmosClient")] | |
public static async Task<IActionResult> Run( | |
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", | |
Route = null)]HttpRequest req, | |
[CosmosDB( | |
databaseName: "ToDoItems", | |
containerName: "Items", | |
Connection = "CosmosDBConnection")] CosmosClient client, | |
ILogger log) { | |
// use the client to execute any SDK supported operation | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment