AgentsforBedrockRuntime / Client / list_sessions

list_sessions#

AgentsforBedrockRuntime.Client.list_sessions(**kwargs)#

Lists all sessions in your Amazon Web Services account. 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.list_sessions(
    maxResults=123,
    nextToken='string'
)
Parameters:
  • maxResults (integer) – The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

  • nextToken (string) – If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • nextToken (string) –

      If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

    • sessionSummaries (list) –

      A list of summaries for each session in your Amazon Web Services account.

      • (dict) –

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

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

        • sessionId (string) –

          The unique identifier for the session.

        • sessionStatus (string) –

          The current status of the session.

Exceptions