/AWS1/IF_LSA=>GETRELATIONALDATABASELOGEVTS()¶
About GetRelationalDatabaseLogEvents¶
Returns a list of log events for a database in Amazon Lightsail.
Method Signature¶
METHODS /AWS1/IF_LSA~GETRELATIONALDATABASELOGEVTS
IMPORTING
!IV_RELATIONALDATABASENAME TYPE /AWS1/LSARESOURCENAME OPTIONAL
!IV_LOGSTREAMNAME TYPE /AWS1/LSASTRING OPTIONAL
!IV_STARTTIME TYPE /AWS1/LSAISODATE OPTIONAL
!IV_ENDTIME TYPE /AWS1/LSAISODATE OPTIONAL
!IV_STARTFROMHEAD TYPE /AWS1/LSABOOLEAN OPTIONAL
!IV_PAGETOKEN TYPE /AWS1/LSASTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lsagetrelationaldat09
RAISING
/AWS1/CX_LSAACCESSDENIEDEX
/AWS1/CX_LSAACCTSETUPINPRGSSEX
/AWS1/CX_LSAINVALIDINPUTEX
/AWS1/CX_LSANOTFOUNDEXCEPTION
/AWS1/CX_LSAOPERATIONFAILUREEX
/AWS1/CX_LSARGNSETUPINPRGSSEX
/AWS1/CX_LSASERVICEEXCEPTION
/AWS1/CX_LSAUNAUTHNTCTDEX
/AWS1/CX_LSACLIENTEXC
/AWS1/CX_LSASERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_relationaldatabasename TYPE /AWS1/LSARESOURCENAME /AWS1/LSARESOURCENAME¶
The name of your database for which to get log events.
iv_logstreamname TYPE /AWS1/LSASTRING /AWS1/LSASTRING¶
The name of the log stream.
Use the
get relational database log streamsoperation to get a list of available log streams.
Optional arguments:¶
iv_starttime TYPE /AWS1/LSAISODATE /AWS1/LSAISODATE¶
The start of the time interval from which to get log events.
Constraints:
Specified in Coordinated Universal Time (UTC).
Specified in the Unix time format.
For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, then you input
1538424000as the start time.
iv_endtime TYPE /AWS1/LSAISODATE /AWS1/LSAISODATE¶
The end of the time interval from which to get log events.
Constraints:
Specified in Coordinated Universal Time (UTC).
Specified in the Unix time format.
For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, then you input
1538424000as the end time.
iv_startfromhead TYPE /AWS1/LSABOOLEAN /AWS1/LSABOOLEAN¶
Parameter to specify if the log should start from head or tail. If
trueis specified, the log event starts from the head of the log. Iffalseis specified, the log event starts from the tail of the log.For PostgreSQL, the default value of
falseis the only option available.
iv_pagetoken TYPE /AWS1/LSASTRING /AWS1/LSASTRING¶
The token to advance to the next or previous page of results from your request.
To get a page token, perform an initial
GetRelationalDatabaseLogEventsrequest. If your results are paginated, the response will return a next forward token and/or next backward token that you can specify as the page token in a subsequent request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lsagetrelationaldat09 /AWS1/CL_LSAGETRELATIONALDAT09¶
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->getrelationaldatabaselogevts(
iv_endtime = '20150101000000.0000000'
iv_logstreamname = |string|
iv_pagetoken = |string|
iv_relationaldatabasename = |string|
iv_startfromhead = ABAP_TRUE
iv_starttime = '20150101000000.0000000'
).
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_resourcelogevents( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_isodate = lo_row_1->get_createdat( ).
lv_string = lo_row_1->get_message( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nextbackwardtoken( ).
lv_string = lo_result->get_nextforwardtoken( ).
ENDIF.