Skip to content

iter_list_automated_reasoning_policies async

iter_list_automated_reasoning_policies(
    *,
    config_overrides: Optional[AsyncBedrockClientConfig] = None,
    policy_arn: Optional[AutomatedReasoningPolicyArn] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> AsyncIterator[AutomatedReasoningPolicySummary]
Source code in docs_src/capo_bedrock/_services/async_bedrock.py
async def iter_list_automated_reasoning_policies(
    self,
    *,
    config_overrides: Optional[AsyncBedrockClientConfig] = None,
    policy_arn: Optional[
        "capo_bedrock.types.automated_reasoning_policy_arn.AutomatedReasoningPolicyArn"
    ] = None,
    next_token: Optional[
        "capo_bedrock.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_bedrock.types.max_results.MaxResults"] = None,
) -> "AsyncIterator[capo_bedrock.types.automated_reasoning_policy_summary.AutomatedReasoningPolicySummary]":
    _token = next_token
    while True:
        _response = await self.list_automated_reasoning_policies(
            config_overrides=config_overrides,
            policy_arn=policy_arn,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("automated_reasoning_policy_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break