Is there a way of enforcing Etag AccessCondition check for the first time data is uploaded to the blob (when the blob does not exist)?
I have multiple different servers updating the same blob. When the blob already exists, it's very easy to enforce the Etag AccessCondition on write and that works fine.
What I cannot do is enforce Etag check at blob creation time.
Found the solution to this here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/a02ff6ab-dceb-4955-908b-7e39137e4774/concurrent-upload-to-azure-blob-using-same-key?forum=windowsazuredata
So basically here are the two AccessConditions needed:
AccessCondition.GenerateIfNoneMatchCondition("*")
AccessCondition.GenerateIfMatchCondition(_etag)
"*" (asterisk character) is a special wildcard string used by Azure. The condition #1 says that the operation should be executed as long as the resource has no Etag values at all (which is only possible if the resource does not exist).