Skip to content

iter_list_plan_executions async

iter_list_plan_executions(
    plan_arn: PlanArn,
    *,
    config_overrides: Optional[AsyncARCRegionswitchClientConfig] = None,
    max_results: Optional[ListExecutionsMaxResults] = None,
    next_token: Optional[str] = None,
    state: Optional[ExecutionState] = None,
) -> AsyncIterator[AbbreviatedExecution]
Source code in docs_src/capo_arc_region_switch/_services/async_arc_regionswitch.py
async def iter_list_plan_executions(
    self,
    plan_arn: "capo_arc_region_switch.types.plan_arn.PlanArn",
    *,
    config_overrides: Optional[AsyncARCRegionswitchClientConfig] = None,
    max_results: Optional[
        "capo_arc_region_switch.types.list_executions_max_results.ListExecutionsMaxResults"
    ] = None,
    next_token: Optional[str] = None,
    state: Optional[
        "capo_arc_region_switch.types.execution_state.ExecutionState"
    ] = None,
) -> "AsyncIterator[capo_arc_region_switch.types.abbreviated_execution.AbbreviatedExecution]":
    _token = next_token
    while True:
        _response = await self.list_plan_executions(
            plan_arn,
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
            state=state,
        )
        _page = _resolve_path(_response, ("items",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break