Skip to content

iter_list_insights async

iter_list_insights(
    cluster_name: String,
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
    filter: Optional[InsightsFilter] = None,
    max_results: Optional[ListInsightsMaxResults] = None,
    next_token: Optional[String] = None,
) -> AsyncIterator[InsightSummary]
Source code in docs_src/capo_eks/_services/async_eks.py
async def iter_list_insights(
    self,
    cluster_name: "capo_eks.types.string.String",
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
    filter: Optional["capo_eks.types.insights_filter.InsightsFilter"] = None,
    max_results: Optional[
        "capo_eks.types.list_insights_max_results.ListInsightsMaxResults"
    ] = None,
    next_token: Optional["capo_eks.types.string.String"] = None,
) -> "AsyncIterator[capo_eks.types.insight_summary.InsightSummary]":
    _token = next_token
    while True:
        _response = await self.list_insights(
            cluster_name,
            config_overrides=config_overrides,
            filter=filter,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("insights",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break