Skip to content

/AWS1/IF_BUP=>LISTSCANJOBSUMMARIES()

About ListScanJobSummaries

This is a request for a summary of scan jobs created or running within the most recent 30 days.

Method Signature

METHODS /AWS1/IF_BUP~LISTSCANJOBSUMMARIES
  IMPORTING
    !IV_ACCOUNTID TYPE /AWS1/BUPACCOUNTID OPTIONAL
    !IV_RESOURCETYPE TYPE /AWS1/BUPRESOURCETYPE OPTIONAL
    !IV_MALWARESCANNER TYPE /AWS1/BUPMALWARESCANNER OPTIONAL
    !IV_SCANRESULTSTATUS TYPE /AWS1/BUPSCANRESULTSTATUS OPTIONAL
    !IV_STATE TYPE /AWS1/BUPSCANJOBSTATUS OPTIONAL
    !IV_AGGREGATIONPERIOD TYPE /AWS1/BUPAGGREGATIONPERIOD OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/BUPMAXRESULTS OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/BUPSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_buplistscanjobsumsout
  RAISING
    /AWS1/CX_BUPINVPARAMVALUEEX
    /AWS1/CX_BUPSERVICEUNAVAILEX
    /AWS1/CX_BUPCLIENTEXC
    /AWS1/CX_BUPSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_accountid TYPE /AWS1/BUPACCOUNTID /AWS1/BUPACCOUNTID

Returns the job count for the specified account.

If the request is sent from a member account or an account not part of Amazon Web Services Organizations, jobs within requestor's account will be returned.

Root, admin, and delegated administrator accounts can use the value ANY to return job counts from every account in the organization.

AGGREGATE_ALL aggregates job counts from all accounts within the authenticated organization, then returns the sum.

iv_resourcetype TYPE /AWS1/BUPRESOURCETYPE /AWS1/BUPRESOURCETYPE

Returns the job count for the specified resource type. Use request GetSupportedResourceTypes to obtain strings for supported resource types.

The the value ANY returns count of all resource types.

AGGREGATE_ALL aggregates job counts for all resource types and returns the sum.

iv_malwarescanner TYPE /AWS1/BUPMALWARESCANNER /AWS1/BUPMALWARESCANNER

Returns only the scan jobs for the specified malware scanner. Currently the only MalwareScanner is GUARDDUTY. But the field also supports ANY, and AGGREGATE_ALL.

iv_scanresultstatus TYPE /AWS1/BUPSCANRESULTSTATUS /AWS1/BUPSCANRESULTSTATUS

Returns only the scan jobs for the specified scan results.

iv_state TYPE /AWS1/BUPSCANJOBSTATUS /AWS1/BUPSCANJOBSTATUS

Returns only the scan jobs for the specified scanning job state.

iv_aggregationperiod TYPE /AWS1/BUPAGGREGATIONPERIOD /AWS1/BUPAGGREGATIONPERIOD

The period for the returned results.

  • ONE_DAYThe daily job count for the prior 1 day.

  • SEVEN_DAYSThe daily job count for the prior 7 days.

  • FOURTEEN_DAYSThe daily job count for the prior 14 days.

iv_maxresults TYPE /AWS1/BUPMAXRESULTS /AWS1/BUPMAXRESULTS

The maximum number of items to be returned.

The value is an integer. Range of accepted values is from 1 to 500.

iv_nexttoken TYPE /AWS1/BUPSTRING /AWS1/BUPSTRING

The next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

RETURNING

oo_output TYPE REF TO /aws1/cl_buplistscanjobsumsout /AWS1/CL_BUPLISTSCANJOBSUMSOUT

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->listscanjobsummaries(
  iv_accountid = |string|
  iv_aggregationperiod = |string|
  iv_malwarescanner = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_resourcetype = |string|
  iv_scanresultstatus = |string|
  iv_state = |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_scanjobsummaries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_region = lo_row_1->get_region( ).
      lv_accountid = lo_row_1->get_accountid( ).
      lv_scanjobstatus = lo_row_1->get_state( ).
      lv_resourcetype = lo_row_1->get_resourcetype( ).
      lv_integer = lo_row_1->get_count( ).
      lv_timestamp = lo_row_1->get_starttime( ).
      lv_timestamp = lo_row_1->get_endtime( ).
      lv_malwarescanner = lo_row_1->get_malwarescanner( ).
      lv_scanresultstatus = lo_row_1->get_scanresultstatus( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_aggregationperiod( ).
  lv_string = lo_result->get_nexttoken( ).
ENDIF.