Skip to content

iter_get_insight_events

iter_get_insight_events(
    insight_id: InsightId,
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    max_results: Optional[GetInsightEventsMaxResults] = None,
    next_token: Optional[Token] = None,
) -> Iterator[GetInsightEventsResult]
Source code in docs_src/capo_xray/_services/x_ray.py
def iter_get_insight_events(
    self,
    insight_id: "capo_xray.types.insight_id.InsightId",
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    max_results: Optional[
        "capo_xray.types.get_insight_events_max_results.GetInsightEventsMaxResults"
    ] = None,
    next_token: Optional["capo_xray.types.token.Token"] = None,
) -> "Iterator[capo_xray.types.get_insight_events_result.GetInsightEventsResult]":
    _token = next_token
    while True:
        _response = 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