Skip to content

iter_get_insight_events async

iter_get_insight_events(
    insight_id: InsightId,
    *,
    config_overrides: Optional[AsyncXRayClientConfig] = None,
    max_results: Optional[GetInsightEventsMaxResults] = None,
    next_token: Optional[Token] = None,
) -> AsyncIterator[GetInsightEventsResult]
Source code in docs_src/capo_xray/_services/async_x_ray.py
async def iter_get_insight_events(
    self,
    insight_id: "capo_xray.types.insight_id.InsightId",
    *,
    config_overrides: Optional[AsyncXRayClientConfig] = None,
    max_results: Optional[
        "capo_xray.types.get_insight_events_max_results.GetInsightEventsMaxResults"
    ] = None,
    next_token: Optional["capo_xray.types.token.Token"] = None,
) -> "AsyncIterator[capo_xray.types.get_insight_events_result.GetInsightEventsResult]":
    _token = next_token
    while True:
        _response = await self.get_insight_events(
            insight_id,
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break