Skip to content

iter_list_principal_things_v2

iter_list_principal_things_v2(
    principal: Principal,
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[RegistryMaxResults] = None,
    thing_principal_type: Optional[ThingPrincipalType] = None,
) -> Iterator[PrincipalThingObject]
Source code in docs_src/capo_iot/_services/io_t.py
def iter_list_principal_things_v2(
    self,
    principal: "capo_iot.types.principal.Principal",
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    next_token: Optional["capo_iot.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_iot.types.registry_max_results.RegistryMaxResults"
    ] = None,
    thing_principal_type: Optional[
        "capo_iot.types.thing_principal_type.ThingPrincipalType"
    ] = None,
) -> "Iterator[capo_iot.types.principal_thing_object.PrincipalThingObject]":
    _token = next_token
    while True:
        _response = self.list_principal_things_v2(
            principal,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
            thing_principal_type=thing_principal_type,
        )
        _page = _resolve_path(_response, ("principal_thing_objects",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break