Skip to content

/AWS1/CL_BDC=>LISTBROWSERSESSIONS()

About ListBrowserSessions

Retrieves a list of browser 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 browser 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 ListBrowserSessions:

Method Signature

IMPORTING

Required arguments:

iv_browseridentifier TYPE /AWS1/BDCSTRING /AWS1/BDCSTRING

The unique identifier of the browser to list sessions for. If specified, only sessions for this browser are returned. If not specified, sessions for all browsers 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/BDCBROWSERSESSIONSTATUS /AWS1/BDCBROWSERSESSIONSTATUS

The status of the browser 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_bdclistbrowsersessrsp /AWS1/CL_BDCLISTBROWSERSESSRSP

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~listbrowsersessions(
  iv_browseridentifier = |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_browseridentifier( ).
      lv_browsersessionid = lo_row_1->get_sessionid( ).
      lv_name = lo_row_1->get_name( ).
      lv_browsersessionstatus = 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.