【发布时间】:2020-05-29 03:29:03
【问题描述】:
我正在尝试使用 "endpointType": "AzureFunction" 创建事件网格主题订阅。它给出了以下错误:-
“错误”:{ "code": "无效请求", "message": "无效的事件订阅请求:提供的 URL 无效。它不能为空或空,应该是正确的 HTTPS URL 比如https://www.example.com。” }
我的 ARM 模板如下:-
{
"name": "[concat(variables('eventGridTopicName'), '/Microsoft.EventGrid/', variables('myFuncName'))]",
"type": "Microsoft.EventGrid/topics/providers/eventSubscriptions",
"apiVersion": "2019-01-01",
"location": "[parameters('location')]",
"properties": {
"topic": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('resourceGroupName'), '/providers/Microsoft.EventGrid/topics/', variables('eventGridTopicName'))]",
"destination": {
"endpointType": "AzureFunction",
"properties": {
"resourceId": "[resourceId('Microsoft.Web/sites/functions/', variables('funcAppName'), variables('myFuncName'))]",
"maxEventsPerBatch": 1,
"preferredBatchSizeInKilobytes": 64
}
},
"filter": {
"advancedFilters": [
{
"operatorType": "StringIn",
"key": "eventType",
"values": [
"xyzEvent"
]
},
{
"operatorType": "StringIn",
"key": "subject",
"values": [
"xyzEventReceived"
]
}
]
},
"labels": [],
"eventDeliverySchema": "EventGridSchema"
},
"dependsOn": [
"[variables('eventGridTopicName')]"
]
}
之前,我使用 EndpointType 作为 webhook,因为 Azure 函数、存储队列等新的事件处理程序不可用 (https://docs.microsoft.com/en-us/azure/event-grid/event-handlers)。我使用了 Azure 门户生成的 arm 模板,如下所示:-
有人遇到过这个问题吗?
【问题讨论】:
标签: azure azure-functions azure-resource-manager arm-template azure-eventgrid