Gallery › Security Center › Azure built-in policies
Microsoft Defender for AI Services should be enabled
Converted Policy AuditIfNotExists Disabled Mode All Version 1.0.0
Audit to see if Microsoft Defender for AI Services is enabled on the subscription.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_Azure_Defender_AI_AINE.json · 50 lines
{
"properties": {
"displayName": "Microsoft Defender for AI Services should be enabled",
"policyType": "BuiltIn",
"mode": "All",
"description": "Audit to see if Microsoft Defender for AI Services is enabled on the subscription.",
"metadata": {
"version": "1.0.0",
"category": "Security Center"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "The effect of the policy. 'auditIfNotExists' will log non-compliance and 'disabled' will not enforce the policy."
}
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/pricings",
"name": "AI",
"existenceScope": "subscription",
"existenceCondition": {
"field": "Microsoft.Security/pricings/pricingTier",
"equals": "Standard"
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/c2c0c6d8-007b-4a48-8d9b-3539bddd8e87",
"name": "c2c0c6d8-007b-4a48-8d9b-3539bddd8e87"
}Bylawc2c0c6d8-007b-4a48-8d9b-3539bddd8e87.bylaw.ps1 · 28 lines
# Converted from ASC_Azure_Defender_AI_AINE.json by ConvertTo-Bylaw.
Policy 'c2c0c6d8-007b-4a48-8d9b-3539bddd8e87' {
Properties @{
DisplayName = 'Microsoft Defender for AI Services should be enabled'
Description = 'Audit to see if Microsoft Defender for AI Services is enabled on the subscription.'
Version = '1.0.0'
Category = 'Security Center'
PolicyVersion = '1.0.0'
Mode = 'All'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'The effect of the policy. ''auditIfNotExists'' will log non-compliance and ''disabled'' will not enforce the policy.'
}
Resource 'Microsoft.Resources/subscriptions'
AuditIfNotExists 'Microsoft.Security/pricings' -Name 'AI' -ExistenceScope Subscription -Effect (Param Effect) {
Require 'pricingTier is Standard' {
Field pricingTier | Must -Be 'Standard'
}
}
}Source: built-in-policies/policyDefinitions/Security Center/ASC_Azure_Defender_AI_AINE.json in Azure/azure-policy, under the MIT licence.
Bylaw