Skip to content

/AWS1/CL_WSW=>UPDATESESSIONLOGGER()

About UpdateSessionLogger

Updates the details of a session logger.

Method Signature

IMPORTING

Required arguments:

iv_sessionloggerarn TYPE /AWS1/WSWARN /AWS1/WSWARN

The ARN of the session logger to update.

Optional arguments:

io_eventfilter TYPE REF TO /AWS1/CL_WSWEVENTFILTER /AWS1/CL_WSWEVENTFILTER

The updated eventFilter.

io_logconfiguration TYPE REF TO /AWS1/CL_WSWLOGCONFIGURATION /AWS1/CL_WSWLOGCONFIGURATION

The updated logConfiguration.

iv_displayname TYPE /AWS1/WSWDISPLAYNAMESAFE /AWS1/WSWDISPLAYNAMESAFE

The updated display name.

RETURNING

oo_output TYPE REF TO /aws1/cl_wswupdsessloggerrsp /AWS1/CL_WSWUPDSESSLOGGERRSP

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_wsw~updatesessionlogger(
  io_eventfilter = new /aws1/cl_wsweventfilter(
    io_all = new /aws1/cl_wswunit( )
    it_include = VALUE /aws1/cl_wswevents_w=>tt_events(
      ( new /aws1/cl_wswevents_w( |string| ) )
    )
  )
  io_logconfiguration = new /aws1/cl_wswlogconfiguration(
    io_s3 = new /aws1/cl_wsws3logconfiguration(
      iv_bucket = |string|
      iv_bucketowner = |string|
      iv_folderstructure = |string|
      iv_keyprefix = |string|
      iv_logfileformat = |string|
    )
  )
  iv_displayname = |string|
  iv_sessionloggerarn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_sessionlogger = lo_result->get_sessionlogger( ).
  IF lo_sessionlogger IS NOT INITIAL.
    lv_arn = lo_sessionlogger->get_sessionloggerarn( ).
    lo_eventfilter = lo_sessionlogger->get_eventfilter( ).
    IF lo_eventfilter IS NOT INITIAL.
      lo_unit = lo_eventfilter->get_all( ).
      IF lo_unit IS NOT INITIAL.
      ENDIF.
      LOOP AT lo_eventfilter->get_include( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_event = lo_row_1->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lo_logconfiguration = lo_sessionlogger->get_logconfiguration( ).
    IF lo_logconfiguration IS NOT INITIAL.
      lo_s3logconfiguration = lo_logconfiguration->get_s3( ).
      IF lo_s3logconfiguration IS NOT INITIAL.
        lv_s3bucket = lo_s3logconfiguration->get_bucket( ).
        lv_s3keyprefix = lo_s3logconfiguration->get_keyprefix( ).
        lv_s3bucketowner = lo_s3logconfiguration->get_bucketowner( ).
        lv_logfileformat = lo_s3logconfiguration->get_logfileformat( ).
        lv_folderstructure = lo_s3logconfiguration->get_folderstructure( ).
      ENDIF.
    ENDIF.
    lv_keyarn = lo_sessionlogger->get_customermanagedkey( ).
    LOOP AT lo_sessionlogger->get_additionalenccontext( ) into ls_row_2.
      lv_key = ls_row_2-key.
      lo_value = ls_row_2-value.
      IF lo_value IS NOT INITIAL.
        lv_stringtype = lo_value->get_value( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_sessionlogger->get_associatedportalarns( ) into lo_row_3.
      lo_row_4 = lo_row_3.
      IF lo_row_4 IS NOT INITIAL.
        lv_arn = lo_row_4->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_displaynamesafe = lo_sessionlogger->get_displayname( ).
    lv_timestamp = lo_sessionlogger->get_creationdate( ).
  ENDIF.
ENDIF.

Update Session Logger Event Filter

Updates a session logger to capture specific events instead of all events

DATA(lo_result) = lo_client->/aws1/if_wsw~updatesessionlogger(
  io_eventfilter = new /aws1/cl_wsweventfilter(
    it_include = VALUE /aws1/cl_wswevents_w=>tt_events(
      ( new /aws1/cl_wswevents_w( |SessionStart| ) )
      ( new /aws1/cl_wswevents_w( |SessionEnd| ) )
      ( new /aws1/cl_wswevents_w( |UrlLoad| ) )
      ( new /aws1/cl_wswevents_w( |WebsiteInteract| ) )
    )
  )
  iv_sessionloggerarn = |arn:aws:workspaces-web:us-west-2:123456789012:sessionLogger/12345678-1234-1234-1234-123456789012|
).

Update Session Logger Configuration

Updates the log configuration of a session logger

DATA(lo_result) = lo_client->/aws1/if_wsw~updatesessionlogger(
  io_logconfiguration = new /aws1/cl_wswlogconfiguration(
    io_s3 = new /aws1/cl_wsws3logconfiguration(
      iv_bucket = |updated-my-session-logs-bucket-2|
      iv_bucketowner = |123456789012|
      iv_folderstructure = |Flat|
      iv_keyprefix = |updated/key/prefix|
      iv_logfileformat = |Json|
    )
  )
  iv_sessionloggerarn = |arn:aws:workspaces-web:us-west-2:123456789012:sessionLogger/87654321-4321-4321-4321-210987654321|
).