-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect to cosmosDB #20
Comments
There is an official way, using input/output bindings. Sampleslisten for updates in the database {
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "documents",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "AzureWebJobsStorage",
"databaseName": "database",
"collectionName": "collections",
"createLeaseCollectionIfNotExists": "true"
}
]
}
DocsIn the docs, any tab other than C# should have the same Sidenote: This question could have been asked on StackOverflow as all this info is publicly documented but it takes a good amount of research and a while to understand! Good luck with your handler and if you need some more help feel free to reply but I can't help with Rust code/syntax |
@fallsimply I have published the question on SO. |
For anyone who had the same issue. The cosmos db data can be found under Data.”name” ( name is the name you set on the in binding ) in the request body. I was building my http triggers first and thought the behavior was the same with “enableForwardingHttpRequest” set to true, but this only works for http triggers with every other trigger the function host sends the raw data to a with a post method and route equal to the folder name where the function.json is found. |
Hi, it is more question than issue.
I know, I can ask it on stackowerflow, but since I'm asking about official way, only you know it.
Is there official way to connect to CosmosDB through RUst custom handler ?
Thanks
The text was updated successfully, but these errors were encountered: