Skip to content

/AWS1/IF_BUP=>LISTSCANJOBS()

About ListScanJobs

Returns a list of existing scan jobs for an authenticated account for the last 30 days.

Method Signature

METHODS /AWS1/IF_BUP~LISTSCANJOBS
  IMPORTING
    !IV_BYACCOUNTID TYPE /AWS1/BUPSTRING00 OPTIONAL
    !IV_BYBACKUPVAULTNAME TYPE /AWS1/BUPSTRING00 OPTIONAL
    !IV_BYCOMPLETEAFTER TYPE /AWS1/BUPTIMESTAMP00 OPTIONAL
    !IV_BYCOMPLETEBEFORE TYPE /AWS1/BUPTIMESTAMP00 OPTIONAL
    !IV_BYMALWARESCANNER TYPE /AWS1/BUPMALWARESCANNER OPTIONAL
    !IV_BYRECOVERYPOINTARN TYPE /AWS1/BUPSTRING00 OPTIONAL
    !IV_BYRESOURCEARN TYPE /AWS1/BUPSTRING00 OPTIONAL
    !IV_BYRESOURCETYPE TYPE /AWS1/BUPSCANRESOURCETYPE OPTIONAL
    !IV_BYSCANRESULTSTATUS TYPE /AWS1/BUPSCANRESULTSTATUS OPTIONAL
    !IV_BYSTATE TYPE /AWS1/BUPSCANSTATE OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/BUPLSTSCANJOBSINPMAXRS00 OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/BUPSTRING00 OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_buplistscanjobsoutput
  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_byaccountid TYPE /AWS1/BUPSTRING00 /AWS1/BUPSTRING00

The account ID to list the jobs from. Returns only backup jobs associated with the specified account ID.

If used from an Amazon Web Services Organizations management account, passing * returns all jobs across the organization.

Pattern: ^[0-9]{12}$

iv_bybackupvaultname TYPE /AWS1/BUPSTRING00 /AWS1/BUPSTRING00

Returns only scan jobs that will be stored in the specified backup vault. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.

Pattern: ^[a-zA-Z0-9-_.]{2,50}$

iv_bycompleteafter TYPE /AWS1/BUPTIMESTAMP00 /AWS1/BUPTIMESTAMP00

Returns only scan jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC).

iv_bycompletebefore TYPE /AWS1/BUPTIMESTAMP00 /AWS1/BUPTIMESTAMP00

Returns only backup jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC).

iv_bymalwarescanner TYPE /AWS1/BUPMALWARESCANNER /AWS1/BUPMALWARESCANNER

Returns only the scan jobs for the specified malware scanner. Currently only supports GUARDDUTY.

iv_byrecoverypointarn TYPE /AWS1/BUPSTRING00 /AWS1/BUPSTRING00

Returns only the scan jobs that are ran against the specified recovery point.

iv_byresourcearn TYPE /AWS1/BUPSTRING00 /AWS1/BUPSTRING00

Returns only scan jobs that match the specified resource Amazon Resource Name (ARN).

iv_byresourcetype TYPE /AWS1/BUPSCANRESOURCETYPE /AWS1/BUPSCANRESOURCETYPE

Returns restore testing selections by the specified restore testing plan name.

  • EBSfor Amazon Elastic Block Store

  • EC2for Amazon Elastic Compute Cloud

  • S3for Amazon Simple Storage Service (Amazon S3)

Pattern: ^[a-zA-Z0-9-_.]{1,50}$

iv_byscanresultstatus TYPE /AWS1/BUPSCANRESULTSTATUS /AWS1/BUPSCANRESULTSTATUS

Returns only the scan jobs for the specified scan results:

  • THREATS_FOUND

  • NO_THREATS_FOUND

iv_bystate TYPE /AWS1/BUPSCANSTATE /AWS1/BUPSCANSTATE

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

iv_maxresults TYPE /AWS1/BUPLSTSCANJOBSINPMAXRS00 /AWS1/BUPLSTSCANJOBSINPMAXRS00

The maximum number of items to be returned.

Valid Range: Minimum value of 1. Maximum value of 1000.

iv_nexttoken TYPE /AWS1/BUPSTRING00 /AWS1/BUPSTRING00

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_buplistscanjobsoutput /AWS1/CL_BUPLISTSCANJOBSOUTPUT

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->listscanjobs(
  iv_byaccountid = |string|
  iv_bybackupvaultname = |string|
  iv_bycompleteafter = '20150101000000.0000000'
  iv_bycompletebefore = '20150101000000.0000000'
  iv_bymalwarescanner = |string|
  iv_byrecoverypointarn = |string|
  iv_byresourcearn = |string|
  iv_byresourcetype = |string|
  iv_byscanresultstatus = |string|
  iv_bystate = |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.
  lv_string = lo_result->get_nexttoken( ).
  LOOP AT lo_result->get_scanjobs( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_accountid( ).
      lv_string = lo_row_1->get_backupvaultarn( ).
      lv_string = lo_row_1->get_backupvaultname( ).
      lv_timestamp = lo_row_1->get_completiondate( ).
      lo_scanjobcreator = lo_row_1->get_createdby( ).
      IF lo_scanjobcreator IS NOT INITIAL.
        lv_string = lo_scanjobcreator->get_backupplanarn( ).
        lv_string = lo_scanjobcreator->get_backupplanid( ).
        lv_string = lo_scanjobcreator->get_backupplanversion( ).
        lv_string = lo_scanjobcreator->get_backupruleid( ).
      ENDIF.
      lv_timestamp = lo_row_1->get_creationdate( ).
      lv_string = lo_row_1->get_iamrolearn( ).
      lv_malwarescanner = lo_row_1->get_malwarescanner( ).
      lv_string = lo_row_1->get_recoverypointarn( ).
      lv_string = lo_row_1->get_resourcearn( ).
      lv_string = lo_row_1->get_resourcename( ).
      lv_scanresourcetype = lo_row_1->get_resourcetype( ).
      lv_string = lo_row_1->get_scanbaserecoverypointarn( ).
      lv_string = lo_row_1->get_scanid( ).
      lv_string = lo_row_1->get_scanjobid( ).
      lv_scanmode = lo_row_1->get_scanmode( ).
      lo_scanresultinfo = lo_row_1->get_scanresult( ).
      IF lo_scanresultinfo IS NOT INITIAL.
        lv_scanresultstatus = lo_scanresultinfo->get_scanresultstatus( ).
      ENDIF.
      lv_string = lo_row_1->get_scannerrolearn( ).
      lv_scanstate = lo_row_1->get_state( ).
      lv_string = lo_row_1->get_statusmessage( ).
    ENDIF.
  ENDLOOP.
ENDIF.