Skip to content

iter_list_investigation_groups async

iter_list_investigation_groups(
    *,
    config_overrides: Optional[AsyncAIOpsClientConfig] = None,
    next_token: Optional[SensitiveStringWithLengthLimits] = None,
    max_results: Optional[int] = None,
) -> AsyncIterator[ListInvestigationGroupsModel]
Source code in docs_src/capo_aiops/_services/async_ai_ops.py
async def iter_list_investigation_groups(
    self,
    *,
    config_overrides: Optional[AsyncAIOpsClientConfig] = None,
    next_token: Optional[
        "capo_aiops.types.sensitive_string_with_length_limits.SensitiveStringWithLengthLimits"
    ] = None,
    max_results: Optional[int] = None,
) -> "AsyncIterator[capo_aiops.types.list_investigation_groups_model.ListInvestigationGroupsModel]":
    _token = next_token
    while True:
        _response = await self.list_investigation_groups(
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("investigation_groups",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break