:doc:`AgentsforBedrockRuntime <../../bedrock-agent-runtime>` / Client / get_session

***********
get_session
***********



.. py:method:: AgentsforBedrockRuntime.Client.get_session(**kwargs)

  

  Retrieves details about a specific session. For more information about sessions, see `Store and retrieve conversation history and context with Amazon Bedrock sessions <https://docs.aws.amazon.com/bedrock/latest/userguide/sessions.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GetSession>`_  


  **Request Syntax**
  ::

    response = client.get_session(
        sessionIdentifier='string'
    )
    
  :type sessionIdentifier: string
  :param sessionIdentifier: **[REQUIRED]** 

    A unique identifier for the session to retrieve. You can specify either the session's ``sessionId`` or its Amazon Resource Name (ARN).

    

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

    
    ::

      {
          'createdAt': datetime(2015, 1, 1),
          'encryptionKeyArn': 'string',
          'lastUpdatedAt': datetime(2015, 1, 1),
          'sessionArn': 'string',
          'sessionId': 'string',
          'sessionMetadata': {
              'string': 'string'
          },
          'sessionStatus': 'ACTIVE'|'EXPIRED'|'ENDED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The timestamp for when the session was created.

        
      

      - **encryptionKeyArn** *(string) --* 

        The Amazon Resource Name (ARN) of the Key Management Service key used to encrypt the session data. For more information, see `Amazon Bedrock session encryption <https://docs.aws.amazon.com/bedrock/latest/userguide/session-encryption.html>`__.

        
      

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

        The timestamp for when the session was last modified.

        
      

      - **sessionArn** *(string) --* 

        The Amazon Resource Name (ARN) of the session.

        
      

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

        The unique identifier for the session in UUID format.

        
      

      - **sessionMetadata** *(dict) --* 

        A map of key-value pairs containing attributes persisted across the session.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
      

      - **sessionStatus** *(string) --* 

        The current status of the session.

        
  
  **Exceptions**
  
  *   :py:class:`AgentsforBedrockRuntime.Client.exceptions.ResourceNotFoundException`

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

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

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

  
  *   :py:class:`AgentsforBedrockRuntime.Client.exceptions.AccessDeniedException`

  