用于添加 Runbook 和模块的 ARM 模板 [英] ARM template for adding runbooks and modules

查看:17
本文介绍了用于添加 Runbook 和模块的 ARM 模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在为 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 作为资源.但是在添加资源"列表中,我找不到与 Runbook 或模块相关的任何内容.我在哪里可以找到这方面的模板?

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?

推荐答案

这是可能的.您可以查看此链接:使用 ARM 模板部署自定义 Azure 自动化集成模块.

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')]"
          }
        }
      }
    }
  ]
}

这篇关于用于添加 Runbook 和模块的 ARM 模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆