Skip to content

/AWS1/IF_TSQ=>LISTSCHEDULEDQUERIES()

About ListScheduledQueries

Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries is eventually consistent.

Method Signature

IMPORTING

Optional arguments:

iv_maxresults TYPE /AWS1/TSQMAXSCHDDQUERIESRSLTS /AWS1/TSQMAXSCHDDQUERIESRSLTS

The maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as the argument to the subsequent call to ListScheduledQueriesRequest.

iv_nexttoken TYPE /AWS1/TSQNEXTSCHDQUERIESRSSTOK /AWS1/TSQNEXTSCHDQUERIESRSSTOK

A pagination token to resume pagination.

RETURNING

oo_output TYPE REF TO /aws1/cl_tsqlstschddqueriesrsp /AWS1/CL_TSQLSTSCHDDQUERIESRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

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->/aws1/if_tsq~listscheduledqueries(
  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_scheduledqueries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_amazonresourcename = lo_row_1->get_arn( ).
      lv_scheduledqueryname = lo_row_1->get_name( ).
      lv_time = lo_row_1->get_creationtime( ).
      lv_scheduledquerystate = lo_row_1->get_state( ).
      lv_time = lo_row_1->get_previousinvocationtime( ).
      lv_time = lo_row_1->get_nextinvocationtime( ).
      lo_errorreportconfiguratio = lo_row_1->get_errorreportconfiguration( ).
      IF lo_errorreportconfiguratio IS NOT INITIAL.
        lo_s3configuration = lo_errorreportconfiguratio->get_s3configuration( ).
        IF lo_s3configuration IS NOT INITIAL.
          lv_s3bucketname = lo_s3configuration->get_bucketname( ).
          lv_s3objectkeyprefix = lo_s3configuration->get_objectkeyprefix( ).
          lv_s3encryptionoption = lo_s3configuration->get_encryptionoption( ).
        ENDIF.
      ENDIF.
      lo_targetdestination = lo_row_1->get_targetdestination( ).
      IF lo_targetdestination IS NOT INITIAL.
        lo_timestreamdestination = lo_targetdestination->get_timestreamdestination( ).
        IF lo_timestreamdestination IS NOT INITIAL.
          lv_resourcename = lo_timestreamdestination->get_databasename( ).
          lv_resourcename = lo_timestreamdestination->get_tablename( ).
        ENDIF.
      ENDIF.
      lv_scheduledqueryrunstatus = lo_row_1->get_lastrunstatus( ).
    ENDIF.
  ENDLOOP.
  lv_nextscheduledqueriesres = lo_result->get_nexttoken( ).
ENDIF.