问题
Is there a way to get notified when a new file is added/modified to Azure File Share?
Similar feature exists with AWS S3 where one can configure an S3 bucket to send message to SQS or SNS or Lambda (or other) when a new File is added.
An alternative (though less preferred) is to be able to query files in a share such that only modified/new files after date X will be returned.
回答1:
For getting notifications on addition/modification of blobs (not files), you have multiple options available:
- Azure Functions (w/ Blob Storage Binding): In this scenario, a function will get invoked when a blob is added or updated. More details about this can be found here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob.
- Azure Event Grid (w/ Blob Integration): Currently (at the time of providing this answer), this service is in preview and has limited availability in terms of regions. Currently it only supports
Blob Creation
(and not blob updation) event. More information about this can be found here: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-event-overview.
来源:https://stackoverflow.com/questions/47676541/get-notification-when-file-added-to-file-share