Skip to content

Bedrock Agent Runtime  >  Operations  >  get_session

get_session

Operation

get_session async

get_session(input: GetSessionInput, plugins: list[Plugin] | None = None) -> GetSessionOutput

Retrieves details about a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

Parameters:

Name Type Description Default
input GetSessionInput

An instance of GetSessionInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetSessionOutput

An instance of GetSessionOutput.

Input

GetSessionInput dataclass

Dataclass for GetSessionInput structure.

Attributes

session_identifier class-attribute instance-attribute
session_identifier: str | None = None

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

Output

GetSessionOutput dataclass

Dataclass for GetSessionOutput structure.

Attributes

created_at instance-attribute
created_at: datetime

The timestamp for when the session was created.

encryption_key_arn class-attribute instance-attribute
encryption_key_arn: str | None = None

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.

last_updated_at instance-attribute
last_updated_at: datetime

The timestamp for when the session was last modified.

session_arn instance-attribute
session_arn: str

The Amazon Resource Name (ARN) of the session.

session_id instance-attribute
session_id: str

The unique identifier for the session in UUID format.

session_metadata class-attribute instance-attribute
session_metadata: dict[str, str] | None = None

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

session_status instance-attribute
session_status: SessionStatus

The current status of the session.