Gallery › Cognitive Services › Azure built-in policies
Foundry model deployments should only use approved models
Doesn't convert yet Policy Audit Deny Disabled Mode Microsoft.CognitiveServices.Data Version 1.0.2
Ensures that model deployments in Microsoft Foundry only use models explicitly approved by the organization, based on configured model identifiers or publishers.
ConvertTo-Bylaw can't convert this policy yet:
- BYL6002 Its mode, Microsoft.CognitiveServices.Data, is a resource provider mode, which language version 1.0 doesn't support.
Azure Policy JSONAllowDeployRegistryModels_Audit.json · 82 lines
{
"properties": {
"displayName": "Foundry model deployments should only use approved models",
"policyType": "BuiltIn",
"mode": "Microsoft.CognitiveServices.Data",
"description": "Ensures that model deployments in Microsoft Foundry only use models explicitly approved by the organization, based on configured model identifiers or publishers.",
"metadata": {
"version": "1.0.2",
"category": "Cognitive Services"
},
"version": "1.0.2",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "Audit",
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy."
}
},
"allowedPublishers": {
"type": "Array",
"defaultValue": [],
"metadata": {
"displayName": "Allowed Model Publishers",
"description": "List of Publishers whose Models are allowed to be deployed."
}
},
"allowedAssetIds": {
"type": "Array",
"defaultValue": [],
"metadata": {
"displayName": "Allowed Asset Ids",
"description": "List of AssetIds of Models that are allowed to be deployed. This can include partial assetIds to allow all Models under a given scope."
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.CognitiveServices.Data/accounts/deployments"
},
{
"allOf": [
{
"field": "Microsoft.CognitiveServices.Data/accounts/deployments/model.publisher",
"notin": "[parameters('allowedPublishers')]"
},
{
"count": {
"value": "[parameters('allowedAssetIds')]",
"name": "allowedAssetId",
"where": {
"field": "Microsoft.CognitiveServices.Data/accounts/deployments/model.assetId",
"contains": "[current('allowedAssetId')]"
}
},
"equals": 0
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.2",
"1.0.1"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/aafe3651-cb78-4f68-9f81-e7e41509110f",
"name": "aafe3651-cb78-4f68-9f81-e7e41509110f"
}Source: built-in-policies/policyDefinitions/Cognitive Services/AllowDeployRegistryModels_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw