I am trying to accomplish, that when I create a snapshot with an Azure function on create/modify, that it also sets the snapshot to the cool tier.
The storage account itself, needs to be the Hot tier, while snapshots should not.
How do i accomplish this? I have tried to look through the documentation, but are only able to see the GUI guide for doing it on single blobs manually.
Can I not accomplish this in the blobtrigger itself?
[FunctionName("CreateSnapshotAndCool")]
public static void Run([BlobTrigger("images/{name}", Connection = "AzureWebJobsStorage")]CloudBlockBlob myBlob, string name, ILogger log)
{
log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name}");
log.LogInformation("take snapshots for blob: " + name);
myBlob.SnapshotAsync().Wait();
// Change snapshot just created to cool tier.
}