Skip to content

iter_list_vector_buckets async

iter_list_vector_buckets(
    *,
    config_overrides: Optional[AsyncS3VectorsClientConfig] = None,
    max_results: Optional[ListVectorBucketsMaxResults] = None,
    next_token: Optional[ListVectorBucketsNextToken] = None,
    prefix: Optional[ListVectorBucketsPrefix] = None,
) -> AsyncIterator[VectorBucketSummary]
Source code in docs_src/capo_s3vectors/_services/async_s3_vectors.py
async def iter_list_vector_buckets(
    self,
    *,
    config_overrides: Optional[AsyncS3VectorsClientConfig] = None,
    max_results: Optional[
        "capo_s3vectors.types.list_vector_buckets_max_results.ListVectorBucketsMaxResults"
    ] = None,
    next_token: Optional[
        "capo_s3vectors.types.list_vector_buckets_next_token.ListVectorBucketsNextToken"
    ] = None,
    prefix: Optional[
        "capo_s3vectors.types.list_vector_buckets_prefix.ListVectorBucketsPrefix"
    ] = None,
) -> (
    "AsyncIterator[capo_s3vectors.types.vector_bucket_summary.VectorBucketSummary]"
):
    _token = next_token
    while True:
        _response = await self.list_vector_buckets(
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
            prefix=prefix,
        )
        _page = _resolve_path(_response, ("vector_buckets",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break