通过ARM部署Jobshedule

时间:2018-11-19 09:29:34

标签: azure azure-resource-manager azure-automation

我正在尝试在我的自动化帐户中添加一个作业棚,以将我的Runbook与我的棚之间关联。 我使用与microsoft doc类似的资源变量。 但是仍然说我不使用根资源类型的相同段lengts吗?

代码Jobshedule

{
            "name": "jobshedule1",
            "type": "Microsoft.Automation/automationAccounts/jobSchedules",
            "apiVersion": "2015-10-31",
            "properties": {
                "schedule": {
                    "name": "shedule1"
                },
                "runbook": {
                    "name": "variables('name')"
                }
            }
        }

代码根对象(automationAccount)

{
            "name": "AutomationDev",
            "type": "Microsoft.Automation/automationAccounts",
            "apiVersion": "2015-10-31",
            "properties": {
                "sku": {
                    "name": "Free"
                }
            },
            "location": "[parameters('location')]",
            "tags": {},

}

我遇到的错误:

New-AzureRmResourceGroupDeployment : 10:24:07 - Error: Code=InvalidTemplate; Message=Deployment template validation fai
led: 'The template resource 'jobshedule1' for type 'Microsoft.Automation/automationAccounts/jobSchedules' at line '22'
and column '9' has incorrect segment lengths. A nested resource type must have identical number of segments as its reso
urce name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/
arm-template/#resources for usage details.'.

0 个答案:

没有答案