I am trying to enable diagnostics for an azure datafactory using an ARM Template after is has been created via a c# automation application. I am attempting to use the steps here for the Non-Compute Resource Template:
Step 2 of the above instructions state:
In the resources array of the resource for which you want to enable Diagnostic Logs, add a resource of type [resource namespace]/providers/diagnosticSettings.
Here are where my questions lie:
I was hoping that I could enable the diagnostics for a datafactory(or any resource really) outside of the resources array for for that resource since the data factory is not being created as part of the ARM template. Is that possible?
If so what is the [resource namespace] in the above quote? I have tried using "Microsoft.DataFactory/providers/diagnosticSettings", but that fails as an invalid resource.
Here is the JSON I have thus far(remember this is outside of the resource array for the data factory, because it is already created in an earlier step).
{
"type": "Microsoft.DataFactory/providers/diagnosticSettings",
"name": "[concat('Microsoft.Insights/', parameters('factoryName'))]",
"apiVersion": "2017-05-01-preview",
"properties": {
"name": "[parameters('factoryName')]",
"workspaceId": "[parameters('workspaceId')]",
"logs": [
{
"category": "/* log category name */",
"enabled": true,
"retentionPolicy": {
"days": 0,
"enabled": false
}
}
],
"metrics": [
{
"category": "AllMetrics",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
]
}
}