将Azure Blob存储事件通知发送到另一个帐户的事件中心 [英] Send Azure Blob Storage event notifications to Event Hubs on another account

查看:118
本文介绍了将Azure Blob存储事件通知发送到另一个帐户的事件中心的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Azure中,我试图将事件通知从一个Active Directory中的存储帐户发送到另一个Active Directory中的事件中心.

In Azure, I'm trying to send event notifications from a Storage Account in one Active Directory to an Event Hub in another Active Directory.

我在弄清楚如何共享/链接资源时遇到了麻烦.

I'm having trouble figuring out how to share/link the resource.

在AWS中,我能够通过在接收方帐户中创建角色,按ID添加源帐户,添加SQS Writer资源许可权以及将SQS队列ARN添加为存储桶通知目标来实现这一点.我猜想Azure中可能有类似的事情.

In AWS, I was able to accomplish this by creating a role in the receiver account, adding the source account by ID, adding the SQS Writer resource permission, and adding the SQS Queue ARN as the bucket notification destination. I'm guessing something similar is possible in Azure..

目前,我正在查看Active Directory IAM,它似乎具有EventGrid EventSubscription Contributor属性.在目标帐户中,我已将源帐户添加为贡献者,并且在源帐户中收到一条通知,通知我我拥有目标帐户的权限,但是当我尝试在源帐户中创建事件订阅时,目标帐户不会显示为选项.

At the moment, I am looking at Active Directory IAM, which appears to have the EventGrid EventSubscription Contributor property. In the destination account I have added the source account as a contributor, and I received a notification in the source account that I had permissions in the destination account, but when I try to create an event subscription in the source account, the Event Hubs in the destination account don't show as an option.

如何从一个帐户的另一个存储帐户向一个帐户的事件中心写入事件通知?

How can I write event notifications to Event Hubs in one account from a Storage Account in another?

推荐答案

绝对可以.我认为可以通过多种方式在不同的订阅中执行此操作,例如以下两种.

Absolutely yes. I think there are many ways to do that across different subscriptions, such as the two below.

  1. 解决方案1以使用Azure函数.您可以将Azure函数与Blob触发器结合使用来获取Blob更改的事件通知,然后通过PUT/POST方法通过HttpTrigger请求另一个Azure函数,以通过SAS令牌传输blob信息(例如blob url)的事件消息用于访问其他订阅.

  1. Solution 1 to use Azure Functions. You can use Azure Function with Blob Trigger to get the event notifications of blob changes, and then to request the other Azure Function with HttpTrigger via PUT/POST method to transfer the event message of blob information like blob url with SAS token for accessing in other subscriptions.

解决方案2以使用Azure Logic应用.您可以使用下面的逻辑流来获取Blob更改事件,以将通知消息发送到其他订阅中的EventHub,因为Azure Logic Apps允许如下手动配置其连接信息.

Solution 2 to use Azure Logic Apps. You can use the logic flow below to get the blob change events to send the notification message to EventHub in other subscriptions, because Azure Logic Apps allows to configure their connection information manually as below.

图1.从Blob存储获取事件并发送到EventHub的逻辑流程

Fig 1. The logic flow to get events from Blob Storage and send to EventHub

图2.单击Manually enter connection information以配置其他订阅中的服务.

Fig 2. Click the Manually enter connection information to configure for a service in other subscriptions.

图2-A.

图2-B.

这篇关于将Azure Blob存储事件通知发送到另一个帐户的事件中心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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