以下是应用程序洞察的部署模板部分。有用。但我想部署到不同的定价等级\配额。什么是正确的参数?
{
"apiVersion": "2014-04-01",
"name": "[parameters('siteName')]",
"type": "Microsoft.Insights/components",
"location": "Central US",
"dependsOn": [
"[concat('Microsoft.Web/sites/', parameters('siteName'))]"
],
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('siteName'))]": "Resource"
},
"properties": {
"ApplicationId": "[parameters('siteName')]",
"sku": "Premium"
}
答案 0 :(得分:1)
您现在可以通过ARM模板设置应用洞察的定价层和配额。
答案 1 :(得分:0)
您可以定义"sku
"部署模板中的参数,并将其用作控制AI资源定价层的参数。
" sku"参数将由您的" serverFarm"资源类型,用于确定托管计划下资源的App Service Hosting Plan层。
"parameters": {
"sku": {
"type": "string",
"allowedValues": [
"Free",
"Shared",
"Basic",
"Standard",
"Premium"
],
"defaultValue": "Premium"
}
}
{
"type": "Microsoft.Web/serverfarms",
"name": "[parameters('hostingPlanName')]",
"apiVersion": "2015-08-01",
"sku": {
"name": "P1",
"tier": "[parameters('sku')]"
},
"properties": {
"numberOfWorkers": "[parameters('numOfWorkers')]",
"workerSize": "[parameters('workerSize')]"
},
"location": "[resourceGroup().location]"
}
{
"apiVersion": "2014-04-01",
"name": "[parameters('siteName')]",
"type": "Microsoft.Insights/components",
"location": "Central US",
"dependsOn": [
"[concat('Microsoft.Web/sites/', parameters('siteName'))]"
],
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('siteName'))]": "Resource"
},
"properties": {
"applicationId": "[parameters('siteName')]"
}
更新1:
基于Microsoft Application Insight的最新ARM模板架构,您无法为其定义层属性。
正如我之前所强调的那样,仅为" serverFarm"定义了层。或者更好地称为App Service Hosting Plan资源。
参考:azure-resource-manager-schemas/schemas/2014-04-01/Microsoft.Insights.json
"components": {
"type": "object",
"properties": {
"type": {
"enum": [
"Microsoft.Insights/components"
]
},
"apiVersion": {
"enum": [
"2014-04-01"
]
},
"properties": {
"type": "object",
"properties": {
"applicationId": {
"type": "string",
"minLength": 1,
"description": "Microsoft.Insights/components: applicationId"
}
}
}
},
"required": [
"type",
"apiVersion",
"properties",
"location"
],
"description": "Microsoft.Insights/components"
}