Azure Function deletes files older than 30 days.
Why need it? https://feedback.azure.com/forums/169385-web-apps/suggestions/39782458-web-app-application-logging-blob-retention
Sample Code:
1 | using System; |
Change “Your Storage Account Name”, “Your Account Access Key”, “Your Container Name”, and Days.
Build and publish it to your Function App.
For more information:
Create a function in Azure that is triggered by a timer
https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-scheduled-function
Timer trigger for Azure Functions
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=csharp