Skip to content

iter_list_recommendations async

iter_list_recommendations(
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
    status_filter: Optional[RecommendationStatus] = None,
) -> AsyncIterator[RecommendationSummary]
Source code in docs_src/capo_bedrock_agentcore/_services/async_bedrock_agent_core.py
async def iter_list_recommendations(
    self,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[
        "capo_bedrock_agentcore.types.next_token.NextToken"
    ] = None,
    status_filter: Optional[
        "capo_bedrock_agentcore.types.recommendation_status.RecommendationStatus"
    ] = None,
) -> "AsyncIterator[capo_bedrock_agentcore.types.recommendation_summary.RecommendationSummary]":
    _token = next_token
    while True:
        _response = await self.list_recommendations(
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
            status_filter=status_filter,
        )
        _page = _resolve_path(_response, ("recommendation_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break