Skip to content

update_session

Operation

update_session

update_session(request: UpdateSessionInput | UpdateSessionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdateSessionInputDict]) -> UpdateSessionOutput

Updates the metadata or encryption settings of a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

Parameters:

Name Type Description Default
request UpdateSessionInput | UpdateSessionInputDict | 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[UpdateSessionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
UpdateSessionOutput

An instance of UpdateSessionOutput.

update_session async

update_session(request: UpdateSessionInput | UpdateSessionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdateSessionInputDict]) -> UpdateSessionOutput

Updates the metadata or encryption settings of a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

Parameters:

Name Type Description Default
request UpdateSessionInput | UpdateSessionInputDict | 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[UpdateSessionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
UpdateSessionOutput

An instance of UpdateSessionOutput.

Input

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

UpdateSessionInputDict

Bases: TypedDict

Dictionary form of UpdateSessionInput.

Attributes

session_identifier instance-attribute
session_identifier: Required[str]

The unique identifier of the session to modify. You can specify either the session's sessionId or its Amazon Resource Name (ARN).

session_metadata instance-attribute
session_metadata: Mapping[str, str] | None

A map of key-value pairs containing attributes to be persisted across the session. For example the user's ID, their language preference, and the type of device they are using.

UpdateSessionInput dataclass

Bases: _SerdeShape

Dataclass for UpdateSessionInput structure.

Attributes

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

The unique identifier of the session to modify. You can specify either the session's sessionId or its Amazon Resource Name (ARN).

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

A map of key-value pairs containing attributes to be persisted across the session. For example the user's ID, their language preference, and the type of device they are using.

Output

UpdateSessionOutput dataclass

Bases: _SerdeShape

Dataclass for UpdateSessionOutput structure.

Attributes

created_at instance-attribute
created_at: datetime

The timestamp for when the session was created.

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 that was updated.

session_id instance-attribute
session_id: str

The unique identifier of the session you updated.

session_status instance-attribute
session_status: str

The status of the session you updated.