Class SessionData
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<SessionData.Builder,SessionData>
Contains the metadata for a session returned by ListSessions, including its status, compute target,
database connection, and lifecycle timestamps.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SessionData.Builderbuilder()final StringThe cluster identifier.final InstantThe date and time (UTC) when the session was created.final StringThe identifier of the SQL statement currently running in the session.final Stringdatabase()The name of the database that the session is connected to.final StringdbUser()The database user name.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()static Class<? extends SessionData.Builder> final IntegerThe number of seconds that the session is kept alive after a query finishes.final StringThe session identifier.final InstantThe date and time (UTC) when the session is set to expire and be closed.final SessionStatusStringstatus()The status of the session.final StringThe status of the session.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final InstantThe date and time (UTC) that the session metadata was last updated.final StringThe serverless workgroup name or Amazon Resource Name (ARN).Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
sessionId
The session identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
- Returns:
- The session identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
-
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.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnSessionStatusString.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- 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.
-
- See Also:
-
-
statusAsString
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.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnSessionStatusString.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- 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.
-
- See Also:
-
-
createdAt
The date and time (UTC) when the session was created.
- Returns:
- The date and time (UTC) when the session was created.
-
updatedAt
The date and time (UTC) that the session metadata was last updated. An example is the time the status last changed.
- Returns:
- The date and time (UTC) that the session metadata was last updated. An example is the time the status last changed.
-
database
The name of the database that the session is connected to.
- Returns:
- The name of the database that the session is connected to.
-
dbUser
-
clusterIdentifier
The cluster identifier. This element is not returned when connecting to a serverless workgroup.
- Returns:
- The cluster identifier. This element is not returned when connecting to a serverless workgroup.
-
workgroupName
The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster.
- Returns:
- The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster.
-
sessionAliveSeconds
The number of seconds that the session is kept alive after a query finishes.
- Returns:
- The number of seconds that the session is kept alive after a query finishes.
-
sessionTtl
The date and time (UTC) when the session is set to expire and be closed.
- Returns:
- The date and time (UTC) when the session is set to expire and be closed.
-
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.- Returns:
- 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.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<SessionData.Builder,SessionData> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-