I am trying to create an Azure Function with a ServiceBus Queue trigger and an additional input data. That is the function should trigger on blob update giving the blob name as input. I want to have a Blob data as an additional input.
The function.json created is as below.
{
"bindings": [
{
"name": "myQueueItem",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "afqueue",
"connection": "CONNECTIONSTRING",
"accessRights": "Listen"
},
{
"type": "blob",
"name": "inputBlob",
"path": "samplecontainer/{name}",
"connection": "AzureWebJobsDashboard",
"direction": "in"
}
],
"disabled": false
}
The function signature defined is as follows.
public static void Run(string myQueueItem, Stream inputBlob, TraceWriter log){}
This gives an error as below
Function ($ServiceBusQueueTriggerCSharp1) Error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.ServiceBusQueueTriggerCSharp1'. Microsoft.Azure.WebJobs.Host: No binding parameter exists for 'name'.
Instead of paramter {name}, if a hardcoded value is given the function is working properly. How to do the binding to input data variable.