:doc:`BedrockAgentCore <../../bedrock-agentcore>` / Client / save_browser_session_profile

****************************
save_browser_session_profile
****************************



.. py:method:: BedrockAgentCore.Client.save_browser_session_profile(**kwargs)

  

  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``:

   

  
  * `StartBrowserSession <https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartBrowserSession.html>`__
   
  * `GetBrowserSession <https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_GetBrowserSession.html>`__
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/SaveBrowserSessionProfile>`_  


  **Request Syntax**
  ::

    response = client.save_browser_session_profile(
        traceId='string',
        traceParent='string',
        profileIdentifier='string',
        browserIdentifier='string',
        sessionId='string',
        clientToken='string'
    )
    
  :type traceId: string
  :param traceId: 

    The trace identifier for request tracking.

    

  
  :type traceParent: string
  :param traceParent: 

    The parent trace information for distributed tracing.

    

  
  :type profileIdentifier: string
  :param profileIdentifier: **[REQUIRED]** 

    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.

    

  
  :type browserIdentifier: string
  :param browserIdentifier: **[REQUIRED]** 

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

    

  
  :type sessionId: string
  :param sessionId: **[REQUIRED]** 

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

    

  
  :type clientToken: string
  :param clientToken: 

    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.

    This field is autopopulated if not provided.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'profileIdentifier': 'string',
          'browserIdentifier': 'string',
          'sessionId': 'string',
          'lastUpdatedAt': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **profileIdentifier** *(string) --* 

        The unique identifier of the saved browser profile.

        
      

      - **browserIdentifier** *(string) --* 

        The unique identifier of the browser associated with the session from which the profile was saved.

        
      

      - **sessionId** *(string) --* 

        The unique identifier of the browser session from which the profile was saved.

        
      

      - **lastUpdatedAt** *(datetime) --* 

        The timestamp when the browser profile was last updated. This value is in ISO 8601 format.

        
  
  **Exceptions**
  
  *   :py:class:`BedrockAgentCore.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ConflictException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ValidationException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ThrottlingException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.InternalServerException`

  