In Azure Functions, using a Bash script, is it possible to access properties from the queue message trigger?

Viewed 3092

Using Azure Functions, I'd like use the properties from a dequeued message as arguments in my Bash script. Is this possible? And if so, how? It seems documentation on Bash azure functions is a bit sparse.

I have looked at:

  • This documentation on binding to custom input properties. It gives C#/Javascript examples, but no bash samples.
  • And this GitHub sample with a similar Batch function. However, after trying to apply the similar concepts to my function, I've come up short.

Here is my setup:

Functions.json

{
  "bindings": [
    {
      "name": "inputMessage",
      "type": "queueTrigger",
      "direction": "in",
      "queueName": "some-queue",
      "connection": "AzureWebJobsStorage"
    }
  ],
  "disabled": false
}

Run.sh

echo "My name is $FirstName $LastName"

Sample Queue Message

{ 
    "FirstName": "John",
    "LastName": "Doe"
}

Actual Result

My name is:

What I'm hoping for

My name is: John Doe

Any thoughts on how to accomplish this, either by updating Functions.json or Run.sh?

1 Answers
Related