/AWS1/IF_CWL=>UPDATESCHEDULEDQUERY()¶
About UpdateScheduledQuery¶
Updates the configuration of an existing scheduled query. This operation follows PUT semantics, replacing the existing configuration with the provided values.
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 name or ARN of the scheduled query to update.
iv_querylanguage TYPE /AWS1/CWLQUERYLANGUAGE /AWS1/CWLQUERYLANGUAGE¶
Updated query language to use (LogsQL, PPL, or SQL).
iv_querystring TYPE /AWS1/CWLQUERYSTRING /AWS1/CWLQUERYSTRING¶
Updated CloudWatch Logs Insights query string to execute.
iv_scheduleexpression TYPE /AWS1/CWLSCHEDULEEXPRESSION /AWS1/CWLSCHEDULEEXPRESSION¶
Updated cron expression that defines when the scheduled query runs.
iv_executionrolearn TYPE /AWS1/CWLROLEARN /AWS1/CWLROLEARN¶
Updated ARN of the IAM role that CloudWatch Logs will assume to execute the scheduled query.
Optional arguments:¶
iv_description TYPE /AWS1/CWLSCHEDULEDQUERYDESC /AWS1/CWLSCHEDULEDQUERYDESC¶
Updated description for the scheduled query.
it_loggroupidentifiers TYPE /AWS1/CL_CWLSCHDQUERYLOGGRID00=>TT_SCHEDULEDQUERYLOGGROUPIDS TT_SCHEDULEDQUERYLOGGROUPIDS¶
Updated log group identifiers to query.
iv_timezone TYPE /AWS1/CWLSCHEDULETIMEZONE /AWS1/CWLSCHEDULETIMEZONE¶
Updated timezone in which the schedule expression is evaluated.
iv_starttimeoffset TYPE /AWS1/CWLSTARTTIMEOFFSET /AWS1/CWLSTARTTIMEOFFSET¶
Updated time offset in seconds from the execution time for the start of the query time range.
io_destinationconfiguration TYPE REF TO /AWS1/CL_CWLDESTINATIONCONF /AWS1/CL_CWLDESTINATIONCONF¶
Updated configuration for destinations where the query results will be delivered.
iv_schedulestarttime TYPE /AWS1/CWLTIMESTAMP /AWS1/CWLTIMESTAMP¶
Updated start time for the query schedule in Unix epoch time.
iv_scheduleendtime TYPE /AWS1/CWLTIMESTAMP /AWS1/CWLTIMESTAMP¶
Updated end time for the query schedule in Unix epoch time.
iv_state TYPE /AWS1/CWLSCHEDULEDQUERYSTATE /AWS1/CWLSCHEDULEDQUERYSTATE¶
Updated state of the scheduled query (ENABLED or DISABLED).
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cwlupdschddqueryrsp /AWS1/CL_CWLUPDSCHDDQUERYRSP¶
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->updatescheduledquery(
io_destinationconfiguration = new /aws1/cl_cwldestinationconf(
io_s3configuration = new /aws1/cl_cwls3configuration(
iv_destinationidentifier = |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( ).
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.