【问题标题】:Azure RM Template resourceId() for webhooks用于 webhook 的 Azure RM 模板 resourceId()
【发布时间】:2019-08-15 03:14:39
【问题描述】:

我想通过 ARM 模板创建 actionGroups。而且我没有找到如何引用 webhookResourceId。

{
     "apiVersion": "2019-06-01",
     "type": "microsoft.insights/actionGroups",
     "location": "Global",
     "name": "[variables('ActionGroupCallRunBook')]",
     "properties": {
        "enabled": true,
        "automationRunbookReceivers": [
           {
              "name": "[concat('webhook-',variables('ActionGroupCallRunBook'))]",
              "automationAccountId": "[resourceId('microsoft.insights/components', parameters('AzureTelemetryName'))]",
              "runbookName": "myRunbook",
              "webhookResourceId": "[resourceId('Microsoft.Automation/automationAccounts/webhooks'), parameters('WebHookOnRunBookName')]",
              "isGlobalRunbook": false,
              "useCommonAlertSchema": false
           }
        ]
     },
     "tags": {
        "displayName": "ActionGroupCallRunBook"
     }
  }

"webhookResourceId": "[resourceId('Microsoft.Automation/automationAccounts/webhooks'), parameters('WebHookOnRunBookName')]" 返回错误!

【问题讨论】:

    标签: azure azure-resource-manager arm-template


    【解决方案1】:

    对,因为你必须像这样使用resourceId()

    resourceId('Microsoft.Automation/automationAccounts/webhooks', 'automationaccountname`, 'webhookname`)
    

    阅读:https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#resourceid

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-01
      • 2017-06-18
      相关资源
      最近更新 更多