Despite many posts in here or elsewhere I still have not found how to read a blob storage from an azure function.
I have as follows
Each of the above containers has a json file “customer.json”
Now I need to call my function and pass a parameter eg "london" to retrieve the london customer
Customer customer= await azureFunctionService.GetCustomer(“London”);
What should the function look like, ideally I would like to use input binding to read the json file from a function but any other way is fine too.
[FunctionName("GetCustomer")]
public static void Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
string inputBlobPath,
[Blob("howDoIBuildPathIncludingtheparameter",
FileAccess.Read, Connection = "WhereDoIGetThis")] string json,
ILogger log)
{
// Not sure if anything is required here apart from logging when using input binding
//
}
Any suggestions?
many thanks
