Event sources in Azure Event Grid

An event source is where the event happens. Several Azure services are automatically configured to send events. You can also create custom applications that send events. Custom applications don't need to be hosted in Azure to use Event Grid for event distribution.

This article provides links to content for each event source.

Azure subscriptions

Subscribe to Azure Subscriptions events to respond to changes in resources across an Azure subscription.

Title Description
Tutorial: Azure Automation with Event Grid and Microsoft Teams Create a virtual machine, which sends an event. The event triggers an Automation runbook that tags the virtual machine, and triggers a message that is sent to a Microsoft Teams channel.
How to: subscribe to events through portal Use the portal to subscribe to events for an Azure subscription.
Azure CLI: subscribe to events for an Azure subscription Sample script that creates an Event Grid subscription to an Azure subscription and sends events to a WebHook.
PowerShell: subscribe to events for an Azure subscription Sample script that creates an Event Grid subscription to an Azure subscription and sends events to a WebHook.
Event schema Shows fields in Azure subscription events.

Container Registry

Subscribe to Container Registry events to respond to changes in images.

Title Description
Quickstart: send container registry events Shows how to use Azure CLI to send Container Registry events.
Event schema Shows fields in Container Registry events.

Custom topics

Subscribe to custom topics to respond to application events.

Title Description
Quickstart: create and route custom events with Azure CLI Shows how to use Azure CLI to send custom events.
Quickstart: create and route custom events with Azure PowerShell Shows how to use Azure PowerShell to send custom events.
Quickstart: create and route custom events with the Azure portal Shows how to use the portal to send custom events.
Quickstart: route custom events to Azure Queue storage Describes how to send custom events to a Queue storage.
How to: post to custom topic Shows how to post an event to a custom topic.
Azure CLI: create Event Grid custom topic Sample script that creates a custom topic. The script retrieves the endpoint and a key.
Azure CLI: subscribe to events for a custom topic Sample script that creates a subscription for a custom topic. It sends events to a WebHook.
PowerShell: create Event Grid custom topic Sample script that creates a custom topic. The script retrieves the endpoint and a key.
PowerShell: subscribe to events for a custom topic Sample script that creates a subscription for a custom topic. It sends events to a WebHook.
Resource Manager template: custom topic and WebHook endpoint A Resource Manager template that creates a custom topic and subscription for that custom topic. It sends events to a WebHook.
Resource Manager template: custom topic and Event Hubs endpoint A Resource Manager template that creates a subscription for a custom topic. It sends events to an Azure Event Hubs.
Event schema Shows fields in custom events.

Event Hubs

Subscribe to Event Hubs events to respond to Capture file events. Event Hubs can act as either an event source or event handler. The following articles show how to use Event Hubs as a source.

Title Description
Tutorial: stream big data into a data warehouse When Event Hubs creates a Capture file, Event Grid sends an event to a function app. The app retrieves the Capture file and migrates data to a data warehouse.
Event schema Shows fields in Event Hubs events.

For examples of Event Hubs as a handler, see Event Hubs handler.

IoT Hub

Subscribe to IoT Hub events to respond to device created, deleted, connected and disconnected events.

Title Description
Send email notifications about Azure IoT Hub events using Logic Apps A logic app sends a notification email every time a device is added to your IoT Hub.
React to IoT Hub events by using Event Grid to trigger actions Overview of integrating IoT Hub with Event Grid.
Event schema Shows fields in IoT Hub events.
Order device connected and device disconnected events Shows how to order device connection state events.

Media Services

Subscribe to Media Services events to respond to job state events.

Title Description
Overview: reacting to Media Services events Overview of integrating Media Services with Event Grid.
Tutorial: route Azure Media Services events to a custom web endpoint using CLI Shows how to send events from Media Services.
Event schema Shows fields in Media Services events.

Resource groups

Subscribe to resource group events to respond to changes in resources across a resource group.

Title Description
Tutorial: monitor virtual machine changes with Azure Event Grid and Logic Apps A logic app monitors changes to a virtual machine and sends emails about those changes.
Azure CLI: subscribe to events for a resource group Sample script that subscribes to events for a resource group. It sends events to a WebHook.
Azure CLI: subscribe to events for a resource group and filter for a resource Sample script that subscribes to events for a resource group and filters events for one resource.
PowerShell: subscribe to events for a resource group Sample script that subscribes to events for a resource group. It sends events to a WebHook.
PowerShell: subscribe to events for a resource group and filter for a resource Sample script that subscribes to events for a resource group and filters events for one resource.
Resource Manager template: resource subscription Subscribes to events for an Azure subscription or resource group. It sends events to a WebHook.
Event Schema Shows fields in resource group events.

Service Bus

Subscribe to Service Bus events to respond to messages without an active listener.

Title Description
Tutorial: Azure Service Bus to Azure Event Grid integration examples Event Grid sends messages from Service Bus topic to function app and logic app.
Overview: Azure Service Bus to Event Grid integration Overview of integrating Service Bus with Event Grid.
Event schema Shows fields in Service Bus events.

Storage

Subscribe to Blob Storage events to respond to blob created and deleted events.

Title Description
Quickstart: route Blob storage events to a custom web endpoint with Azure CLI Shows how to use Azure CLI to send blob storage events to a WebHook.
Quickstart: route Blob storage events to a custom web endpoint with PowerShell Shows how to use Azure PowerShell to send blob storage events to a WebHook.
Quickstart: create and route Blob storage events with the Azure portal Shows how to use the portal to send blob storage events to a WebHook.
Azure CLI: subscribe to events for a Blob storage account Sample script that subscribes to event for a Blob storage account. It sends the event to a WebHook.
PowerShell: subscribe to events for a Blob storage account Sample script that subscribes to event for a Blob storage account. It sends the event to a WebHook.
Resource Manager template: Create Blob storage and subscription Deploys an Azure Blob storage account and subscribes to events for that storage account. It sends events to a WebHook.
Overview: reacting to Blob storage events Overview of integrating Blob storage with Event Grid.
Event schema Shows fields in Blob Storage events.

Next steps