Gallery › Security Center › Azure built-in policies
[Deprecated]: Configure Microsoft Defender for APIs should be enabled
Converted Policy DeployIfNotExists Disabled Mode All Version 1.0.3-deprecated Deprecated
This policy is deprecated because it does not complete all of the required steps to enable Defender for APIs, additional steps are required to complete onboarding available through the Defender for Cloud platform. Instead of continuing to use this policy, we recommend you enable Defender for APIs by following the steps outlined in the guide at https://learn.microsoft.com/azure/defender-for-cloud/defender-for-apis-deploy. Learn more about policy definition deprecation at aka.ms/policydefdeprecation
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "[Deprecated]: Configure Microsoft Defender for APIs should be enabled",
"policyType": "BuiltIn",
"mode": "All",
"description": "This policy is deprecated because it does not complete all of the required steps to enable Defender for APIs, additional steps are required to complete onboarding available through the Defender for Cloud platform. Instead of continuing to use this policy, we recommend you enable Defender for APIs by following the steps outlined in the guide at https://learn.microsoft.com/azure/defender-for-cloud/defender-for-apis-deploy. Learn more about policy definition deprecation at aka.ms/policydefdeprecation",
"metadata": {
"version": "1.0.3-deprecated",
"category": "Security Center",
"deprecated": true
},
"version": "1.0.3",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "Disabled",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"DeployIfNotExists",
"Disabled"
]
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/pricings",
"name": "Api",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/fb1c8493-542b-48eb-b624-b4c8fea62acd"
],
"existenceCondition": {
"field": "Microsoft.Security/pricings/pricingTier",
"equals": "Standard"
},
"deployment": {
"location": "westeurope",
"properties": {
"mode": "incremental",
"parameters": {},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
{
"type": "Microsoft.Security/pricings",
"apiVersion": "2023-01-01",
"name": "Api",
"properties": {
"pricingTier": "Standard"
}
}
],
"outputs": {}
}
}
}
}
}
},
"versions": [
"1.0.3"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/e54d2be9-5f2e-4d65-98e4-4f0e670b23d6",
"name": "e54d2be9-5f2e-4d65-98e4-4f0e670b23d6"
}# Converted from ASC_EnableDefenderForAPIS_DINE.json by ConvertTo-Bylaw.
Policy 'e54d2be9-5f2e-4d65-98e4-4f0e670b23d6' {
Properties @{
DisplayName = '[Deprecated]: Configure Microsoft Defender for APIs should be enabled'
Description = 'This policy is deprecated because it does not complete all of the required steps to enable Defender for APIs, additional steps are required to complete onboarding available through the Defender for Cloud platform. Instead of continuing to use this policy, we recommend you enable Defender for APIs by following the steps outlined in the guide at https://learn.microsoft.com/azure/defender-for-cloud/defender-for-apis-deploy. Learn more about policy definition deprecation at aka.ms/policydefdeprecation'
Version = '1.0.3-deprecated'
Category = 'Security Center'
Deprecated = $true
PolicyVersion = '1.0.3'
Mode = 'All'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'Disabled'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Resources/subscriptions'
DeployIfNotExists 'Microsoft.Security/pricings' -Role 'Security Admin' -Name 'Api' -ExistenceScope Subscription -Effect (Param Effect) {
Require 'pricingTier is Standard' {
Field pricingTier | Must -Be 'Standard'
}
Deployment @{
TemplateFile = './templates/e54d2be9-5f2e-4d65-98e4-4f0e670b23d6.json'
Scope = 'Subscription'
Location = 'westeurope'
}
}
}Its deployment templates are written beside it:
templates/e54d2be9-5f2e-4d65-98e4-4f0e670b23d6.json
Source: built-in-policies/policyDefinitions/Security Center/ASC_EnableDefenderForAPIS_DINE.json in Azure/azure-policy, under the MIT licence.
Bylaw