Skip to content

/AWS1/IF_GDY=>LISTINVESTIGATIONS()

About ListInvestigations

This API is currently available as a preview. This feature is available in the following Amazon Web Services Regions: US East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), Europe (Frankfurt), Europe (Ireland), Europe (London), Europe (Paris), Europe (Stockholm), and Asia Pacific (Tokyo).

Returns a list of investigations associated with the specified GuardDuty detector.

An administrator account sees all investigations across the organization. Member accounts see only the investigations that belong to them.

Method Signature

METHODS /AWS1/IF_GDY~LISTINVESTIGATIONS
  IMPORTING
    !IV_DETECTORID TYPE /AWS1/GDYDETECTORID OPTIONAL
    !IO_SORTCRITERIA TYPE REF TO /AWS1/CL_GDYINVESTGTNSORTCRIT OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/GDYMAXRESULTS OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/GDYNEXTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gdylistinvestgtnsrsp
  RAISING
    /AWS1/CX_GDYACCESSDENIEDEX
    /AWS1/CX_GDYBADREQUESTEX
    /AWS1/CX_GDYINTERNALSERVERER00
    /AWS1/CX_GDYCLIENTEXC
    /AWS1/CX_GDYSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_detectorid TYPE /AWS1/GDYDETECTORID /AWS1/GDYDETECTORID

The unique ID of the GuardDuty detector whose investigations you want to list.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

Optional arguments:

io_sortcriteria TYPE REF TO /AWS1/CL_GDYINVESTGTNSORTCRIT /AWS1/CL_GDYINVESTGTNSORTCRIT

Represents the criteria used for sorting investigations.

iv_maxresults TYPE /AWS1/GDYMAXRESULTS /AWS1/GDYMAXRESULTS

You can use this parameter to indicate the maximum number of items you want in the response. The default value is 50.

iv_nexttoken TYPE /AWS1/GDYNEXTTOKEN /AWS1/GDYNEXTTOKEN

You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing data.

RETURNING

oo_output TYPE REF TO /aws1/cl_gdylistinvestgtnsrsp /AWS1/CL_GDYLISTINVESTGTNSRSP

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->listinvestigations(
  io_sortcriteria = new /aws1/cl_gdyinvestgtnsortcrit(
    iv_attributename = |string|
    iv_orderby = |string|
  )
  iv_detectorid = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_investigations( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_investigationid = lo_row_1->get_investigationid( ).
      lv_investigationstatus = lo_row_1->get_status( ).
      lv_triggerprompt = lo_row_1->get_triggerprompt( ).
      lv_risklevel = lo_row_1->get_risklevel( ).
      lv_confidence = lo_row_1->get_confidence( ).
      lv_investigationtitle = lo_row_1->get_title( ).
      lv_string = lo_row_1->get_accountid( ).
      lv_timestamp = lo_row_1->get_starttime( ).
      lv_timestamp = lo_row_1->get_endtime( ).
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.