2016-09-23 66 views
0

與404失敗。Azure的自動化DSC彙編工作由我創建了成功創建在Azure中自動化的帳戶,然後創建該帳戶模塊和DSC配置的ARM模板ARM模板

當我添加一個Microsoft.Automation/automationAccounts/Compilationjobs資源編譯DSC配置,模板部署失敗在此步驟與404 - 文件或目錄未找到。

的Compilationjobs資源作爲頂級資源存在於模板如下:

{ 
    "apiVersion": "2015-10-31", 
    "type": "Microsoft.Automation/automationAccounts/Compilationjobs", 
    "name": "automationAccountName/jobId123", 
    "location": "[variables('location')]", 
    "tags": { 
    }, 
    "dependsOn": [ 
    "Microsoft.Automation/automationAccounts/automationAccountName", 
    "modulesResourceLoop" 
    ], 
    "properties": { 
    "configuration": { 
     "name": "DSCConfigurationName" 
    } 
    } 
} 

當我打電話Start-AzureRmAutomationDscCompilationJob與編輯工作是創建併成功完成相同的細節。

回答

0

編譯配置涉及創建compliationJob。引擎蓋下它是一個PUT調用/CompiliationJobs/{guid}。所以這裏的訣竅是調用編譯作業時通過一項新的GUID入麾下模板。

像下面,你將需要定義參數compilationJobGuid

{ 
    "name": "[parameters('compilationJobGuid')]", 
    "apiVersion": "2015-10-31", 
    "type": "Microsoft.Automation/automationAccounts/Compilationjobs", 
    "location": "[variables('location')]", 
    "tags": { 
    }, 
    "dependsOn": [ 
    "Microsoft.Automation/automationAccounts/automationAccountName", 
    "modulesResourceLoop" 
    ], 
    "properties": { 
    "configuration": { 
     "name": "DSCConfigurationName" 
    } 
    } 
} 
相關問題