Skip to content

iter_get_snapshots async

iter_get_snapshots(
    index_id: IndexId,
    interval: Interval,
    metric_type: MetricType,
    *,
    config_overrides: Optional[AsynckendraClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[Integer] = None,
) -> AsyncIterator[GetSnapshotsResponse]
Source code in docs_src/capo_kendra/_services/async_kendra.py
async def iter_get_snapshots(
    self,
    index_id: "capo_kendra.types.index_id.IndexId",
    interval: "capo_kendra.types.interval.Interval",
    metric_type: "capo_kendra.types.metric_type.MetricType",
    *,
    config_overrides: Optional[AsynckendraClientConfig] = None,
    next_token: Optional["capo_kendra.types.next_token.NextToken"] = None,
    max_results: Optional["capo_kendra.types.integer.Integer"] = None,
) -> "AsyncIterator[capo_kendra.types.get_snapshots_response.GetSnapshotsResponse]":
    _token = next_token
    while True:
        _response = await self.get_snapshots(
            index_id,
            interval,
            metric_type,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break