【发布时间】:2021-04-21 03:08:26
【问题描述】:
我为BlobCreated 事件创建了一个事件订阅。我使用Azure Functions 和EventGridTrigger 来接收事件。现在,每次创建新 blob 时都会触发事件。是否可以在事件订阅中创建高级过滤器,以便仅当 blob 包含元数据时才传递事件?
【问题讨论】:
标签: azure azure-functions azure-blob-storage azure-eventgrid
我为BlobCreated 事件创建了一个事件订阅。我使用Azure Functions 和EventGridTrigger 来接收事件。现在,每次创建新 blob 时都会触发事件。是否可以在事件订阅中创建高级过滤器,以便仅当 blob 包含元数据时才传递事件?
【问题讨论】:
标签: azure azure-functions azure-blob-storage azure-eventgrid
不,AEG 高级筛选不支持此功能,请参阅 Azure Blob 存储的事件架构作为事件网格源 here。
正如您在本文档中看到的,事件数据对象中没有 blob 的元数据。
【讨论】:
metadata 接收到的 BlobCreated 事件吗?就像创建的文件一样,我想获取所有元数据的列表。
public static async void Runasync([EventGridTrigger] EventGridEvent eventGridEvent, [Blob("test/{name}", FileAccess.Read, Connection = "ConnectionString")] CloudBlockBlob blob, ILogger log),但仍然 blob 始终是null