Input/output bindings

Some bindings are bi-directional, while some can be used only one way. What's more, not every binding can be used as a trigger. An example of both bi-directional and trigger binding is Azure Blob Storage. Here, you can find an example of how it works as a trigger:

[FunctionName("BlobTriggerCSharp")] public static void Run([BlobTrigger("my-blobs/{name}")] Stream myBlob, string name, TraceWriter log){}

Compare it with an example of a function triggered by a queue, but accepting blob as input:

[FunctionName("BlobInput")]public static void BlobInput(  [QueueTrigger("myqueue-items")] string myQueueItem,  [Blob("samples-workitems/{queueTrigger}", FileAccess.Read)] Stream myBlob,  TraceWriter log){}

As you can see, I used ...

Get Hands-On Azure for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.