|
1 | 1 | ---
|
2 | 2 | title: Audit and manage Azure Machine Learning
|
3 | 3 | titleSuffix: Azure Machine Learning
|
4 |
| -description: Learn how to use Azure Policy to use built-in policies for Azure Machine Learning to make sure your workspaces are compliant with your requirements. |
| 4 | +description: Learn how to use Azure Policy with Azure Machine Learning to make sure your workspaces are compliant with your requirements. |
5 | 5 | author: Blackmist
|
6 | 6 | ms.author: larryfr
|
7 |
| -ms.date: 08/30/2024 |
| 7 | +ms.date: 09/04/2024 |
8 | 8 | services: machine-learning
|
9 | 9 | ms.service: azure-machine-learning
|
10 | 10 | ms.subservice: enterprise-readiness
|
11 | 11 | ms.topic: how-to
|
12 | 12 | ms.reviewer: jhirono
|
| 13 | +ms.custom: FY25Q1-Linter |
| 14 | +# Customer Intent: As an admin, I want to understand how I can use Azure Policy to audit and manage Azure Machine Learning resources so that I can ensure compliance with my organization's requirements. |
13 | 15 | ---
|
14 | 16 |
|
15 | 17 | # Audit and manage Azure Machine Learning
|
@@ -174,32 +176,86 @@ To discover the allowed values for a specific alias, visit the [Azure Machine Le
|
174 | 176 |
|
175 | 177 | For a tutorial (not Azure Machine Learning specific) on how to create custom policies, visit [Create a custom policy definition](/azure/governance/policy/tutorials/create-custom-policy-definition).
|
176 | 178 |
|
177 |
| -### How to find values to use in policies |
178 |
| - |
179 | 179 | ### Example: Block serverless spark compute jobs
|
180 | 180 |
|
181 | 181 | ```json
|
182 | 182 | {
|
183 |
| - "mode": "All", |
184 |
| - "policyRule": { |
185 |
| - "if": { |
186 |
| - "allOf": [ |
187 |
| - { |
188 |
| - "field": "Microsoft.MachineLearningServices/workspaces/jobs/jobType", |
189 |
| - "in": [ |
190 |
| - "Spark" |
191 |
| - ] |
| 183 | + "properties": { |
| 184 | + "displayName": "Deny serverless Spark compute jobs", |
| 185 | + "description": "Deny serverless Spark compute jobs", |
| 186 | + "mode": "All", |
| 187 | + "policyRule": { |
| 188 | + "if": { |
| 189 | + "allOf": [ |
| 190 | + { |
| 191 | + "field": "Microsoft.MachineLearningServices/workspaces/jobs/jobType", |
| 192 | + "in": [ |
| 193 | + "Spark" |
| 194 | + ] |
| 195 | + } |
| 196 | + ] |
| 197 | + }, |
| 198 | + "then": { |
| 199 | + "effect": "Deny" |
| 200 | + } |
| 201 | + }, |
| 202 | + "parameters": {} |
| 203 | + } |
| 204 | +} |
| 205 | +``` |
| 206 | + |
| 207 | +### Example: Configure no public IP for managed computes |
| 208 | + |
| 209 | +```json |
| 210 | +{ |
| 211 | + "properties": { |
| 212 | + "displayName": "Deny compute instance and compute cluster creation with public IP", |
| 213 | + "description": "Deny compute instance and compute cluster creation with public IP", |
| 214 | + "mode": "all", |
| 215 | + "parameters": { |
| 216 | + "effectType": { |
| 217 | + "type": "string", |
| 218 | + "defaultValue": "Deny", |
| 219 | + "allowedValues": [ |
| 220 | + "Deny", |
| 221 | + "Disabled" |
| 222 | + ], |
| 223 | + "metadata": { |
| 224 | + "displayName": "Effect", |
| 225 | + "description": "Enable or disable the execution of the policy" |
192 | 226 | }
|
193 |
| - ] |
| 227 | + } |
194 | 228 | },
|
195 |
| - "then": { |
196 |
| - "effect": "Deny" |
| 229 | + "policyRule": { |
| 230 | + "if": { |
| 231 | + "allOf": [ |
| 232 | + { |
| 233 | + "field": "type", |
| 234 | + "equals": "Microsoft.MachineLearningServices/workspaces/computes" |
| 235 | + }, |
| 236 | + { |
| 237 | + "allOf": [ |
| 238 | + { |
| 239 | + "field": "Microsoft.MachineLearningServices/workspaces/computes/computeType", |
| 240 | + "notEquals": "AKS" |
| 241 | + }, |
| 242 | + { |
| 243 | + "field": "Microsoft.MachineLearningServices/workspaces/computes/enableNodePublicIP", |
| 244 | + "equals": true |
| 245 | + } |
| 246 | + ] |
| 247 | + } |
| 248 | + ] |
| 249 | + }, |
| 250 | + "then": { |
| 251 | + "effect": "[parameters('effectType')]" |
| 252 | + } |
197 | 253 | }
|
198 |
| - }, |
199 |
| - "parameters": {} |
| 254 | + } |
200 | 255 | }
|
201 | 256 | ```
|
202 | 257 |
|
| 258 | + |
203 | 259 | ## Related content
|
204 | 260 |
|
205 | 261 | * [Azure Policy documentation](/azure/governance/policy/overview)
|
|
0 commit comments