async def iter_list_investigation_records(
self,
detector_id: "capo_guardduty.types.detector_id.DetectorId",
*,
config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
investigation_id: Optional[
"capo_guardduty.types.investigation_id.InvestigationId"
] = None,
record_types: Optional["capo_guardduty.types.record_types.RecordTypes"] = None,
max_results: Optional["capo_guardduty.types.max_results.MaxResults"] = None,
next_token: Optional["capo_guardduty.types.next_token.NextToken"] = None,
) -> "AsyncIterator[capo_guardduty.types.investigation_record.InvestigationRecord]":
_token = next_token
while True:
_response = await self.list_investigation_records(
detector_id,
config_overrides=config_overrides,
investigation_id=investigation_id,
record_types=record_types,
max_results=max_results,
next_token=_token,
)
_page = _resolve_path(_response, ("records",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break