我正在尝试为 Automation Runbook 创建一个 Webhook。到目前为止,我已经实现了以下目标:
- 创建自动化帐户
- 创建运行手册
这是我正在使用的模板:
"resources": [
{
"name": "[parameters('accountName')]",
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-10-31",
"location": "[parameters('location')]",
"dependsOn": [ ],
"tags": { },
"properties": {
"sku": {
"name": "[parameters('sku')]"
}
},
"resources": [
{
"name": "[variables('runbookName')]",
"type": "runbooks",
"apiVersion": "2015-10-31",
"location": "[parameters('location')]",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', parameters('accountName'))]"
],
"tags": { },
"properties": {
"runbookType": "Script",
"logProgress": "false",
"logVerbose": "false",
"publishContentLink": {
"uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
"version": "1.0.0.0"
},
"webhook": {
"name": "test"
}
}
,"resources": [
{
"apiVersion": "2015-10-31",
"type": "webhooks",
"name": "testwebhook",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', parameters('accountName'), '/runbooks/', variables('runbookName'))]"
]
}
]
},
{
"name": "[parameters('credentialName')]",
"type": "credentials",
"apiVersion": "2015-10-31",
"location": "[parameters('location')]",
"dependsOn": [
"[concat('Microsoft.Automation/automationAccounts/', parameters('accountName'))]"
],
"tags": { },
"properties": {
"userName": "[parameters('userName')]",
"password": "[parameters('password')]"
}
}
]
}
]
我无法创建 webhook。到目前为止,在搜索之后,我也找不到用于创建 Runbook 的模板架构。任何帮助表示赞赏。
提前致谢