Skip to content

iter_get_canary_runs async

iter_get_canary_runs(
    name: CanaryName,
    *,
    config_overrides: Optional[AsyncsyntheticsClientConfig] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[MaxSize100] = None,
    dry_run_id: Optional[UUID] = None,
    run_type: Optional[RunType] = None,
) -> AsyncIterator[GetCanaryRunsResponse]
Source code in docs_src/capo_synthetics/_services/async_synthetics.py
async def iter_get_canary_runs(
    self,
    name: "capo_synthetics.types.canary_name.CanaryName",
    *,
    config_overrides: Optional[AsyncsyntheticsClientConfig] = None,
    next_token: Optional["capo_synthetics.types.token.Token"] = None,
    max_results: Optional["capo_synthetics.types.max_size100.MaxSize100"] = None,
    dry_run_id: Optional["capo_synthetics.types.uuid.UUID"] = None,
    run_type: Optional["capo_synthetics.types.run_type.RunType"] = None,
) -> "AsyncIterator[capo_synthetics.types.get_canary_runs_response.GetCanaryRunsResponse]":
    _token = next_token
    while True:
        _response = await self.get_canary_runs(
            name,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
            dry_run_id=dry_run_id,
            run_type=run_type,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break