зеркало из https://github.com/Azure/vdc.git
159 строки
4.7 KiB
JSON
159 строки
4.7 KiB
JSON
{
|
|
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"ServiceName": {
|
|
"type": "string",
|
|
"minLength": 2,
|
|
"maxLength": 60,
|
|
"metadata": {
|
|
"description": "Azure Search Service Name"
|
|
}
|
|
},
|
|
"sku": {
|
|
"type": "string",
|
|
"defaultValue": "standard",
|
|
"allowedValues": [
|
|
"free",
|
|
"basic",
|
|
"standard",
|
|
"standard2",
|
|
"standard3"
|
|
],
|
|
"metadata": {
|
|
"description": "The SKU of the search service you want to create. E.g. free or standard"
|
|
}
|
|
},
|
|
"replicaCount": {
|
|
"type": "int",
|
|
"minValue": 1,
|
|
"maxValue": 12,
|
|
"defaultValue": 1,
|
|
"metadata": {
|
|
"description": "Replicas distribute search workloads across the service. You need 2 or more to support high availability (applies to Basic and Standard only)."
|
|
}
|
|
},
|
|
"partitionCount": {
|
|
"type": "int",
|
|
"allowedValues": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
6,
|
|
12
|
|
],
|
|
"defaultValue": 1,
|
|
"metadata": {
|
|
"description": "Partitions allow for scaling of document count as well as faster indexing by sharding your index over multiple Azure Search units."
|
|
}
|
|
},
|
|
"hostingMode": {
|
|
"type": "string",
|
|
"defaultValue": "default",
|
|
"allowedValues": [
|
|
"default",
|
|
"highDensity"
|
|
],
|
|
"metadata": {
|
|
"description": "Applicable only for SKU set to standard3. You can set this property to enable a single, high density partition that allows up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU."
|
|
}
|
|
},
|
|
"diagnosticStorageAccountName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "Storage Account for diagnostics."
|
|
}
|
|
},
|
|
"diagnosticStorageAccountRG": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "Storage Account for diagnostics."
|
|
}
|
|
},
|
|
"omsWorkspaceResourceGroup": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"metadata": {
|
|
"description": "Name of the Resource Group housing the OMS workspace."
|
|
}
|
|
},
|
|
"omsWorkspaceName": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"metadata": {
|
|
"description": "Name of the OMS workspace used for diagnostic log integration."
|
|
}
|
|
},
|
|
"logsRetentionInDays": {
|
|
"type": "int",
|
|
"defaultValue": 0,
|
|
"minValue": 0,
|
|
"maxValue": 365,
|
|
"metadata": {
|
|
"description": "Specifies the number of days that logs will be kept for; a value of 0 will retain data indefinitely."
|
|
}
|
|
},
|
|
"location": {
|
|
"type": "string",
|
|
"defaultValue": "[resourceGroup().location]",
|
|
"metadata": {
|
|
"description": "Location for all resources."
|
|
}
|
|
}
|
|
},
|
|
"variables": {
|
|
"SearchName": "[parameters('ServiceName')]"
|
|
},
|
|
"resources": [
|
|
{
|
|
"apiVersion": "2015-08-19",
|
|
"name": "[parameters('ServiceName')]",
|
|
"type": "Microsoft.Search/searchServices",
|
|
"location": "[parameters('location')]",
|
|
"sku": {
|
|
"name": "[toLower(parameters('sku'))]"
|
|
},
|
|
"properties": {
|
|
"replicaCount": "[parameters('replicaCount')]",
|
|
"partitionCount": "[parameters('partitionCount')]",
|
|
"hostingMode": "[parameters('hostingMode')]"
|
|
},
|
|
"resources": [
|
|
{
|
|
"type": "Microsoft.Search/searchServices/providers/diagnosticsettings",
|
|
"name": "[concat(parameters('ServiceName'), '/Microsoft.Insights/service')]",
|
|
"apiVersion": "2016-09-01",
|
|
"location": "[resourceGroup().location]",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.Search/searchServices/', parameters('ServiceName'))]"
|
|
],
|
|
"properties": {
|
|
"storageAccountId": "[resourceId(parameters('diagnosticStorageAccountRG'),'Microsoft.Storage/storageAccounts', parameters('diagnosticStorageAccountName'))]",
|
|
"workspaceId": "[resourceId(parameters('omsWorkspaceResourceGroup'), 'Microsoft.OperationalInsights/workspaces', parameters('omsWorkspaceName'))]",
|
|
"logs": [
|
|
{
|
|
"category": "OperationLogs",
|
|
"enabled": true,
|
|
"retentionPolicy": {
|
|
"enabled": true,
|
|
"days": "[parameters('LogsRetentionInDays')]"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"outputs": {
|
|
"AzureSearchName": {
|
|
"type": "string",
|
|
"value": "[variables('SearchName')]"
|
|
},
|
|
"AzureSearchResourceGroup": {
|
|
"type": "string",
|
|
"value": "[resourceGroup().name]"
|
|
}
|
|
}
|
|
} |