public Stream<? extends CasEvent> getEventsOfTypeForPrincipal(final String type, final String principal) {
        val query =
            List.of(
                DynamoDbQueryBuilder.builder()
                    .key(ColumnNames.PRINCIPAL.getColumnName())
                    .attributeValue(List.of(AttributeValue.builder().s(principal).build()))
                    .operator(ComparisonOperator.EQ)
                    .build(),
                DynamoDbQueryBuilder.builder()
                    .key(ColumnNames.TYPE.getColumnName())
                    .attributeValue(List.of(AttributeValue.builder().s(type).build()))
                    .operator(ComparisonOperator.EQ)
                    .build());
        return getRecordsByKeys(query);
    }
Gets events of type for principal.

@param type      the type
@param principal the principal
@return the events of type for principal
support/cas-server-support-events-dynamodb/src/main/java/org/apereo/cas/support/events/DynamoDbCasEventsFacilitator.java