I created a trigger on a cosmosdb to azure function in azure, I couldn't find anything in documents how to distinguish between delete, update and create
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "input",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "pcmDevValidAppsTrigger_ConnectionString",
"databaseName": "pcmobile-dev",
"collectionName": "validApps",
"createLeaseCollectionIfNotExists": true
}
]
}
module.exports = async (context, documents) => {
context.log('Document Id: ', documents[0].id);
}