get_session
(**kwargs)¶Gets the full details of a previously created session, including the session status and configuration.
See also: AWS API Documentation
Request Syntax
response = client.get_session(
SessionId='string'
)
[REQUIRED]
The session ID.
{
'SessionId': 'string',
'Description': 'string',
'WorkGroup': 'string',
'EngineVersion': 'string',
'EngineConfiguration': {
'CoordinatorDpuSize': 123,
'MaxConcurrentDpus': 123,
'DefaultExecutorDpuSize': 123,
'AdditionalConfigs': {
'string': 'string'
}
},
'NotebookVersion': 'string',
'SessionConfiguration': {
'ExecutionRole': 'string',
'WorkingDirectory': 'string',
'IdleTimeoutSeconds': 123,
'EncryptionConfiguration': {
'EncryptionOption': 'SSE_S3'|'SSE_KMS'|'CSE_KMS',
'KmsKey': 'string'
}
},
'Status': {
'StartDateTime': datetime(2015, 1, 1),
'LastModifiedDateTime': datetime(2015, 1, 1),
'EndDateTime': datetime(2015, 1, 1),
'IdleSinceDateTime': datetime(2015, 1, 1),
'State': 'CREATING'|'CREATED'|'IDLE'|'BUSY'|'TERMINATING'|'TERMINATED'|'DEGRADED'|'FAILED',
'StateChangeReason': 'string'
},
'Statistics': {
'DpuExecutionInMillis': 123
}
}
Response Structure
The session ID.
The session description.
The workgroup to which the session belongs.
The engine version used by the session (for example, PySpark engine version 3
). You can get a list of engine versions by calling ListEngineVersions.
Contains engine configuration information like DPU usage.
The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing work and manages other executors in a notebook session.
The maximum number of DPUs that can run concurrently.
The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook session can request from Athena.
Contains additional notebook engine MAP<string, string>
parameter mappings in the form of key-value pairs. To specify an Amazon S3 URI that the Jupyter server will download and serve, specify a value for the StartSessionRequest$NotebookVersion field, and then add a key named NotebookFileURI
to AdditionalConfigs
that has value of the Amazon S3 URI.
The notebook version.
Contains the workgroup configuration information used by the session.
The ARN of the execution role used for the session.
The Amazon S3 location that stores information for the notebook.
The idle timeout in seconds for the session.
If query results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS
or CSE_KMS
) and key information.
Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys ( SSE_S3
), server-side encryption with KMS-managed keys ( SSE_KMS
), or client-side encryption with KMS-managed keys ( CSE_KMS
) is used.
If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
For SSE_KMS
and CSE_KMS
, this is the KMS key ARN or ID.
Contains information about the status of the session.
The date and time that the session started.
The most recent date and time that the session was modified.
The date and time that the session ended.
The date and time starting at which the session became idle. Can be empty if the session is not currently idle.
The state of the session. A description of each state follows.
CREATING
- The session is being started, including acquiring resources.
CREATED
- The session has been started.
IDLE
- The session is able to accept a calculation.
BUSY
- The session is processing another task and is unable to accept a calculation.
TERMINATING
- The session is in the process of shutting down.
TERMINATED
- The session and its resources are no longer running.
DEGRADED
- The session has no healthy coordinators.
FAILED
- Due to a failure, the session and its resources are no longer running.
The reason for the session state change (for example, canceled because the session was terminated).
Contains the DPU execution time.
The data processing unit execution time for a session in milliseconds.
Exceptions
Athena.Client.exceptions.InternalServerException
Athena.Client.exceptions.InvalidRequestException
Athena.Client.exceptions.ResourceNotFoundException