Azure 事件网格中的事件源Event sources in Azure Event Grid

事件源即事件发生的位置。An event source is where the event happens. 会自动将多个 Azure 服务配置为发送事件。Several Azure services are automatically configured to send events. 也可创建用于发送事件的自定义应用程序。You can also create custom applications that send events. 不需要将自定义应用程序托管在 Azure 中即可使用事件网格来分发事件。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 订阅Azure subscriptions

订阅 Azure 订阅事件即可对整个 Azure 订阅中的资源更改进行响应。Subscribe to Azure Subscriptions events to respond to changes in resources across an Azure subscription.

标题Title 说明Description
教程:Azure 自动化与事件网格和 Microsoft TeamsTutorial: Azure Automation with Event Grid and Microsoft Teams 创建用于发送事件的虚拟机。Create a virtual machine, which sends an event. 此事件触发一个用于标记虚拟机的自动化 Runbook,并触发一条发送到 Microsoft Teams 频道的消息。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 使用门户订阅 Azure 订阅的事件。Use the portal to subscribe to events for an Azure subscription.
Azure CLI:订阅 Azure 订阅的事件Azure CLI: subscribe to events for an Azure subscription 用于在 Azure 订阅中创建事件网格订阅并将事件发送到 WebHook 的示例脚本。Sample script that creates an Event Grid subscription to an Azure subscription and sends events to a WebHook.
PowerShell:订阅 Azure 订阅的事件PowerShell: subscribe to events for an Azure subscription 用于在 Azure 订阅中创建事件网格订阅并将事件发送到 WebHook 的示例脚本。Sample script that creates an Event Grid subscription to an Azure subscription and sends events to a WebHook.
事件架构Event schema 显示 Azure 订阅事件中的字段。Shows fields in Azure subscription events.

容器注册表Container Registry

订阅容器注册表事件以响应映像中的更改。Subscribe to Container Registry events to respond to changes in images.

标题Title 说明Description
事件架构Event schema 显示容器注册表事件中的字段。Shows fields in Container Registry events.

自定义主题Custom topics

订阅自定义主题即可响应应用程序事件。Subscribe to custom topics to respond to application events.

标题Title 说明Description
快速入门:使用 Azure CLI 创建和路由自定义事件Quickstart: create and route custom events with Azure CLI 说明如何使用 Azure CLI 发送自定义事件。Shows how to use Azure CLI to send custom events.
快速入门:使用 Azure PowerShell 创建和路由自定义事件Quickstart: create and route custom events with Azure PowerShell 说明如何使用 Azure PowerShell 发送自定义事件。Shows how to use Azure PowerShell to send custom events.
快速入门:使用 Azure 门户创建和路由自定义事件Quickstart: create and route custom events with the Azure portal 说明如何使用门户发送自定义事件。Shows how to use the portal to send custom events.
快速入门:将自定义事件路由到 Azure 队列存储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:创建事件网格自定义主题Azure CLI: create Event Grid custom topic 用于创建自定义主题的示例脚本。Sample script that creates a custom topic. 该脚本检索终结点和密钥。The script retrieves the endpoint and a key.
Azure CLI:订阅自定义主题的事件Azure CLI: subscribe to events for a custom topic 用于创建自定义主题的订阅的示例脚本。Sample script that creates a subscription for a custom topic. 它将事件发送到 WebHook。It sends events to a WebHook.
PowerShell:创建事件网格自定义主题PowerShell: create Event Grid custom topic 用于创建自定义主题的示例脚本。Sample script that creates a custom topic. 该脚本检索终结点和密钥。The script retrieves the endpoint and a key.
PowerShell:订阅自定义主题的事件PowerShell: subscribe to events for a custom topic 用于创建自定义主题的订阅的示例脚本。Sample script that creates a subscription for a custom topic. 它将事件发送到 WebHook。It sends events to a WebHook.
资源管理器模板:自定义主题和 WebHook 终结点Resource Manager template: custom topic and WebHook endpoint 用于创建自定义主题及其订阅的资源管理器模板。A Resource Manager template that creates a custom topic and subscription for that custom topic. 它将事件发送到 WebHook。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. 它将事件发送到 Azure 事件中心。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 中心IoT Hub

订阅 IoT 中心事件以响应设备已创建、已删除、已连接、已断开连接和遥测事件。Subscribe to IoT Hub events to respond to device created, deleted, connected, disconnected and telemetry events.

标题Title 说明Description
使用逻辑应用发送有关 Azure IoT 中心事件的电子邮件Send email notifications about Azure IoT Hub events using Logic Apps 每次将设备添加到 IoT 中心时,逻辑应用就会发送一封通知电子邮件。A logic app sends a notification email every time a device is added to your IoT Hub.
事件架构Event schema 说明 IoT 中心事件中的字段。Shows fields in IoT Hub events.
订阅设备已连接和设备已断开连接事件Order device connected and device disconnected events 显示如何订阅设备连接状态事件。Shows how to order device connection state events.

资源组Resource groups

订阅资源组事件即可对整个资源组中的资源更改进行响应。Subscribe to resource group events to respond to changes in resources across a resource group.

标题Title 说明Description
教程:通过 Azure 事件网格和逻辑应用监视虚拟机更改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:订阅资源组的事件Azure CLI: subscribe to events for a resource group 用于订阅资源组的事件的示例脚本。Sample script that subscribes to events for a resource group. 它将事件发送到 WebHook。It sends events to a WebHook.
Azure CLI:订阅资源组的事件并筛选资源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:订阅资源组的事件PowerShell: subscribe to events for a resource group 用于订阅资源组的事件的示例脚本。Sample script that subscribes to events for a resource group. 它将事件发送到 WebHook。It sends events to a WebHook.
PowerShell:订阅资源组的事件并筛选资源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 订阅 Azure 订阅的事件或资源组。Subscribes to events for an Azure subscription or resource group. 它将事件发送到 WebHook。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
事件架构Event schema 说明服务总线事件中的字段。Shows fields in Service Bus events.

存储Storage

订阅 Blob 存储事件即可响应创建的 Blob 和删除的事件。Subscribe to Blob Storage events to respond to blob created and deleted events.

标题Title 说明Description
快速入门:使用 Azure 门户创建和路由 Blob 存储事件Quickstart: create and route Blob storage events with the Azure portal 介绍如何使用门户将 Blob 存储事件发送到 WebHook。Shows how to use the portal to send blob storage events to a WebHook.
Azure CLI:订阅 Blob 存储帐户的事件Azure CLI: subscribe to events for a Blob storage account 用于订阅 Blob 存储帐户的事件的示例脚本。Sample script that subscribes to event for a Blob storage account. 它将事件发送到 WebHook。It sends the event to a WebHook.
PowerShell:订阅 Blob 存储帐户的事件PowerShell: subscribe to events for a Blob storage account 用于订阅 Blob 存储帐户的事件的示例脚本。Sample script that subscribes to event for a Blob storage account. 它将事件发送到 WebHook。It sends the event to a WebHook.
资源管理器模板:创建 Blob 存储和订阅Resource Manager template: Create Blob storage and subscription 部署 Azure Blob 存储帐户并订阅该存储帐户的事件。Deploys an Azure Blob storage account and subscribes to events for that storage account. 它将事件发送到 WebHook。It sends events to a WebHook.
事件架构Event schema 说明 Blob 存储事件中的字段。Shows fields in Blob Storage events.

后续步骤Next steps