Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
413 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 Reply

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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...