Skip to content

iter_describe_snapshots

iter_describe_snapshots(
    *,
    config_overrides: Optional[MemoryDBClientConfig] = None,
    cluster_name: Optional[String] = None,
    snapshot_name: Optional[String] = None,
    source: Optional[String] = None,
    next_token: Optional[String] = None,
    max_results: Optional[IntegerOptional] = None,
    show_detail: Optional[BooleanOptional] = None,
) -> Iterator[Snapshot]
Source code in docs_src/capo_memorydb/_services/memory_db.py
def iter_describe_snapshots(
    self,
    *,
    config_overrides: Optional[MemoryDBClientConfig] = None,
    cluster_name: Optional["capo_memorydb.types.string.String"] = None,
    snapshot_name: Optional["capo_memorydb.types.string.String"] = None,
    source: Optional["capo_memorydb.types.string.String"] = None,
    next_token: Optional["capo_memorydb.types.string.String"] = None,
    max_results: Optional[
        "capo_memorydb.types.integer_optional.IntegerOptional"
    ] = None,
    show_detail: Optional[
        "capo_memorydb.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "Iterator[capo_memorydb.types.snapshot.Snapshot]":
    _token = next_token
    while True:
        _response = self.describe_snapshots(
            config_overrides=config_overrides,
            cluster_name=cluster_name,
            snapshot_name=snapshot_name,
            source=source,
            next_token=_token,
            max_results=max_results,
            show_detail=show_detail,
        )
        _page = _resolve_path(_response, ("snapshots",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break