Skip to content

iter_list_agent_goals

iter_list_agent_goals(
    profile_arn: AgentProfileArn,
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> Iterator[GoalSummary]
Source code in docs_src/capo_wellarchitected/_services/well_architected.py
def iter_list_agent_goals(
    self,
    profile_arn: "capo_wellarchitected.types.agent_profile_arn.AgentProfileArn",
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    max_results: Optional[
        "capo_wellarchitected.types.max_results.MaxResults"
    ] = None,
    next_token: Optional["capo_wellarchitected.types.next_token.NextToken"] = None,
) -> "Iterator[capo_wellarchitected.types.goal_summary.GoalSummary]":
    _token = next_token
    while True:
        _response = self.list_agent_goals(
            profile_arn,
            config_overrides=config_overrides,
            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