Event subscription by ARM template for topic with EndpointType as AzureFunction

后端 未结 2 1286
孤街浪徒
孤街浪徒 2021-01-22 13:27

I am trying to create an event grid topic subscription with \"endpointType\": \"AzureFunction\". It is giving following error: -

\"error\

2条回答
  •  一整个雨季
    2021-01-22 13:40

    Jakob's suggestion for changing api version worked for me with change in resourceId. Here is my modified working template: -

    {
          "name": "[concat(variables('eventGridTopicName'), '/Microsoft.EventGrid/', variables('myFuncName'))]",
          "type": "Microsoft.EventGrid/topics/providers/eventSubscriptions",
          "apiVersion": "2020-01-01-preview",
          "location": "[parameters('location')]",
          "properties": {
            "topic": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('resourceGroupName'), '/providers/Microsoft.EventGrid/topics/', variables('eventGridTopicName'))]",
            "destination": {
              "endpointType": "AzureFunction",
              "properties": {
                "resourceId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/sites/', variables('funcAppName'), '/functions/' , 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')]"
          ]
        }
    

提交回复
热议问题