Skip to content

/AWS1/IF_BDC=>SAVEBROWSERSESSIONPROFILE()

About SaveBrowserSessionProfile

Saves the current state of a browser session as a reusable profile in Amazon Bedrock AgentCore. A browser profile captures persistent browser data such as cookies and local storage from an active session, enabling you to reuse this data in future browser sessions.

To save a browser session profile, you must specify the profile identifier, browser identifier, and session ID. The session must be active when saving the profile. Once saved, the profile can be used with the StartBrowserSession operation to initialize new sessions with the stored browser state.

Browser profiles are useful for scenarios that require persistent authentication, maintaining user preferences across sessions, or continuing tasks that depend on previously stored browser data.

The following operations are related to SaveBrowserSessionProfile:

Method Signature

METHODS /AWS1/IF_BDC~SAVEBROWSERSESSIONPROFILE
  IMPORTING
    !IV_TRACEID TYPE /AWS1/BDCSTRING OPTIONAL
    !IV_TRACEPARENT TYPE /AWS1/BDCSTRING OPTIONAL
    !IV_PROFILEIDENTIFIER TYPE /AWS1/BDCBROWSERPROFILEID OPTIONAL
    !IV_BROWSERIDENTIFIER TYPE /AWS1/BDCSTRING OPTIONAL
    !IV_SESSIONID TYPE /AWS1/BDCBROWSERSESSIONID OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/BDCCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdcsavebrsesspflrsp
  RAISING
    /AWS1/CX_BDCACCESSDENIEDEX
    /AWS1/CX_BDCCONFLICTEXCEPTION
    /AWS1/CX_BDCINTERNALSERVEREX
    /AWS1/CX_BDCRESOURCENOTFOUNDEX
    /AWS1/CX_BDCTHROTTLINGEX
    /AWS1/CX_BDCVALIDATIONEX
    /AWS1/CX_BDCCLIENTEXC
    /AWS1/CX_BDCSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_profileidentifier TYPE /AWS1/BDCBROWSERPROFILEID /AWS1/BDCBROWSERPROFILEID

The unique identifier for the browser profile. This identifier is used to reference the profile when starting new browser sessions. The identifier must follow the pattern of an alphanumeric name (up to 48 characters) followed by a hyphen and a 10-character alphanumeric suffix.

iv_browseridentifier TYPE /AWS1/BDCSTRING /AWS1/BDCSTRING

The unique identifier of the browser associated with the session from which to save the profile.

iv_sessionid TYPE /AWS1/BDCBROWSERSESSIONID /AWS1/BDCBROWSERSESSIONID

The unique identifier of the browser session from which to save the profile. The session must be active when saving the profile.

Optional arguments:

iv_traceid TYPE /AWS1/BDCSTRING /AWS1/BDCSTRING

The trace identifier for request tracking.

iv_traceparent TYPE /AWS1/BDCSTRING /AWS1/BDCSTRING

The parent trace information for distributed tracing.

iv_clienttoken TYPE /AWS1/BDCCLIENTTOKEN /AWS1/BDCCLIENTTOKEN

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock AgentCore ignores the request, but does not return an error.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdcsavebrsesspflrsp /AWS1/CL_BDCSAVEBRSESSPFLRSP

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->savebrowsersessionprofile(
  iv_browseridentifier = |string|
  iv_clienttoken = |string|
  iv_profileidentifier = |string|
  iv_sessionid = |string|
  iv_traceid = |string|
  iv_traceparent = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_browserprofileid = lo_result->get_profileidentifier( ).
  lv_string = lo_result->get_browseridentifier( ).
  lv_browsersessionid = lo_result->get_sessionid( ).
  lv_datetimestamp = lo_result->get_lastupdatedat( ).
ENDIF.