我想通过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')]”返回错误!
答案 0 :(得分:2)
对,因为您必须像这样使用resourceId()
:
resourceId('Microsoft.Automation/automationAccounts/webhooks', 'automationaccountname`, 'webhookname`)