将文件添加到文件共享时获取通知 [英] Get notification when file added to File Share

查看:129
本文介绍了将文件添加到文件共享时获取通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将新文件添加/修改到Azure文件共享时,是否有办法得到通知?

Is there a way to get notified when a new file is added/modified to Azure File Share?

AWS S3具有类似的功能,在其中添加新文件时,可以配置S3存储桶以将消息发送到SQS或SNS或Lambda(或其他).

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.

一种替代方法(尽管不那么推荐)是能够查询共享中的文件,以便仅返回日期X之后的已修改/新文件.

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.

推荐答案

要获取有关添加或修改Blob(而非文件)的通知,您可以使用多个选项:

For getting notifications on addition/modification of blobs (not files), you have multiple options available:

  1. Azure函数(带有Blob存储绑定):在这种情况下,添加或更新Blob时将调用一个函数.有关此的更多详细信息,可以在这里找到: https ://docs.microsoft.com/zh-CN/azure/azure-functions/functions-bindings-storage-blob .
  2. Azure事件网格(带有Blob集成):当前(在提供此答案时),此服务处于预览阶段,并且在区域方面可用性有限.当前,它仅支持Blob Creation(不支持Blob更新)事件.可以在这里找到有关此的更多信息: https ://docs.microsoft.com/zh-CN/azure/storage/blobs/storage-blob-event-overview .
  1. 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.
  2. 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.

这篇关于将文件添加到文件共享时获取通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆