{
  "properties": {
    "displayName": "Azure API for FHIR should use a customer-managed key to encrypt data at rest",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Use a customer-managed key to control the encryption at rest of the data stored in Azure API for FHIR when this is a regulatory or compliance requirement. Customer-managed keys also deliver double encryption by adding a second layer of encryption on top of the default one done with service-managed keys.",
    "metadata": {
      "version": "1.0.1",
      "category": "API for FHIR"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "audit",
          "disabled"
        ],
        "defaultValue": "audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.HealthcareApis/services"
          },
          {
            "field": "Microsoft.HealthcareApis/services/cosmosDbConfiguration.keyVaultKeyUri",
            "exists": "false"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/051cba44-2429-45b9-9649-46cec11c7119",
  "name": "051cba44-2429-45b9-9649-46cec11c7119"
}