用于添加运行手册和模块的ARM模板 [英] ARM template for adding runbooks and modules
问题描述
当前,我正在azure门户中为azure运行时自动化运行手册手动上载自定义模块.然后,我还手动创建一个执行我的自定义模块的运行手册.我想通过ARM脚本来做到这一点.
Currently I am uploading manually custom modules for azure runtime automation runbooks in the azure portal. Then I also create manually a runbook which executes my custom module. I would like to do this via an ARM script.
我认为您在azure门户中可以做的所有事情,在ARM中也是可以实现的.
I assume everything you can do in the azure portal, is also possible in ARM.
我是ARM的新手,但是通过ARM部署了一个网站.这相对容易,因为我可以选择Web App作为资源.但是在添加资源"列表中,找不到与运行手册或模块相关的任何内容.在哪里可以找到模板?
I am new to ARM, but deployed a website through ARM. That was relatively easy as I could just select Web App as resource. But in the Add Resource list, I can't find anything related to runbook or modules. Where can I find templates for this?
推荐答案
It is possible. You could check this link: Deploy Custom Azure Automation Integration Modules Using ARM Templates.
{
"$schema": "http://schemas.microsoft.org/azure/deploymentTemplate?api-version=2015-01-01-preview#",
"contentVersion": "1.0",
"parameters": {
"automationAccountType": {
"type": "string",
"allowedValues": [
"New",
"Existing"
]
},
"automationAccountName": {
"type": "string"
},
"moduleName": {
"type": "string"
},
"moduleUri":{
"type": "string"
}
},
"variables": {
"templatelink": "[concat('https://raw.githubusercontent.com/rchaganti/armseries/master/', parameters('automationAccountType'), 'AccountTemplate.json')]"
},
"resources": [
{
"apiVersion": "2015-01-01",
"name": "nestedTemplate",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "incremental",
"templateLink": {
"uri": "[variables('templatelink')]",
"contentVersion": "1.0"
},
"parameters": {
"accountName": {
"value": "[parameters('automationAccountName')]"
},
"accountLocation": {
"value": "[resourceGroup().Location]"
},
"moduleName": {
"value": "[parameters('moduleName')]"
},
"moduleUri": {
"value": "[parameters('moduleUri')]"
}
}
}
}
]
}
这篇关于用于添加运行手册和模块的ARM模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!