I am trying to create a cosmos db trigger for Gremlin API, since the trigger requires partition key as /id, I am not able to create it either from settings in trigger itself (createLeaseCollectionIfNotExists) nor from the azure portal, since it partition key cannot be either /id or /label.
is there any work around for the same, either creating a timer trigger using change feed to look for partition key I have specified in Gremplin API containers or any configuration changes in the api/containter itself
Error Message:
The 'CosmosTrigger' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.CosmosTrigger'. Microsoft.Azure.WebJobs.Extensions.CosmosDB: Cannot create Collection Information for Contacts in database GraphDB with lease leases in database GraphDB : Partition key path /id is invalid for Gremlin API. The path cannot be '/id', '/label' or a nested path such as '/key/path'
function.json:
{
"scriptFile": "__init__.py",
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "documents",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "DOCUMENTDB",
"databaseName": "GraphDB",
"collectionName": "Contacts",
"createLeaseCollectionIfNotExists": true
}
]
}
If any of the collections in the target account inside the provided database do not exist, the error message will appear.
A Firewall rule (either Virtual Network or IP rules) of your account prevents access to your current workstation.