Googleアナリティクス

2017年8月17日木曜日

Use Azure EventGrid with LogicApps

Original post is here.

Finally announced Azure Event Grid。It is a very interesting service that not only the exchange of messaging by the subscription topic type which we are currently doing by ServiceBus but also the detection and linkage of the event occurring on Azure will be possible. First I tried to summarize until using it on LogicApps.

LogicApps was originally prepared for coordination with EventGrid, and EventGrid connector has already been provided.

image

Only one trigger is provided on the connector. It is a trigger when we receive some event from EventGrid.

The items to be set are as follows.

  • Subscription:Select your subscription.
  • Resource Type:The type of event you want to obtain. In addition to EventGrid Topic, you can select EventHub, Azure resource group, Azure subscription.
  • Resource Name:The object you want to acquire. For EventGrid Topic it is automatic, from the existing EventHub name space for EventHub, existing resource group for Azure resource group, existing subscription for Azure subscription.

For example, if you specify a resource group, if processing corresponding to "write" or "delete" occurs in the specified resource group, it will be notified as an event. This is the case, for example, when creating / updating LogicApps, changing VM setting.

If you specify a subscription, you will be able to notify the same processing as "write" or "delete" that occurred on the selected subscription. Although it was done also in the demonstration of Ch9, it seems to be easy to understand the addition of an account etc.

When you set up and save the EventGrid connector with LogicApps, the necessary settings for EventGrid are automatically performed at that timing. I do not need to open EventGrid on the portal and do something else first, I think that it is very wonderful to be able to use without worrying about anything.

If you wish to use the EventGrid Connector to detect resource groups and subscription events, you need to set permissions beforehand. As there is no suitable role, probably it seems that you have to set the equivalent of "owner" as authority at present.

image

If there are insufficient permissions, LogicFlow's "failed" history increases in the trigger history. In case of EventGrid trigger, it tries to operate immediately after saving.

image

When you check the history, you can confirm that AuthorizationFailed is not enough authority, thus it is an authentication error. If you get such an error please grant authority to account or application.

image

I tried to create another LogicApps for another resource group that I tried to set as a target in the EventGrid(TestApps2)

image

In this way, Subject will be notified of LogicApps information created.It was detected as Microsoft.Resources.ResourceWriteSuccess as an event type, and a notification was sent to LogicApps.

Using EventGrid like this · LogicApps is very easy to try. Setting the EventGrid itself does nothing, It is only set up on LogicApps, so please feel free to use it by all means.

By using EventGrid, it is easy to integrate events that were previously distributed in ServiceBus and EventHub, and it is also easy to handle events that occurred by switching from LogicApps to Function Apps, or by setting it to Webhook Switching to cooperate with an external system can be done very easily, so I think that "hybrid integration" will become more and more easily available.

0 件のコメント:

コメントを投稿