【问题标题】:Event subscription of type WEBHOOK with static Header using ARM template使用 ARM 模板的带有静态 Header 的 WEBHOOK 类型的事件订阅
【发布时间】:2022-01-01 22:53:15
【问题描述】:

问题领域

我尝试按照官方文档使用 ARM 模板创建新的事件网格主题订阅。

脚本在 PowerShell 终端中运行良好,但我在 azure 门户中的指定主题下找不到正在生成的事件订阅。

示例 JSON 模板

{
  "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.EventGrid/eventSubscriptions",
      "apiVersion": "2021-06-01-preview",
      "name": "Subscription_1",
      "properties": {
        "destination": {
          "topic": "/subscriptions/{Subscription Id})/resourceGroups/{Resource group name}/providers/Microsoft.EventGrid/topics/{Topic name}}",
          "endpointType": "WebHook",
          "properties": {
              "endpointUrl": "{Endpoint URL}",
              "deliveryAttributeMappings": [
                  {
                      "name": "test",
                      "type": "Static",
                      "properties": {
                          "value": "test"
                      }
                  }
              ]
          }
        },
        "eventDeliverySchema": "EventGridSchema",
        "filter": {
          "advancedFilters": [],
          "enableAdvancedFilteringOnArrays": true
        },
        "labels": []      
      }
    }
  ]
}

【问题讨论】:

    标签: azure arm-template azure-eventgrid azure-webhooks


    【解决方案1】:

    解决方案

    通过更改 arm 模板中的“类型”和“命名约定”,如下所示:

    "type": "Microsoft.EventGrid/topics/providers/eventSubscriptions",
    "apiVersion": "2021-06-01-preview",
    "name": "{Topic Name}/ Microsoft.EventGrid/ {Subsctription Name}",
    

    【讨论】:

      猜你喜欢
      • 2019-11-05
      • 1970-01-01
      • 2020-05-29
      • 2018-12-27
      • 1970-01-01
      • 2014-05-01
      • 2019-12-13
      • 2017-03-28
      • 2020-07-18
      相关资源
      最近更新 更多