Я хотел бы включить диагностику для Azure Datafactory с использованием ARM-шаблона.
Я нашел это сообщение , а затем я пытаюсь проверить свой код:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": { },
"variables": {},
"resources": [
{
"name": "test-adf2-we",
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"location": "West Europe",
"identity": {
"type": "SystemAssigned"
}
},
{
"name": "test-ala-we",
"type": "Microsoft.OperationalInsights/workspaces",
"apiVersion": "2015-11-01-preview",
"location": "West Europe"
},
{
"type": "microsoft.datafactory/factories/providers/diagnosticsettings",
"name": "[concat('test-adf2-we','/Microsoft.Insights/diagnostics')]",
"location": "West Europe",
"apiVersion": "2017-05-01-preview",
"properties": {
"name": "diagnostics",
"storageAccountId": null,
"eventHubAuthorizationRuleId": null,
"eventHubName": null,
"workspaceId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-arm/providers/Microsoft.OperationalInsights/test-ala-we"
"logs": [
{
"category": "PipelineRuns",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
},
{
"category": "TriggerRuns",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
},
{
"category": "ActivityRuns",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
],
"metrics": [
{
"category": "AllMetrics",
"timeGrain": "PT1M",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
]
}
}
}
После запуска этого кода.Я получаю эту ошибку:
Template deployment returned the following errors:
Resource microsoft.datafactory/factories/providers/diagnosticsettings 'test-adf2-we/Microsoft.Insights/diagnostics' failed with message '{
"code": "BadRequest",
"message": "\"Resource type 'microsoft.operationalinsights/test-ala-we' is invalid for property 'properties.workspaceId'. Expected types are 'microsoft.operationalinsights/workspaces'\""
}'
Не могли бы вы помочь мне решить эту проблему?