/AWS1/CL_WSW=>CREATESESSIONLOGGER()
¶
About CreateSessionLogger¶
Creates a session logger.
Method Signature¶
IMPORTING¶
Required arguments:¶
io_eventfilter
TYPE REF TO /AWS1/CL_WSWEVENTFILTER
/AWS1/CL_WSWEVENTFILTER
¶
The filter that specifies the events to monitor.
io_logconfiguration
TYPE REF TO /AWS1/CL_WSWLOGCONFIGURATION
/AWS1/CL_WSWLOGCONFIGURATION
¶
The configuration that specifies where logs are delivered.
Optional arguments:¶
iv_displayname
TYPE /AWS1/WSWDISPLAYNAMESAFE
/AWS1/WSWDISPLAYNAMESAFE
¶
The human-readable display name for the session logger resource.
iv_customermanagedkey
TYPE /AWS1/WSWKEYARN
/AWS1/WSWKEYARN
¶
The custom managed key of the session logger.
it_additionalenccontext
TYPE /AWS1/CL_WSWENCCONTEXTMAP_W=>TT_ENCRYPTIONCONTEXTMAP
TT_ENCRYPTIONCONTEXTMAP
¶
The additional encryption context of the session logger.
it_tags
TYPE /AWS1/CL_WSWTAG=>TT_TAGLIST
TT_TAGLIST
¶
The tags to add to the session logger.
iv_clienttoken
TYPE /AWS1/WSWCLIENTTOKEN
/AWS1/WSWCLIENTTOKEN
¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request. If you do not specify a client token, one is automatically generated by the AWS SDK.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_wswcresessloggerrsp
/AWS1/CL_WSWCRESESSLOGGERRSP
¶
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~createsessionlogger(
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|
)
)
it_additionalenccontext = VALUE /aws1/cl_wswenccontextmap_w=>tt_encryptioncontextmap(
(
VALUE /aws1/cl_wswenccontextmap_w=>ts_encryptioncontextmap_maprow(
key = |string|
value = new /aws1/cl_wswenccontextmap_w( |string| )
)
)
)
it_tags = VALUE /aws1/cl_wswtag=>tt_taglist(
(
new /aws1/cl_wswtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_clienttoken = |string|
iv_customermanagedkey = |string|
iv_displayname = |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_sessionloggerarn( ).
ENDIF.
Create Session Logger with All Events¶
Creates a session logger that captures all events and stores them in S3 with JSON format and flat folder structure
DATA(lo_result) = lo_client->/aws1/if_wsw~createsessionlogger(
io_eventfilter = new /aws1/cl_wsweventfilter( io_all = new /aws1/cl_wswunit( ) )
io_logconfiguration = new /aws1/cl_wswlogconfiguration(
io_s3 = new /aws1/cl_wsws3logconfiguration(
iv_bucket = |my-session-logs-bucket|
iv_bucketowner = |123456789012|
iv_folderstructure = |Flat|
iv_keyprefix = |session-logs/all/events|
iv_logfileformat = |Json|
)
)
iv_displayname = |Session Logger with All Events|
).
Create Session Logger with Specific Events¶
Creates a session logger that captures only specific events with JSONLines format and nested folder structure
DATA(lo_result) = lo_client->/aws1/if_wsw~createsessionlogger(
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| ) )
)
)
io_logconfiguration = new /aws1/cl_wswlogconfiguration(
io_s3 = new /aws1/cl_wsws3logconfiguration(
iv_bucket = |my-session-logs-bucket|
iv_bucketowner = |123456789012|
iv_folderstructure = |NestedByDate|
iv_keyprefix = |session-logs/each/event|
iv_logfileformat = |JSONLines|
)
)
it_additionalenccontext = VALUE /aws1/cl_wswenccontextmap_w=>tt_encryptioncontextmap(
(
VALUE /aws1/cl_wswenccontextmap_w=>ts_encryptioncontextmap_maprow(
key = |EncryptionContextKey|
value = new /aws1/cl_wswenccontextmap_w( |EncryptionContextValue| )
)
)
)
it_tags = VALUE /aws1/cl_wswtag=>tt_taglist(
(
new /aws1/cl_wswtag(
iv_key = |KEY-1|
iv_value = |VALUE-1|
)
)
(
new /aws1/cl_wswtag(
iv_key = |KEY-2|
iv_value = |VALUE-2|
)
)
)
iv_customermanagedkey = |arn:aws:kms:us-west-2:123456789012:key/12345678-1234-1234-1234-123456789012|
iv_displayname = |Session Logger with Each Events|
).