问题
I'm trying to deploy a Resource Group that includes an Azure Automation Account. One of the parameters in the parameters.json file is called automationAccounts_DSCAutomationAccount_sku
. Putting an arbitrary string as its value results in an InvalidTemplate
error:
The provided value for the template parameter 'automationAccounts_DSCAutomationAccount_sku' at line '7' and 7' is not valid.'.
Specific Question: What would constitute a valid value? In powershell there is no sku
property of the AutomationAccount object. And when creating a new account in the Portal, there is never an option to select one of many different kinds of Automation Accounts, there is only one kind. So what does Azure need an SKU field for anyway?
General Question: In Azure Templates (and parameter files) how can I know what a certain field expects, and what fields are required for a certain resource? Is there any centralized doc that has all of these requirements?
It seems that there isn't, and if that's the case, that makes authoring templates nearly impossible, with the only viable option for producing templates being configuring a resource group in the Azure Portal, and then downloading the template JSON file that it generates.
回答1:
Indeed you raise a valid point, I have not seen a centralized place to look that up, but, there's a ARM schema which is the closest to what you ask that you can get, in my opinion. But that place is a pain to navigate\look through.
Also, there's the https://resources.azure.com resource, which is really helpful, and there's the Automation script
option on the portal, that would effectively export out the json template for you. Having said that, here's the free SKU example:
"sku": {
"name": "Free",
"family": null,
"capacity": null
},
also, this seems to be the relevant schema for Automation
https://raw.githubusercontent.com/Azure/azure-resource-manager-schemas/master/schemas/2015-10-31/Microsoft.Automation.json
来源:https://stackoverflow.com/questions/41574575/azure-sku-property-value-for-automation-account-where-are-centralized-template