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

********************
stop_browser_session
********************



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

  

  Terminates an active browser session in Amazon Bedrock AgentCore. This operation stops the session, releases associated resources, and makes the session unavailable for further use.

   

  To stop a browser session, you must specify both the browser identifier and the session ID. Once stopped, a session cannot be restarted; you must create a new session using ``StartBrowserSession``.

   

  The following operations are related to ``StopBrowserSession``:

   

  
  * `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/StopBrowserSession>`_  


  **Request Syntax**
  ::

    response = client.stop_browser_session(
        traceId='string',
        traceParent='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 browserIdentifier: string
  :param browserIdentifier: **[REQUIRED]** 

    The unique identifier of the browser associated with the session.

    

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

    The unique identifier of the browser session to stop.

    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        The identifier of the browser.

        
      

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

        The identifier of the browser session.

        
      

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

        The time at which the browser session was last updated.

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

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

  