AthenaClient.start_session
rboto-athena==0.4.0 · Service index · Types
Model summary (excerpt): Creates a session for running calculations within a workgroup. The session is ready when it reaches an IDLE state.
Install and imports
from rboto import AthenaClient
from collections.abc import Sequence
from rboto_athena.types import (
EngineConfiguration,
MonitoringConfiguration,
StartSessionOutput,
Tag,
)
Signature
async def start_session(
*,
work_group: str,
engine_configuration: EngineConfiguration,
description: str | None = None,
execution_role: str | None = None,
monitoring_configuration: MonitoringConfiguration | None = None,
notebook_version: str | None = None,
session_idle_timeout_in_minutes: int | None = None,
client_request_token: str | None = None,
tags: Sequence[Tag] | None = None,
copy_work_group_tags: bool | None = None,
) -> StartSessionOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
work_group |
Yes | The workgroup to which the session belongs. |
engine_configuration |
Yes | Contains engine data processing unit (DPU) configuration settings and parameter mappings. |
description |
No | The session description. |
execution_role |
No | The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups. |
monitoring_configuration |
No | Contains the configuration settings for managed log persistence, delivering logs to Amazon S3 buckets, Amazon CloudWatch log groups etc. |
notebook_version |
No | The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is Athena notebook version 1 . If you specify a value for NotebookVersion , you must also specify a value for NotebookId . See EngineConfiguration$AdditionalConfigs . |
session_idle_timeout_in_minutes |
No | The idle timeout in minutes for the session. |
client_request_token |
No | A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another StartSessionRequest is received, the same response is returned and another session is not created. If a parameter has changed, an error is returned. This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java)... |
tags |
No | A list of comma separated tags to add to the session that is created. |
copy_work_group_tags |
No | Copies the tags from the Workgroup to the Session when. |
Output
StartSessionOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
session_id |
str | None |
Always present | — |
state |
SessionStateOutput | None |
Always present | SessionStateOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
EngineConfiguration, MonitoringConfiguration, StartSessionOutput, Tag
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_athena.exceptions:
InternalServerError, InvalidRequestError, ResourceNotFoundError, SessionAlreadyExistsError, TooManyRequestsError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.