View a markdown version of this page

SessionData - Amazon Redshift Data API

SessionData

Contains the metadata for a session returned by ListSessions, including its status, compute target, database connection, and lifecycle timestamps.

Contents

Note

In the following list, the required parameters are described first.

CreatedAt

The date and time (UTC) when the session was created.

Type: Timestamp

Required: Yes

SessionId

The session identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.

Type: String

Pattern: [a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}(:\d{0,2})?

Required: Yes

Status

The status of the session. 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.

Type: String

Valid Values: AVAILABLE | BUSY | CLOSED

Required: Yes

ClusterIdentifier

The cluster identifier. This element is not returned when connecting to a serverless workgroup.

Type: String

Required: No

CurrentStatementId

The identifier of the SQL statement currently running in the session. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This element is returned only when the session status is BUSY.

Type: String

Pattern: [a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}(:\d{0,2})?

Required: No

Database

The name of the database that the session is connected to.

Type: String

Required: No

DbUser

The database user name.

Type: String

Required: No

SessionAliveSeconds

The number of seconds that the session is kept alive after a query finishes.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 86400.

Required: No

SessionTtl

The date and time (UTC) when the session is set to expire and be closed.

Type: Timestamp

Required: No

UpdatedAt

The date and time (UTC) that the session metadata was last updated. An example is the time the status last changed.

Type: Timestamp

Required: No

WorkgroupName

The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: ([a-z0-9-]{3,63}|arn:(aws(-[a-z]+)*):redshift-serverless:([a-z]{2}(-gov|(-iso[a-z]?))?|eusc-[a-z]+)-[a-z]+-\d{1}:\d{12}:workgroup/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: