Skip to content

iter_list_children

iter_list_children(
    parent_id: ParentId,
    child_type: ChildType,
    *,
    config_overrides: Optional[OrganizationsClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> Iterator[ListChildrenResponse]
Source code in docs_src/capo_organizations/_services/organizations.py
def iter_list_children(
    self,
    parent_id: "capo_organizations.types.parent_id.ParentId",
    child_type: "capo_organizations.types.child_type.ChildType",
    *,
    config_overrides: Optional[OrganizationsClientConfig] = None,
    next_token: Optional["capo_organizations.types.next_token.NextToken"] = None,
    max_results: Optional["capo_organizations.types.max_results.MaxResults"] = None,
) -> (
    "Iterator[capo_organizations.types.list_children_response.ListChildrenResponse]"
):
    _token = next_token
    while True:
        _response = self.list_children(
            parent_id,
            child_type,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break