Skip to content

ListSessionsRequest

Source code in docs_src/capo_redshift_data/types/list_sessions_request.py
class ListSessionsRequest(TypedDict, closed=True):
    next_token: NotRequired["capo_redshift_data.types.string.String"]
    """<p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>"""
    max_results: "capo_redshift_data.types.list_statements_limit.ListStatementsLimit"
    """<p>The maximum number of sessions to return in the response. If more sessions exist than fit in one response, the operation returns <code>NextToken</code> to paginate the results.</p>"""
    session_id: NotRequired["capo_redshift_data.types.uuid.UUID"]
    """<p>The identifier of a specific session to return metadata for. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. When you provide <code>SessionId</code>, you can't specify <code>Status</code>, <code>ClusterIdentifier</code>, <code>WorkgroupName</code>, or <code>Database</code>.</p>"""
    status: NotRequired[
        "capo_redshift_data.types.session_status_string.SessionStatusString"
    ]
    """<p>The status of the sessions to list. If no status is specified, sessions with a status of <code>AVAILABLE</code> or <code>BUSY</code> are returned. Status values are defined as follows:</p> <ul> <li> <p>AVAILABLE – The session is open and ready to run a SQL statement.</p> </li> <li> <p>BUSY – The session is currently running a SQL statement.</p> </li> <li> <p>CLOSED – The session is closed and can no longer run SQL statements.</p> </li> </ul>"""
    role_level: NotRequired["bool"]
    """<p>Specifies whether to return all sessions created by the caller's IAM role, including sessions from previous IAM sessions. If false, only sessions created in the current IAM session are returned. The default is true.</p>"""
    cluster_identifier: NotRequired[
        "capo_redshift_data.types.cluster_identifier_string.ClusterIdentifierString"
    ]
    """<p>The cluster identifier. Only sessions on this cluster are returned. When providing <code>ClusterIdentifier</code>, then <code>WorkgroupName</code> can't be specified.</p>"""
    workgroup_name: NotRequired[
        "capo_redshift_data.types.workgroup_name_string.WorkgroupNameString"
    ]
    """<p>The serverless workgroup name or Amazon Resource Name (ARN). Only sessions on this workgroup are returned. When providing <code>WorkgroupName</code>, then <code>ClusterIdentifier</code> can't be specified.</p>"""
    database: NotRequired["capo_redshift_data.types.string.String"]
    """<p>The name of the database. Only sessions connected to this database are returned.</p>"""

cluster_identifier instance-attribute

cluster_identifier: NotRequired[ClusterIdentifierString]

The cluster identifier. Only sessions on this cluster are returned. When providing ClusterIdentifier, then WorkgroupName can't be specified.

database instance-attribute

database: NotRequired[String]

The name of the database. Only sessions connected to this database are returned.

max_results instance-attribute

max_results: ListStatementsLimit

The maximum number of sessions to return in the response. If more sessions exist than fit in one response, the operation returns NextToken to paginate the results.

next_token instance-attribute

next_token: NotRequired[String]

A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

role_level instance-attribute

role_level: NotRequired[bool]

Specifies whether to return all sessions created by the caller's IAM role, including sessions from previous IAM sessions. If false, only sessions created in the current IAM session are returned. The default is true.

session_id instance-attribute

session_id: NotRequired[UUID]

The identifier of a specific session to return metadata for. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. When you provide SessionId, you can't specify Status, ClusterIdentifier, WorkgroupName, or Database.

status instance-attribute

status: NotRequired[SessionStatusString]

The status of the sessions to list. If no status is specified, sessions with a status of AVAILABLE or BUSY are returned. Status values are defined as follows:

  • AVAILABLE – The session is open and ready to run a SQL statement.

  • BUSY – The session is currently running a SQL statement.

  • CLOSED – The session is closed and can no longer run SQL statements.

workgroup_name instance-attribute

workgroup_name: NotRequired[WorkgroupNameString]

The serverless workgroup name or Amazon Resource Name (ARN). Only sessions on this workgroup are returned. When providing WorkgroupName, then ClusterIdentifier can't be specified.