AgentsforBedrockRuntime / Client / update_session

update_session#

AgentsforBedrockRuntime.Client.update_session(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.update_session(
    sessionIdentifier='string',
    sessionMetadata={
        'string': 'string'
    }
)
Parameters:
  • sessionIdentifier (string) –

    [REQUIRED]

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

  • sessionMetadata (dict) –

    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.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • createdAt (datetime) –

      The timestamp for when the session was created.

    • lastUpdatedAt (datetime) –

      The timestamp for when the session was last modified.

    • sessionArn (string) –

      The Amazon Resource Name (ARN) of the session that was updated.

    • sessionId (string) –

      The unique identifier of the session you updated.

    • sessionStatus (string) –

      The status of the session you updated.

Exceptions