list_sessions
async
¶
list_sessions(
work_group: WorkGroupName,
*,
config_overrides: Optional[AsyncAthenaClientConfig] = None,
state_filter: Optional[SessionState] = None,
max_results: Optional[MaxSessionsCount] = None,
next_token: Optional[SessionManagerToken] = None,
) -> ListSessionsResponse
Lists the sessions in a workgroup that are in an active state like CREATING, CREATED, IDLE, or BUSY. Newer sessions are listed first; older sessions are listed later.
Parameters:
-
work_group(WorkGroupName) –The workgroup to which the session belongs.
-
state_filter(Optional[SessionState], default:None) –A filter for a specific session state. 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. -
max_results(Optional[MaxSessionsCount], default:None) –The maximum number of sessions to return.
-
next_token(Optional[SessionManagerToken], default:None) –A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextTokenfrom the response object of the previous page call.
Raises:
-
InternalServerException–Indicates a platform issue, which may be due to a transient condition or outage.
-
InvalidRequestException–Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.
-
ResourceNotFoundException–A resource, such as a workgroup, was not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_athena/_services/async_athena.py
3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 | |