import json


def rule(event):
    if any(
        [
            "Microsoft.DocumentDB/databaseAccounts/listKeys/action" in json.dumps(event.to_dict()),
            "Microsoft.Maps/accounts/listKeys/action" in json.dumps(event.to_dict()),
            "Microsoft.Media/mediaservices/listKeys/action" in json.dumps(event.to_dict()),
            "Microsoft.CognitiveServices/accounts/listKeys/action" in json.dumps(event.to_dict()),
            "Microsoft.Storage/storageAccounts/listKeys/action" in json.dumps(event.to_dict()),
            "Microsoft.Compute/snapshots/write" in json.dumps(event.to_dict()),
            "Microsoft.Network/networkSecurityGroups/write" in json.dumps(event.to_dict()),
        ]
    ):
        return True
    return False
