/AWS1/IF_TRL=>STARTQUERY()¶
About StartQuery¶
Starts a CloudTrail Lake query. Use the QueryStatement
parameter to provide your SQL query, enclosed in single quotation marks. Use the optional
DeliveryS3Uri parameter to deliver the query results to an S3
bucket.
StartQuery requires you specify either the QueryStatement parameter, or a QueryAlias and any QueryParameters. In the current release,
the QueryAlias and QueryParameters parameters are used only for the queries that populate the CloudTrail Lake dashboards.
Method Signature¶
METHODS /AWS1/IF_TRL~STARTQUERY
IMPORTING
!IV_QUERYSTATEMENT TYPE /AWS1/TRLQUERYSTATEMENT OPTIONAL
!IV_DELIVERYS3URI TYPE /AWS1/TRLDELIVERYS3URI OPTIONAL
!IV_QUERYALIAS TYPE /AWS1/TRLQUERYALIAS OPTIONAL
!IT_QUERYPARAMETERS TYPE /AWS1/CL_TRLQUERYPARAMETERS_W=>TT_QUERYPARAMETERS OPTIONAL
!IV_EVENTDATASTOREOWNERACCTID TYPE /AWS1/TRLACCOUNTID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_trlstartqueryresponse
RAISING
/AWS1/CX_TRLEVTDATASTOREARNI00
/AWS1/CX_TRLEVTDATASTORENOTF00
/AWS1/CX_TRLINACTEVTDATASTOR00
/AWS1/CX_TRLINSUFFICIENTENCP00
/AWS1/CX_TRLINSUFFICIENTS3BK00
/AWS1/CX_TRLINVALIDPARAMETEREX
/AWS1/CX_TRLINVALIDQUERYSTMTEX
/AWS1/CX_TRLINVS3BUCKETNAMEEX
/AWS1/CX_TRLINVALIDS3PREFIXEX
/AWS1/CX_TRLMAXCONCURRENTQUE00
/AWS1/CX_TRLNOMANAGEMENTACCT00
/AWS1/CX_TRLOPNOTPERMITTEDEX
/AWS1/CX_TRLS3BKTDOESNOTEXEX
/AWS1/CX_TRLUNSUPPORTEDOPEX
/AWS1/CX_TRLCLIENTEXC
/AWS1/CX_TRLSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_querystatement TYPE /AWS1/TRLQUERYSTATEMENT /AWS1/TRLQUERYSTATEMENT¶
The SQL code of your query.
iv_deliverys3uri TYPE /AWS1/TRLDELIVERYS3URI /AWS1/TRLDELIVERYS3URI¶
The URI for the S3 bucket where CloudTrail delivers the query results.
iv_queryalias TYPE /AWS1/TRLQUERYALIAS /AWS1/TRLQUERYALIAS¶
The alias that identifies a query template.
it_queryparameters TYPE /AWS1/CL_TRLQUERYPARAMETERS_W=>TT_QUERYPARAMETERS TT_QUERYPARAMETERS¶
The query parameters for the specified
QueryAlias.
iv_eventdatastoreowneracctid TYPE /AWS1/TRLACCOUNTID /AWS1/TRLACCOUNTID¶
The account ID of the event data store owner.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_trlstartqueryresponse /AWS1/CL_TRLSTARTQUERYRESPONSE¶
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->startquery(
it_queryparameters = VALUE /aws1/cl_trlqueryparameters_w=>tt_queryparameters(
( new /aws1/cl_trlqueryparameters_w( |string| ) )
)
iv_deliverys3uri = |string|
iv_eventdatastoreowneracctid = |string|
iv_queryalias = |string|
iv_querystatement = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_uuid = lo_result->get_queryid( ).
lv_accountid = lo_result->get_evtdatastoreowneracctid( ).
ENDIF.