async def iter_list_thing_principals_v2(
self,
thing_name: "capo_iot.types.thing_name.ThingName",
*,
config_overrides: Optional[AsyncIoTClientConfig] = 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,
) -> "AsyncIterator[capo_iot.types.thing_principal_object.ThingPrincipalObject]":
_token = next_token
while True:
_response = await self.list_thing_principals_v2(
thing_name,
config_overrides=config_overrides,
next_token=_token,
max_results=max_results,
thing_principal_type=thing_principal_type,
)
_page = _resolve_path(_response, ("thing_principal_objects",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break