Skip to content

iter_list_executions async

iter_list_executions(
    *,
    config_overrides: Optional[AsyncSFNClientConfig] = None,
    state_machine_arn: Optional[Arn] = None,
    status_filter: Optional[ExecutionStatus] = None,
    max_results: Optional[PageSize] = None,
    next_token: Optional[ListExecutionsPageToken] = None,
    map_run_arn: Optional[LongArn] = None,
    redrive_filter: Optional[ExecutionRedriveFilter] = None,
) -> AsyncIterator[ExecutionListItem]
Source code in docs_src/capo_sfn/_services/async_sfn.py
async def iter_list_executions(
    self,
    *,
    config_overrides: Optional[AsyncSFNClientConfig] = None,
    state_machine_arn: Optional["capo_sfn.types.arn.Arn"] = None,
    status_filter: Optional[
        "capo_sfn.types.execution_status.ExecutionStatus"
    ] = None,
    max_results: Optional["capo_sfn.types.page_size.PageSize"] = None,
    next_token: Optional[
        "capo_sfn.types.list_executions_page_token.ListExecutionsPageToken"
    ] = None,
    map_run_arn: Optional["capo_sfn.types.long_arn.LongArn"] = None,
    redrive_filter: Optional[
        "capo_sfn.types.execution_redrive_filter.ExecutionRedriveFilter"
    ] = None,
) -> "AsyncIterator[capo_sfn.types.execution_list_item.ExecutionListItem]":
    _token = next_token
    while True:
        _response = await self.list_executions(
            config_overrides=config_overrides,
            state_machine_arn=state_machine_arn,
            status_filter=status_filter,
            max_results=max_results,
            next_token=_token,
            map_run_arn=map_run_arn,
            redrive_filter=redrive_filter,
        )
        _page = _resolve_path(_response, ("executions",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break