Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
417 views
in Technique[技术] by (71.8m points)

Azure Powershell Function Append to Blob using Push-Outputbinding

I made an Azure Powershell function that needs to write some data into a blob, so am using an outputBlob binding along with:

Push-OutputBinding -Name <name> -Value <value>

That writes the data I need into the blob - great! But the issue is that every time the function runs it overwrites the blob content. I cannot see how to get the Push-OutputBinding cmdlet to append data into the blob, rather than 'set' it. I have tried setting the -Clobber switch, but it doesn't seem to make any difference.

Bindings seem like a nice way to interact with Blob storage without having to pull in more code to instantiate a more full-on client session, I hope this is possible? Would appreciate any pointers.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I'm reasonably confident there is no native way to append to a blob in powershell and in the output binding of an azure function, so you'd have to code for that (also, i think the only way to append to block blob is to download the content and append locally and reupload, but I'm not sure about this one).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...