Skip to content

iter_list_recommendations

iter_list_recommendations(
    insight_id: InsightId,
    *,
    config_overrides: Optional[DevOpsGuruClientConfig] = None,
    next_token: Optional[UuidNextToken] = None,
    locale: Optional[Locale] = None,
    account_id: Optional[AwsAccountId] = None,
) -> Iterator[Recommendation]
Source code in docs_src/capo_devops_guru/_services/dev_ops_guru.py
def iter_list_recommendations(
    self,
    insight_id: "capo_devops_guru.types.insight_id.InsightId",
    *,
    config_overrides: Optional[DevOpsGuruClientConfig] = None,
    next_token: Optional[
        "capo_devops_guru.types.uuid_next_token.UuidNextToken"
    ] = None,
    locale: Optional["capo_devops_guru.types.locale.Locale"] = None,
    account_id: Optional[
        "capo_devops_guru.types.aws_account_id.AwsAccountId"
    ] = None,
) -> "Iterator[capo_devops_guru.types.recommendation.Recommendation]":
    _token = next_token
    while True:
        _response = self.list_recommendations(
            insight_id,
            config_overrides=config_overrides,
            next_token=_token,
            locale=locale,
            account_id=account_id,
        )
        _page = _resolve_path(_response, ("recommendations",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break