Skip to content

/AWS1/IF_CWL=>UPDATESCHEDULEDQUERY()

About UpdateScheduledQuery

Updates an existing scheduled query with new configuration. This operation uses PUT semantics, allowing modification of query parameters, schedule, and destinations.

Method Signature

METHODS /AWS1/IF_CWL~UPDATESCHEDULEDQUERY
  IMPORTING
    !IV_IDENTIFIER TYPE /AWS1/CWLSCHEDULEDQUERYID OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/CWLSCHEDULEDQUERYDESC OPTIONAL
    !IV_QUERYLANGUAGE TYPE /AWS1/CWLQUERYLANGUAGE OPTIONAL
    !IV_QUERYSTRING TYPE /AWS1/CWLQUERYSTRING OPTIONAL
    !IT_LOGGROUPIDENTIFIERS TYPE /AWS1/CL_CWLSCHDQUERYLOGGRID00=>TT_SCHEDULEDQUERYLOGGROUPIDS OPTIONAL
    !IV_SCHEDULEEXPRESSION TYPE /AWS1/CWLSCHEDULEEXPRESSION OPTIONAL
    !IV_TIMEZONE TYPE /AWS1/CWLSCHEDULETIMEZONE OPTIONAL
    !IV_STARTTIMEOFFSET TYPE /AWS1/CWLSTARTTIMEOFFSET OPTIONAL
    !IO_DESTINATIONCONFIGURATION TYPE REF TO /AWS1/CL_CWLDESTINATIONCONF OPTIONAL
    !IV_SCHEDULESTARTTIME TYPE /AWS1/CWLTIMESTAMP OPTIONAL
    !IV_SCHEDULEENDTIME TYPE /AWS1/CWLTIMESTAMP OPTIONAL
    !IV_EXECUTIONROLEARN TYPE /AWS1/CWLROLEARN OPTIONAL
    !IV_STATE TYPE /AWS1/CWLSCHEDULEDQUERYSTATE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cwlupdschddqueryrsp
  RAISING
    /AWS1/CX_CWLACCESSDENIEDEX
    /AWS1/CX_CWLINTERNALSERVEREX
    /AWS1/CX_CWLRESOURCENOTFOUNDEX
    /AWS1/CX_CWLTHROTTLINGEX
    /AWS1/CX_CWLVALIDATIONEX
    /AWS1/CX_CWLCLIENTEXC
    /AWS1/CX_CWLSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_identifier TYPE /AWS1/CWLSCHEDULEDQUERYID /AWS1/CWLSCHEDULEDQUERYID

The ARN or name of the scheduled query to update.

iv_querylanguage TYPE /AWS1/CWLQUERYLANGUAGE /AWS1/CWLQUERYLANGUAGE

The updated query language for the scheduled query.

iv_querystring TYPE /AWS1/CWLQUERYSTRING /AWS1/CWLQUERYSTRING

The updated query string to execute.

iv_scheduleexpression TYPE /AWS1/CWLSCHEDULEEXPRESSION /AWS1/CWLSCHEDULEEXPRESSION

The updated cron expression that defines when the scheduled query runs.

iv_executionrolearn TYPE /AWS1/CWLROLEARN /AWS1/CWLROLEARN

The updated ARN of the IAM role that grants permissions to execute the query and deliver results.

Optional arguments:

iv_description TYPE /AWS1/CWLSCHEDULEDQUERYDESC /AWS1/CWLSCHEDULEDQUERYDESC

An updated description for the scheduled query.

it_loggroupidentifiers TYPE /AWS1/CL_CWLSCHDQUERYLOGGRID00=>TT_SCHEDULEDQUERYLOGGROUPIDS TT_SCHEDULEDQUERYLOGGROUPIDS

The updated array of log group names or ARNs to query.

iv_timezone TYPE /AWS1/CWLSCHEDULETIMEZONE /AWS1/CWLSCHEDULETIMEZONE

The updated timezone for evaluating the schedule expression.

iv_starttimeoffset TYPE /AWS1/CWLSTARTTIMEOFFSET /AWS1/CWLSTARTTIMEOFFSET

The updated time offset in seconds that defines the lookback period for the query.

io_destinationconfiguration TYPE REF TO /AWS1/CL_CWLDESTINATIONCONF /AWS1/CL_CWLDESTINATIONCONF

The updated configuration for where to deliver query results.

iv_schedulestarttime TYPE /AWS1/CWLTIMESTAMP /AWS1/CWLTIMESTAMP

The updated start time for the scheduled query in Unix epoch format.

iv_scheduleendtime TYPE /AWS1/CWLTIMESTAMP /AWS1/CWLTIMESTAMP

The updated end time for the scheduled query in Unix epoch format.

iv_state TYPE /AWS1/CWLSCHEDULEDQUERYSTATE /AWS1/CWLSCHEDULEDQUERYSTATE

The updated state of the scheduled query.

RETURNING

oo_output TYPE REF TO /aws1/cl_cwlupdschddqueryrsp /AWS1/CL_CWLUPDSCHDDQUERYRSP

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->updatescheduledquery(
  io_destinationconfiguration = new /aws1/cl_cwldestinationconf(
    io_s3configuration = new /aws1/cl_cwls3configuration(
      iv_destinationidentifier = |string|
      iv_kmskeyid = |string|
      iv_owneraccountid = |string|
      iv_rolearn = |string|
    )
  )
  it_loggroupidentifiers = VALUE /aws1/cl_cwlschdqueryloggrid00=>tt_scheduledqueryloggroupids(
    ( new /aws1/cl_cwlschdqueryloggrid00( |string| ) )
  )
  iv_description = |string|
  iv_executionrolearn = |string|
  iv_identifier = |string|
  iv_querylanguage = |string|
  iv_querystring = |string|
  iv_scheduleendtime = 123
  iv_scheduleexpression = |string|
  iv_schedulestarttime = 123
  iv_starttimeoffset = 123
  iv_state = |string|
  iv_timezone = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_arn = lo_result->get_scheduledqueryarn( ).
  lv_scheduledqueryname = lo_result->get_name( ).
  lv_scheduledquerydescripti = lo_result->get_description( ).
  lv_querylanguage = lo_result->get_querylanguage( ).
  lv_querystring = lo_result->get_querystring( ).
  LOOP AT lo_result->get_loggroupidentifiers( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_loggroupidentifier = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_scheduleexpression = lo_result->get_scheduleexpression( ).
  lv_scheduletimezone = lo_result->get_timezone( ).
  lv_starttimeoffset = lo_result->get_starttimeoffset( ).
  lo_destinationconfiguratio = lo_result->get_destinationconfiguration( ).
  IF lo_destinationconfiguratio IS NOT INITIAL.
    lo_s3configuration = lo_destinationconfiguratio->get_s3configuration( ).
    IF lo_s3configuration IS NOT INITIAL.
      lv_s3uri = lo_s3configuration->get_destinationidentifier( ).
      lv_rolearn = lo_s3configuration->get_rolearn( ).
      lv_accountid = lo_s3configuration->get_owneraccountid( ).
      lv_kmskeyid = lo_s3configuration->get_kmskeyid( ).
    ENDIF.
  ENDIF.
  lv_scheduledquerystate = lo_result->get_state( ).
  lv_timestamp = lo_result->get_lasttriggeredtime( ).
  lv_executionstatus = lo_result->get_lastexecutionstatus( ).
  lv_timestamp = lo_result->get_schedulestarttime( ).
  lv_timestamp = lo_result->get_scheduleendtime( ).
  lv_rolearn = lo_result->get_executionrolearn( ).
  lv_timestamp = lo_result->get_creationtime( ).
  lv_timestamp = lo_result->get_lastupdatedtime( ).
ENDIF.