Skip to content

iter_list_enabled_controls async

iter_list_enabled_controls(
    *,
    config_overrides: Optional[AsyncControlTowerClientConfig] = None,
    target_identifier: Optional[TargetIdentifier] = None,
    next_token: Optional[str] = None,
    max_results: Optional[MaxResults] = None,
    filter: Optional[EnabledControlFilter] = None,
    include_children: Optional[bool] = None,
) -> AsyncIterator[EnabledControlSummary]
Source code in docs_src/capo_controltower/_services/async_control_tower.py
async def iter_list_enabled_controls(
    self,
    *,
    config_overrides: Optional[AsyncControlTowerClientConfig] = None,
    target_identifier: Optional[
        "capo_controltower.types.target_identifier.TargetIdentifier"
    ] = None,
    next_token: Optional[str] = None,
    max_results: Optional["capo_controltower.types.max_results.MaxResults"] = None,
    filter: Optional[
        "capo_controltower.types.enabled_control_filter.EnabledControlFilter"
    ] = None,
    include_children: Optional[bool] = None,
) -> "AsyncIterator[capo_controltower.types.enabled_control_summary.EnabledControlSummary]":
    _token = next_token
    while True:
        _response = await self.list_enabled_controls(
            config_overrides=config_overrides,
            target_identifier=target_identifier,
            next_token=_token,
            max_results=max_results,
            filter=filter,
            include_children=include_children,
        )
        _page = _resolve_path(_response, ("enabled_controls",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break