/AWS1/IF_TBD=>BATCHGETSESSION()¶
About BatchGetSession¶
Retrieves multiple sessions in a single request. This is a batch version of the GetSession API.
The result of getting each session is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.
Method Signature¶
METHODS /AWS1/IF_TBD~BATCHGETSESSION
IMPORTING
!IT_IDENTIFIERS TYPE /AWS1/CL_TBDBATCHGETSESSIONID=>TT_BATCHGETSESSIONIDENTIFIERS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tbdbatchgetsessionrsp
RAISING
/AWS1/CX_TBDACCESSDENIEDEX
/AWS1/CX_TBDINTERNALSERVERER00
/AWS1/CX_TBDTHROTTLINGEX
/AWS1/CX_TBDVALIDATIONEX
/AWS1/CX_TBDCLIENTEXC
/AWS1/CX_TBDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
it_identifiers TYPE /AWS1/CL_TBDBATCHGETSESSIONID=>TT_BATCHGETSESSIONIDENTIFIERS TT_BATCHGETSESSIONIDENTIFIERS¶
The list of session identifiers to retrieve. You can specify up to 100 identifiers per request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_tbdbatchgetsessionrsp /AWS1/CL_TBDBATCHGETSESSIONRSP¶
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->batchgetsession(
it_identifiers = VALUE /aws1/cl_tbdbatchgetsessionid=>tt_batchgetsessionidentifiers(
(
new /aws1/cl_tbdbatchgetsessionid(
iv_farmid = |string|
iv_jobid = |string|
iv_queueid = |string|
iv_sessionid = |string|
)
)
)
).
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_sessions( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_farmid = lo_row_1->get_farmid( ).
lv_queueid = lo_row_1->get_queueid( ).
lv_jobid = lo_row_1->get_jobid( ).
lv_sessionid = lo_row_1->get_sessionid( ).
lv_fleetid = lo_row_1->get_fleetid( ).
lv_workerid = lo_row_1->get_workerid( ).
lv_startedat = lo_row_1->get_startedat( ).
lv_sessionlifecyclestatus = lo_row_1->get_lifecyclestatus( ).
lv_endedat = lo_row_1->get_endedat( ).
lv_sessionlifecycletargets = lo_row_1->get_targetlifecyclestatus( ).
lv_updatedat = lo_row_1->get_updatedat( ).
lv_updatedby = lo_row_1->get_updatedby( ).
lo_logconfiguration = lo_row_1->get_log( ).
IF lo_logconfiguration IS NOT INITIAL.
lv_logdriver = lo_logconfiguration->get_logdriver( ).
LOOP AT lo_logconfiguration->get_options( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_logconfiguration->get_parameters( ) into ls_row_3.
lv_key = ls_row_3-key.
lo_value_1 = ls_row_3-value.
IF lo_value_1 IS NOT INITIAL.
lv_string = lo_value_1->get_value( ).
ENDIF.
ENDLOOP.
lv_logerror = lo_logconfiguration->get_error( ).
ENDIF.
lo_hostpropertiesresponse = lo_row_1->get_hostproperties( ).
IF lo_hostpropertiesresponse IS NOT INITIAL.
lo_ipaddresses = lo_hostpropertiesresponse->get_ipaddresses( ).
IF lo_ipaddresses IS NOT INITIAL.
LOOP AT lo_ipaddresses->get_ipv4addresses( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_ipv4address = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_ipaddresses->get_ipv6addresses( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_ipv6address = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_hostname = lo_hostpropertiesresponse->get_hostname( ).
lv_string = lo_hostpropertiesresponse->get_ec2instancearn( ).
lv_instancetype = lo_hostpropertiesresponse->get_ec2instancetype( ).
ENDIF.
lo_logconfiguration = lo_row_1->get_workerlog( ).
IF lo_logconfiguration IS NOT INITIAL.
lv_logdriver = lo_logconfiguration->get_logdriver( ).
LOOP AT lo_logconfiguration->get_options( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_logconfiguration->get_parameters( ) into ls_row_3.
lv_key = ls_row_3-key.
lo_value_1 = ls_row_3-value.
IF lo_value_1 IS NOT INITIAL.
lv_string = lo_value_1->get_value( ).
ENDIF.
ENDLOOP.
lv_logerror = lo_logconfiguration->get_error( ).
ENDIF.
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_errors( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_farmid = lo_row_9->get_farmid( ).
lv_queueid = lo_row_9->get_queueid( ).
lv_jobid = lo_row_9->get_jobid( ).
lv_sessionid = lo_row_9->get_sessionid( ).
lv_batchgetsessionerrorcod = lo_row_9->get_code( ).
lv_string = lo_row_9->get_message( ).
ENDIF.
ENDLOOP.
ENDIF.
Get multiple sessions in a single request¶
Get multiple sessions in a single request
DATA(lo_result) = lo_client->batchgetsession(
it_identifiers = VALUE /aws1/cl_tbdbatchgetsessionid=>tt_batchgetsessionidentifiers(
(
new /aws1/cl_tbdbatchgetsessionid(
iv_farmid = |farm-1234567890abcdef1234567890abcdef|
iv_jobid = |job-1234567890abcdef1234567890abcdef|
iv_queueid = |queue-1234567890abcdef1234567890abcdef|
iv_sessionid = |session-1234567890abcdef1234567890abcdef|
)
)
(
new /aws1/cl_tbdbatchgetsessionid(
iv_farmid = |farm-1234567890abcdef1234567890abcdef|
iv_jobid = |job-1234567890abcdef1234567890abcdef|
iv_queueid = |queue-1234567890abcdef1234567890abcdef|
iv_sessionid = |session-234567890abcdef1234567890abcdef1|
)
)
)
).