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

****************************
get_code_interpreter_session
****************************



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

  

  Retrieves detailed information about a specific code interpreter session in Amazon Bedrock AgentCore. This operation returns the session's configuration, current status, and metadata.

   

  To get a code interpreter session, you must specify both the code interpreter identifier and the session ID. The response includes information about the session's timeout settings and current status.

   

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

   

  
  * `StartCodeInterpreterSession <https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StartCodeInterpreterSession.html>`__
   
  * `ListCodeInterpreterSessions <https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_ListCodeInterpreterSessions.html>`__
   
  * `StopCodeInterpreterSession <https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_StopCodeInterpreterSession.html>`__
  

  

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


  **Request Syntax**
  ::

    response = client.get_code_interpreter_session(
        codeInterpreterIdentifier='string',
        sessionId='string'
    )
    
  :type codeInterpreterIdentifier: string
  :param codeInterpreterIdentifier: **[REQUIRED]** 

    The unique identifier of the code interpreter associated with the session.

    

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

    The unique identifier of the code interpreter session to retrieve.

    

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

    
    ::

      {
          'codeInterpreterIdentifier': 'string',
          'sessionId': 'string',
          'name': 'string',
          'createdAt': datetime(2015, 1, 1),
          'sessionTimeoutSeconds': 123,
          'status': 'READY'|'TERMINATED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **codeInterpreterIdentifier** *(string) --* 

        The identifier of the code interpreter.

        
      

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

        The identifier of the code interpreter session.

        
      

      - **name** *(string) --* 

        The name of the code interpreter session.

        
      

      - **createdAt** *(datetime) --* 

        The time at which the code interpreter session was created.

        
      

      - **sessionTimeoutSeconds** *(integer) --* 

        The timeout period for the code interpreter session in seconds.

        
      

      - **status** *(string) --* 

        The current status of the code interpreter session. Possible values include ACTIVE, STOPPING, and STOPPED.

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

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

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

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

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

  