Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Azure Blob triggered function storage account connection

Hi I’m creating a new blob triggered azure function and I wanted to understand the role of the "Connection=" param in the header of the function:

public void Run([BlobTrigger("workitems/{name}", Connection = "")]Stream myBlob, string name, ILogger log)

What I did is to completely remove that param and after I deployed it to my azure subscription, it worked with no issues. So I’m wondering how the function is determining which storage account to use if I’m not specifying any particular account with the connection param.

This is how I deployed my function:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

public void Run([BlobTrigger("workitems/{name}")]Stream myBlob, string name, ILogger log)

>Solution :

Following link will help.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp

Also to be specific.

The storage account to use is determined in the following order:

  • The BlobTrigger attribute’s Connection property.
  • The StorageAccount attribute applied to the same parameter as the BlobTrigger attribute.
  • The StorageAccount attribute applied to the function.
  • The StorageAccount attribute applied to the class.
  • The default storage account for the function app ("AzureWebJobsStorage" app setting).

In your case last settings will apply. Check app settings at Azure.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading