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:
public void Run([BlobTrigger("workitems/{name}")]Stream myBlob, string name, ILogger log)
>Solution :
Following link will help.
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.