AgentsforBedrockRuntime / Client / get_session

get_session#

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.

See also: AWS API Documentation

Request Syntax

response = client.get_session(
    sessionIdentifier='string'
)
Parameters:

sessionIdentifier (string) –

[REQUIRED]

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

Return type:

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.

    • 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