-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaudit_log_analytics_workspace_retention.json
51 lines (51 loc) · 1.44 KB
/
audit_log_analytics_workspace_retention.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"type": "Microsoft.Authorization/policyDefinitions",
"name": "audit_log_analytics_workspace_retention",
"properties": {
"metadata": {
"category": "Monitoring"
},
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists"
},
"workspaceRetentionDays": {
"type": "Integer",
"metadata": {
"description": "Log Analytics Workspace should be retained for the specified amount of days. Defaults to 15 months",
"displayName": "Log Analytics Workspace Retention Days"
},
"defaultValue": 456
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.OperationalInsights/workspaces"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.OperationalInsights/workspaces",
"existenceCondition": {
"field": "Microsoft.OperationalInsights/workspaces/retentionInDays",
"greaterOrEquals": "[parameters('workspaceRetentionDays')]"
}
}
}
}
}
}