Skip to content

get_session

Operation

get_session

get_session(request: GetSessionInput | GetSessionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetSessionInputDict]) -> 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
request GetSessionInput | GetSessionInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[GetSessionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetSessionOutput

An instance of GetSessionOutput.

get_session async

get_session(request: GetSessionInput | GetSessionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetSessionInputDict]) -> 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
request GetSessionInput | GetSessionInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[GetSessionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetSessionOutput

An instance of GetSessionOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

GetSessionInputDict

Bases: TypedDict

Dictionary form of GetSessionInput.

Attributes

session_identifier instance-attribute
session_identifier: Required[str]

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

GetSessionInput dataclass

Bases: _SerdeShape

Dataclass for GetSessionInput structure.

Attributes

session_identifier class-attribute instance-attribute
session_identifier: str | 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

Bases: _SerdeShape

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 = ...

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.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

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 = ...

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

session_status instance-attribute
session_status: str

The current status of the session.