Gallery › Machine Learning › Azure built-in policies
Azure Machine Learning and Ai Studio should use Allow Only Approved Outbound Managed Vnet mode
Converted Policy Audit Deny Disabled Mode Indexed Version 1.1.0
Managed VNet isolation streamlines and automates your network isolation configuration with a built-in, workspace-level Azure Machine Learning managed VNet. The managed VNet secures your managed Azure Machine Learning resources, such as compute instances, compute clusters, serverless compute, and managed online endpoints.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONManagedNetworkIsolationMode_Audit.json · 70 lines
{
"properties": {
"displayName": "Azure Machine Learning and Ai Studio should use Allow Only Approved Outbound Managed Vnet mode",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Managed VNet isolation streamlines and automates your network isolation configuration with a built-in, workspace-level Azure Machine Learning managed VNet. The managed VNet secures your managed Azure Machine Learning resources, such as compute instances, compute clusters, serverless compute, and managed online endpoints.",
"metadata": {
"version": "1.1.0",
"category": "Machine Learning"
},
"version": "1.1.0",
"parameters": {
"isolationMode": {
"type": "String",
"metadata": {
"displayName": "Isolation mode of the azure machine learning workspace",
"description": "Managed network isolation mode of the azure machine learning workspace which configures the network settings of the workspace."
},
"allowedValues": [
"AllowInternetOutbound",
"AllowOnlyApprovedOutbound",
"Disabled"
],
"defaultValue": "Disabled"
},
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.MachineLearningServices/workspaces"
},
{
"not": {
"field": "kind",
"equals": "project"
}
},
{
"field": "Microsoft.MachineLearningServices/workspaces/managedNetwork.isolationMode",
"notEquals": "[parameters('isolationMode')]"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.1.0",
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/6ddb1705-c8cf-450e-aa4b-19ad6703c440",
"name": "6ddb1705-c8cf-450e-aa4b-19ad6703c440"
}Bylaw6ddb1705-c8cf-450e-aa4b-19ad6703c440.bylaw.ps1 · 38 lines
# Converted from ManagedNetworkIsolationMode_Audit.json by ConvertTo-Bylaw.
Policy '6ddb1705-c8cf-450e-aa4b-19ad6703c440' {
Properties @{
DisplayName = 'Azure Machine Learning and Ai Studio should use Allow Only Approved Outbound Managed Vnet mode'
Description = 'Managed VNet isolation streamlines and automates your network isolation configuration with a built-in, workspace-level Azure Machine Learning managed VNet. The managed VNet secures your managed Azure Machine Learning resources, such as compute instances, compute clusters, serverless compute, and managed online endpoints.'
Version = '1.1.0'
Category = 'Machine Learning'
PolicyVersion = '1.1.0'
Mode = 'Indexed'
}
Parameter IsolationMode @{
AllowedValues = @('AllowInternetOutbound', 'AllowOnlyApprovedOutbound', 'Disabled')
Default = 'Disabled'
DisplayName = 'Isolation mode of the azure machine learning workspace'
Description = 'Managed network isolation mode of the azure machine learning workspace which configures the network settings of the workspace.'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.MachineLearningServices/workspaces' {
When {
Field kind | Must -Not -Be 'project'
}
Require 'managedNetwork.isolationMode is the IsolationMode parameter' {
Field managedNetwork.isolationMode | Must -Be (Param IsolationMode)
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Machine Learning/ManagedNetworkIsolationMode_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw