/AWS1/IF_ATH=>GETSESSION()¶
About GetSession¶
Gets the full details of a previously created session, including the session status and configuration.
Method Signature¶
METHODS /AWS1/IF_ATH~GETSESSION
IMPORTING
!IV_SESSIONID TYPE /AWS1/ATHSESSIONID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_athgetsessionresponse
RAISING
/AWS1/CX_ATHINTERNALSERVEREX
/AWS1/CX_ATHINVALIDREQUESTEX
/AWS1/CX_ATHRESOURCENOTFOUNDEX
/AWS1/CX_ATHCLIENTEXC
/AWS1/CX_ATHSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_sessionid TYPE /AWS1/ATHSESSIONID /AWS1/ATHSESSIONID¶
The session ID.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_athgetsessionresponse /AWS1/CL_ATHGETSESSIONRESPONSE¶
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->getsession( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_sessionid = lo_result->get_sessionid( ).
lv_descriptionstring = lo_result->get_description( ).
lv_workgroupname = lo_result->get_workgroup( ).
lv_namestring = lo_result->get_engineversion( ).
lo_engineconfiguration = lo_result->get_engineconfiguration( ).
IF lo_engineconfiguration IS NOT INITIAL.
lv_coordinatordpusize = lo_engineconfiguration->get_coordinatordpusize( ).
lv_maxconcurrentdpus = lo_engineconfiguration->get_maxconcurrentdpus( ).
lv_defaultexecutordpusize = lo_engineconfiguration->get_defaultexecutordpusize( ).
LOOP AT lo_engineconfiguration->get_additionalconfigs( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_engineconfiguration->get_sparkproperties( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_engineconfiguration->get_classifications( ) into lo_row_1.
lo_row_2 = lo_row_1.
IF lo_row_2 IS NOT INITIAL.
lv_namestring = lo_row_2->get_name( ).
LOOP AT lo_row_2->get_properties( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_parametersmapvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
lv_namestring = lo_result->get_notebookversion( ).
lo_monitoringconfiguration = lo_result->get_monitoringconfiguration( ).
IF lo_monitoringconfiguration IS NOT INITIAL.
lo_cloudwatchloggingconfig = lo_monitoringconfiguration->get_cloudwatchloggingconf( ).
IF lo_cloudwatchloggingconfig IS NOT INITIAL.
lv_boxedboolean = lo_cloudwatchloggingconfig->get_enabled( ).
lv_loggroupname = lo_cloudwatchloggingconfig->get_loggroup( ).
lv_logstreamnameprefix = lo_cloudwatchloggingconfig->get_logstreamnameprefix( ).
LOOP AT lo_cloudwatchloggingconfig->get_logtypes( ) into ls_row_3.
lv_key_1 = ls_row_3-key.
LOOP AT ls_row_3-value into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_logtypevalue = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
ENDLOOP.
ENDIF.
lo_managedloggingconfigura = lo_monitoringconfiguration->get_managedloggingconf( ).
IF lo_managedloggingconfigura IS NOT INITIAL.
lv_boxedboolean = lo_managedloggingconfigura->get_enabled( ).
lv_kmskey = lo_managedloggingconfigura->get_kmskey( ).
ENDIF.
lo_s3loggingconfiguration = lo_monitoringconfiguration->get_s3loggingconfiguration( ).
IF lo_s3loggingconfiguration IS NOT INITIAL.
lv_boxedboolean = lo_s3loggingconfiguration->get_enabled( ).
lv_kmskey = lo_s3loggingconfiguration->get_kmskey( ).
lv_s3outputlocation = lo_s3loggingconfiguration->get_loglocation( ).
ENDIF.
ENDIF.
lo_sessionconfiguration = lo_result->get_sessionconfiguration( ).
IF lo_sessionconfiguration IS NOT INITIAL.
lv_rolearn = lo_sessionconfiguration->get_executionrole( ).
lv_resultoutputlocation = lo_sessionconfiguration->get_workingdirectory( ).
lv_long = lo_sessionconfiguration->get_idletimeoutseconds( ).
lv_sessionidletimeoutinmin = lo_sessionconfiguration->get_sessidletimeoutinminutes( ).
lo_encryptionconfiguration = lo_sessionconfiguration->get_encryptionconfiguration( ).
IF lo_encryptionconfiguration IS NOT INITIAL.
lv_encryptionoption = lo_encryptionconfiguration->get_encryptionoption( ).
lv_string = lo_encryptionconfiguration->get_kmskey( ).
ENDIF.
ENDIF.
lo_sessionstatus = lo_result->get_status( ).
IF lo_sessionstatus IS NOT INITIAL.
lv_date = lo_sessionstatus->get_startdatetime( ).
lv_date = lo_sessionstatus->get_lastmodifieddatetime( ).
lv_date = lo_sessionstatus->get_enddatetime( ).
lv_date = lo_sessionstatus->get_idlesincedatetime( ).
lv_sessionstate = lo_sessionstatus->get_state( ).
lv_descriptionstring = lo_sessionstatus->get_statechangereason( ).
ENDIF.
lo_sessionstatistics = lo_result->get_statistics( ).
IF lo_sessionstatistics IS NOT INITIAL.
lv_long = lo_sessionstatistics->get_dpuexecutioninmillis( ).
ENDIF.
ENDIF.