Very new to Azure and Function Apps.
I'm trying to set up a simple Function app using Powershell which needs to read the content from a blob (simple .txt file), do some simple processing on it and write a copy of that file into different blob.
So far I have set up the integration on the app, which I can see provides a binding I can use. Looks like this:
{
"name": "inputBlob",
"direction": "in",
"type": "blob",
"path": "input/logs.txt",
"connection": "AzureWebJobsStorage"
}
I'm referencing that binding in the powershell params at the start of the script:
# Input bindings are passed in via param block.
param($Request, $TriggerMetadata, $inputBlob)
As I understand things this should allow me to connect to that blob and interact with it. What I don't understand is how should that be done? I have tried to use the cmdlet that seems to make the most sense for the situation: Get-AzStorageBlobContent
for example:
$blobContent = Get-AzStorageBlobContent -name $inputBlob
But when I try to return that content in my http reponse (so I can check that it was read), the response body is empty.
I presume that I will need to add further bindings for outputing to blobs too?
For example, the Set-AzStorageBlobContent cmdlet seems to only support 'files' but in my case within the function app, I don't have a file, just a string or an array, so how do I push that content into the target blob?
Would appreciate any pointers on how to achieve this,