/AWS1/CL_BDC=>LISTCODEINTERPRETERSESSIONS()
¶
About ListCodeInterpreterSessions¶
Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by code interpreter identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to ListCodeInterpreterSessions
:
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_codeinterpreteridentifier
TYPE /AWS1/BDCSTRING
/AWS1/BDCSTRING
¶
The unique identifier of the code interpreter to list sessions for. If specified, only sessions for this code interpreter are returned. If not specified, sessions for all code interpreters are returned.
Optional arguments:¶
iv_maxresults
TYPE /AWS1/BDCMAXRESULTS
/AWS1/BDCMAXRESULTS
¶
The maximum number of results to return in a single call. The default value is 10. Valid values range from 1 to 100. To retrieve the remaining results, make another call with the returned
nextToken
value.
iv_nexttoken
TYPE /AWS1/BDCNEXTTOKEN
/AWS1/BDCNEXTTOKEN
¶
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. If not specified, Amazon Bedrock returns the first page of results.
iv_status
TYPE /AWS1/BDCCODEINTERPTRSESSTATUS
/AWS1/BDCCODEINTERPTRSESSTATUS
¶
The status of the code interpreter sessions to list. Valid values include ACTIVE, STOPPING, and STOPPED. If not specified, sessions with any status are returned.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_bdclistcodeintsessrsp
/AWS1/CL_BDCLISTCODEINTSESSRSP
¶
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_bdc~listcodeinterpretersessions(
iv_codeinterpreteridentifier = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_status = |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_items( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_codeinterptridentifier( ).
lv_codeinterpretersessioni = lo_row_1->get_sessionid( ).
lv_name = lo_row_1->get_name( ).
lv_codeinterpretersessions = lo_row_1->get_status( ).
lv_datetimestamp = lo_row_1->get_createdat( ).
lv_datetimestamp = lo_row_1->get_lastupdatedat( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.