Skip to content

Commit

Permalink
added params in getFindingsByDetectorId func
Browse files Browse the repository at this point in the history
  • Loading branch information
riysaxen-amzn committed Mar 5, 2024
1 parent 6b2a15c commit 0804c8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ public FindingsService(Client client) {
* @param table group of search related parameters
* @param listener ActionListener to get notified on response or error
*/
public void getFindingsByDetectorId(String detectorId, Table table, ActionListener<GetFindingsResponse> listener ) {
public void getFindingsByDetectorId(String detectorId, Table table, String severity,
String detectionType,
List<String> findingIds,
Instant startTime,
Instant endTime,
ActionListener<GetFindingsResponse> listener ) {
this.client.execute(GetDetectorAction.INSTANCE, new GetDetectorRequest(detectorId, -3L), new ActionListener<>() {

@Override
Expand Down Expand Up @@ -103,11 +108,11 @@ public void onFailure(Exception e) {
new ArrayList<>(monitorToDetectorMapping.keySet()),
DetectorMonitorConfig.getAllFindingsIndicesPattern(detector.getDetectorType()),
table,
null,
null,
null,
null,
null,
severity,
detectionType,
findingIds,
startTime,
endTime,
getFindingsResponseListener
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ protected void doExecute(Task task, GetFindingsRequest request, ActionListener<G
findingsService.getFindingsByDetectorId(
request.getDetectorId(),
request.getTable(),
request.getSeverity(),
request.getDetectionType(),
request.getFindingIds(),
request.getStartTime(),
request.getEndTime(),
actionListener
);
} else {
Expand Down

0 comments on commit 0804c8b

Please sign in to comment.