/
IdleShutdown_Audit.json
62 lines (62 loc) · 1.8 KB
/
IdleShutdown_Audit.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
52
53
54
55
56
57
58
59
60
61
62
{
"properties": {
"displayName": "Azure Machine Learning Compute Instance should have idle shutdown.",
"policyType": "BuiltIn",
"mode": "All",
"description": "Having an idle shutdown schedule reduces cost by shutting down computes that are idle after a pre-determined period of activity.",
"metadata": {
"version": "1.0.0",
"category": "Machine Learning"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"defaultValue": "Audit",
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "The effect determines what happens when the policy rule is evaluated to match."
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.MachineLearningServices/workspaces/computes"
},
{
"field": "Microsoft.MachineLearningServices/workspaces/computes/computeType",
"equals": "ComputeInstance"
},
{
"anyOf": [
{
"field": "Microsoft.MachineLearningServices/workspaces/computes/idleTimeBeforeShutdown",
"exists": false
},
{
"value": "[empty(field('Microsoft.MachineLearningServices/workspaces/computes/idleTimeBeforeShutdown'))]",
"equals": true
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/679ddf89-ab8f-48a5-9029-e76054077449",
"name": "679ddf89-ab8f-48a5-9029-e76054077449"
}