Skip to content

iter_get_finding_history

iter_get_finding_history(
    *,
    config_overrides: Optional[SecurityHubClientConfig] = None,
    finding_identifier: Optional[AwsSecurityFindingIdentifier] = None,
    start_time: Optional[Timestamp] = None,
    end_time: Optional[Timestamp] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> Iterator[FindingHistoryRecord]
Source code in docs_src/capo_securityhub/_services/security_hub.py
def iter_get_finding_history(
    self,
    *,
    config_overrides: Optional[SecurityHubClientConfig] = None,
    finding_identifier: Optional[
        "capo_securityhub.types.aws_security_finding_identifier.AwsSecurityFindingIdentifier"
    ] = None,
    start_time: Optional["capo_securityhub.types.timestamp.Timestamp"] = None,
    end_time: Optional["capo_securityhub.types.timestamp.Timestamp"] = None,
    next_token: Optional["capo_securityhub.types.next_token.NextToken"] = None,
    max_results: Optional["capo_securityhub.types.max_results.MaxResults"] = None,
) -> "Iterator[capo_securityhub.types.finding_history_record.FindingHistoryRecord]":
    _token = next_token
    while True:
        _response = self.get_finding_history(
            config_overrides=config_overrides,
            finding_identifier=finding_identifier,
            start_time=start_time,
            end_time=end_time,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("records",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break