Pradeep
Pradeep

Reputation: 5530

how can get an alert on “aged files” in Azure Storage Account Containers?

I have Azure Storage Account which contains files in Blob Container. I want to send alert, if a file is sitting in one of the sub folders in a container for more than a day.

So, can anyone suggest me how we can get an alert on “aged files” in Azure Storage Account Containers.

Upvotes: 0

Views: 950

Answers (1)

Frank Borzage
Frank Borzage

Reputation: 6816

I designed a workflow in azure logic app. You can use Azure Storage Blob connecter to list blobs in your container, then you can use for each to traverse your blobs:

enter image description here

enter image description here

Within the for each action, you need to use condition action to compare its time. Here, I use the current time minus 24 hours to compare with the last modified time of the blob.

enter image description here

addHours expression

addHours(utcNow('yyyy-MM-ddTHH:mm:ss'),-24,'yyyy-MM-ddTHH:mm:ss')

=================update========================

enter image description here

enter image description here

enter image description here

Upvotes: 1

Related Questions