将中继混合连接用作 Azure 事件网格事件的事件处理程序Relay Hybrid connection as an event handler for Azure Event Grid events

事件处理程序是发送事件的位置。An event handler is the place where the event is sent. 处理程序将执行一些进一步的操作来处理事件。The handler takes some further action to process the event. 一些 Azure 服务被自动配置为处理事件,Azure 中继就是其中之一。Several Azure services are automatically configured to handle events and Azure Relay is one of them.

使用 Azure 中继混合连接将事件发送到企业网络内没有公共访问终结点的应用。Use Azure Relay Hybrid Connections to send events to applications that are within an enterprise network and don't have a publicly accessible endpoint.

教程Tutorials

有关将 Azure 中继混合连接用作事件处理程序的示例,请参阅以下教程。See the following tutorial for an example of using an Azure Relay hybrid connection as an event handler.

标题Title 说明Description
教程:将事件发送到混合连接Tutorial: send events to hybrid connection 将自定义事件发送到现有混合连接以供侦听器应用程序处理。Sends a custom event to an existing hybrid connection for processing by a listener application.

REST 示例(适用于 PUT)REST example (for PUT)

{
    "properties": 
    {
        "destination": 
        {
            "endpointType": "HybridConnection",
            "properties": 
            {
                "resourceId": "/subscriptions/<AZURE SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.Relay/namespaces/<RELAY NAMESPACE NAME>/hybridconnections/<HYBRID CONNECTION NAME>"
            }
        },
        "eventDeliverySchema": "EventGridSchema"
    }
}

后续步骤Next steps

如需支持的事件处理程序的列表,请参阅事件处理程序一文。See the Event handlers article for a list of supported event handlers.