def iter_list_recommendations(
self,
*,
config_overrides: Optional[CostOptimizationHubClientConfig] = None,
filter: Optional["capo_cost_optimization_hub.types.filter.Filter"] = None,
order_by: Optional["capo_cost_optimization_hub.types.order_by.OrderBy"] = None,
include_all_recommendations: Optional[bool] = None,
max_results: Optional[
"capo_cost_optimization_hub.types.max_results.MaxResults"
] = None,
next_token: Optional[str] = None,
) -> "Iterator[capo_cost_optimization_hub.types.recommendation.Recommendation]":
_token = next_token
while True:
_response = self.list_recommendations(
config_overrides=config_overrides,
filter=filter,
order_by=order_by,
include_all_recommendations=include_all_recommendations,
max_results=max_results,
next_token=_token,
)
_page = _resolve_path(_response, ("items",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break