Azure Event Grid Webhook validation handshake - azure

I would like to know if it is possible to have Azure Web Site (ASP.NET Core) and Azure Event Grid with Webhook to the Azure Web Site in the same ARM Template?
For the first time, there is no possibility to validate Webhook.
Of course, I can split it into the two ARM Templates and deploy 1st ARM with the Application, deploy the Application and add the Event Grid Webhook.
Is it some other workaround here? I can use Event Grid Schema or Cloud Events Schema.

another workaround can be used to create an event subscription with some destination resource handler (for instance: storage queue) and then updating for your webhook handler.

Related

Subscribe to External Azure Web PubSub Service from Azure

I have an external vendor who would like me to subscribe to their Azure Web PubSub service from which I will receive notifications when a certain event occurs. What is the best way to subscribe to these events from my own Azure environment? I am familiar with handling HTTP requests from Azure Functions and Azure Logic Apps, but this is my first time using Websockets within Azure (and I am new to Azure itself).
Edit: Also, I have read the documentation on Azure Web PubSub and have followed along with some of the tutorials. Most either show how to subscribe from a C# console application or a web app, but what if I want to kick off a workflow in Azure when the notification is received?
subscribe to their Azure Web PubSub service from which I will receive notifications when a certain event occurs
Looks like you will be acting as the event handler upstream role. You can have an app server running and listen to the CloudEvents HTTP request from Azure Web PubSub service. https://learn.microsoft.com/en-us/azure/azure-web-pubsub/reference-cloud-events
Here is a sample about handling events: https://learn.microsoft.com/en-us/azure/azure-web-pubsub/tutorial-build-chat?tabs=csharp#handle-events

Azure DevOps Custom ServiceHook

I am looking for a way to send a custom HTTP POST on service hook action. Kind of like the default WebHook functionality but with a customised body.
Is there a way to link a custom action to the consumer event?
You can add some proxy like azure function that will reformat your message and if need call Azure DevOps rest api and also get more information, and after reformatting message you send it to final consumer. You can use logic app also for that.
You can use azure logic app as suggested by #Janusz Nowak to send a custom http post on the event in azure devops.
You can check out Quickstart: Create your first workflow by using Azure Logic Apps - Azure portal.
After the logic app is created in your azure portal. In the Logic app designer page choose the Blank Logic App in templates.
In the search box type in azure devops and select a trigger event in azure devops.
Then you will be prompted to authorize the logic app to connect to your azure devops.
When you complete configuring your organization and project in the event trigger. Click ** + New Step** to add a HTTP action
You can customize your Http Request in the Http action.

Azure Event Grid not sending events to webhook

I have an Azure media services account for which I want to be notified via webhook when encoding jobs are finished. I'm using v3 of the Media Service API.
I've added an event subscription to this account and have sucessfully validated the webhook endpoint.
Here's where the problem comes in. If I do something that should trigger an event(start an encoding job, create an asset, etc.) on the Azure Portal nothing happens event wise. Looking at the event subscription on the Portal shows no events detected as well.
Is this an Azure bug or am I missing something?
As it turns out, actions done through the Portal or v2 of the API does not trigger Events from Event Grid.
I used Azure Media Services Explorer to test out my webhooks instead.

Azure Create Resource Monitoring Webhooks using Rest API

In Azure is it possible to create an alert, with a webhook, if any of my resource goes up or down(not service, but resource)? I see many alert conditions but none of them do plain up/down monitoring.
Is it possible to create these alerts (with a webhook) programatically using REST API(without logging into Azure portal), once i get the required authorization? Currently I am unable to find any create alert REST API
Thanks.
Ok, I found out how to do this.
The REST API provided by Azure for monitoring can be used to create new Action Groups and create new Alerts.
The document here gives more details: https://learn.microsoft.com/en-us/rest/api/monitor/actiongroups
https://learn.microsoft.com/en-us/rest/api/monitor/alertrules/createorupdate

Azure Resource Group template for Cloud Service and Notification Hub

I'm trying to create Azure Resource Group template for an application consisting of: Cloud Service (with single WebRole), Notification Hub, Azure Storage and Azure SQL.
I started in VS2013 by creating AzureResourceGroup project and using the JSON Outline i can add storage and SQL resources. But Cloud Service and Notification Hub is missing in Add Resource dialog. What is the schema for them? What is the best way to add them to the template?
Edit: I found schema for NotificatonHubs here and was able to add template for it. Still don't know how to define the Cloud Service.
Cloud Services are in a "private preview" on ARM so we won't have snippets in VS until it goes public. I think that you have to be whitelisted as part of the preview to deploy at the moment... (i.e. the deployment will fail if you're not whitelisted)

Resources