Skip to content

iter_list_executors async

iter_list_executors(
    session_id: SessionId,
    *,
    config_overrides: Optional[AsyncAthenaClientConfig] = None,
    executor_state_filter: Optional[ExecutorState] = None,
    max_results: Optional[MaxListExecutorsCount] = None,
    next_token: Optional[SessionManagerToken] = None,
) -> AsyncIterator[ListExecutorsResponse]
Source code in docs_src/capo_athena/_services/async_athena.py
async def iter_list_executors(
    self,
    session_id: "capo_athena.types.session_id.SessionId",
    *,
    config_overrides: Optional[AsyncAthenaClientConfig] = None,
    executor_state_filter: Optional[
        "capo_athena.types.executor_state.ExecutorState"
    ] = None,
    max_results: Optional[
        "capo_athena.types.max_list_executors_count.MaxListExecutorsCount"
    ] = None,
    next_token: Optional[
        "capo_athena.types.session_manager_token.SessionManagerToken"
    ] = None,
) -> (
    "AsyncIterator[capo_athena.types.list_executors_response.ListExecutorsResponse]"
):
    _token = next_token
    while True:
        _response = await self.list_executors(
            session_id,
            config_overrides=config_overrides,
            executor_state_filter=executor_state_filter,
            max_results=max_results,
            next_token=_token,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break