public List<? extends AuditActionContext> getAuditRecords(final Map<AuditTrailManager.WhereClauseFields, Object> whereClause) {
        val localDate = (LocalDateTime) whereClause.get(AuditTrailManager.WhereClauseFields.DATE);
        val time = DateTimeUtils.dateOf(localDate).getTime();
        val queryKeys = CollectionUtils.<DynamoDbQueryBuilder>wrap(DynamoDbQueryBuilder.builder()
            .key(ColumnNames.WHEN_ACTION_PERFORMED.getColumnName())
            .attributeValue(List.of(AttributeValue.builder().s(String.valueOf(time)).build()))
            .operator(ComparisonOperator.GE)
            .build());
        if (whereClause.containsKey(AuditTrailManager.WhereClauseFields.PRINCIPAL)) {
            queryKeys.add(DynamoDbQueryBuilder.builder()
                .key(ColumnNames.PRINCIPAL.getColumnName())
                .attributeValue(List.of(AttributeValue.builder().s(whereClause.get(AuditTrailManager.WhereClauseFields.PRINCIPAL).toString()).build()))
                .operator(ComparisonOperator.EQ)
                .build());
        }
        val count = whereClause.containsKey(AuditTrailManager.WhereClauseFields.COUNT)
            ? (long) whereClause.get(AuditTrailManager.WhereClauseFields.COUNT)
            : AbstractAuditTrailManager.DEFAULT_MAX_AUDIT_RECORDS_TO_FETCH;
        return DynamoDbTableUtils.getRecordsByKeys(amazonDynamoDBClient,
                dynamoDbProperties.getTableName(),
                count,
                queryKeys,
                item -> {
                    val principal = item.get(ColumnNames.PRINCIPAL.getColumnName()).s();
                    val actionPerformed = item.get(ColumnNames.ACTION_PERFORMED.getColumnName()).s();
                    val appCode = item.get(ColumnNames.APPLICATION_CODE.getColumnName()).s();
                    val clientIp = item.get(ColumnNames.CLIENT_IP_ADDRESS.getColumnName()).s();
                    val serverIp = item.get(ColumnNames.SERVER_IP_ADDRESS.getColumnName()).s();
                    val resource = item.get(ColumnNames.RESOURCE_OPERATED_UPON.getColumnName()).s();
                    val userAgent = item.get(ColumnNames.USER_AGENT.getColumnName()).s();
                    val geoLocation = item.get(ColumnNames.GEO_LOCATION.getColumnName()).s();
                    val tenant = item.get(ColumnNames.TENANT.getColumnName()).s();
                    val auditTime = Long.parseLong(item.get(ColumnNames.WHEN_ACTION_PERFORMED.getColumnName()).s());
                    val clientInfo = new ClientInfo(clientIp, serverIp, userAgent, geoLocation).setTenant(tenant);
                    return new AuditActionContext(principal, resource, actionPerformed, appCode,
                        DateTimeUtils.localDateTimeOf(auditTime), clientInfo);
                })
            .collect(Collectors.toList());
    }
Gets audit records.

@param whereClause the where clause
@return the audit records
support/cas-server-support-audit-dynamodb/src/main/java/org/apereo/cas/audit/DynamoDbAuditTrailManagerFacilitator.java