ARM模板为EndpointType作为AzureFunction的主题进行事件订阅

问题描述 投票:0回答:2

我正在尝试使用“ endpointType”:“ AzureFunction”]创建事件网格主题订阅。它给出了以下错误:-

“错误”:{“ code”:“ InvalidRequest”,“ message”:“无效的事件订阅请求:提供的URL无效。它不能为null或为空,并且应该是正确的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门户生成的手臂模板,如下所示:-

enter image description here

有人遇到过这个问题吗?

我正在尝试使用“ endpointType”:“ AzureFunction”创建事件网格主题订阅。它给出了以下错误:-“错误”:{“代码”:“ InvalidRequest”,“消息”:“无效...

azure azure-functions azure-resource-manager arm-template azure-eventgrid
2个回答
1
投票

是!当我遇到同样的问题时发现了这个! ..


0
投票

Jakob更改api版本的建议对我来说,通过resourceId的更改。这是我修改后的工作模板:-

© www.soinside.com 2019 - 2024. All rights reserved.