AgentsforBedrockRuntime / Client / end_session

end_session#

AgentsforBedrockRuntime.Client.end_session(**kwargs)#

Ends the session. After you end a session, you can still access its content but you can’t add to it. To delete the session and it’s content, you use the DeleteSession API operation. 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.end_session(
    sessionIdentifier='string'
)
Parameters:

sessionIdentifier (string) –

[REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{
    'sessionArn': 'string',
    'sessionId': 'string',
    'sessionStatus': 'ACTIVE'|'EXPIRED'|'ENDED'
}

Response Structure

  • (dict) –

    • sessionArn (string) –

      The Amazon Resource Name (ARN) of the session you ended.

    • sessionId (string) –

      The unique identifier of the session you ended.

    • sessionStatus (string) –

      The current status of the session you ended.

Exceptions