я пытаюсь активировать Defender на уровне учетной записи хранения с помощью политики я использую эту статью, чтобы найти значение: https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-storage-infrastructure-as-code-enablement?tabs=enable-storage-account я пишу это
Определение политики:
но это не работает можете ли вы помочь мне сделать это работающим
попробуйте сделать это работающим
{
"properties": {
"displayName": "DFC",
"policyType": "Custom",
"mode": "Indexed",
"version": "1.0.0",
"parameters": {
"Effect": {
"type": "String",
"metadata": {
"displayName": "Policy Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Storage/storageAccounts"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/DefenderForStorageSettings",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/fb1c8493-542b-48eb-b624-b4c8fea62acd"
],
"deployment": {
"properties": {
"mode": "incremental",
"template": {
"$schema": "http://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Security/DefenderForStorageSettings",
"apiVersion": "2022-12-01-preview",
"name": "[concat(parameters('storageAccountName'), '/current')]",
"properties": {
"isEnabled": true,
"malwareScanning": {
"onUpload": {
"isEnabled": true,
"capGBPerMonth": 5000
}
},
"sensitiveDataDiscovery": {
"isEnabled": true
},
"overrideSubscriptionLevelSettings": true
}
}
]
},
"parameters": {
"storageAccountName": {
"value": "[field('name')]"
}
}
}
}
}
}
},
"versions": [
"1.0.0"
]
}
}
}
Серафим
Вопрос задан21 января 2024 г.