Skip to content

list_indexes async

list_indexes(
    *,
    config_overrides: Optional[AsyncS3VectorsClientConfig] = None,
    vector_bucket_name: Optional[VectorBucketName] = None,
    vector_bucket_arn: Optional[VectorBucketArn] = None,
    max_results: Optional[ListIndexesMaxResults] = None,
    next_token: Optional[ListIndexesNextToken] = None,
    prefix: Optional[ListIndexesPrefix] = None,
) -> ListIndexesOutput

Returns a list of all the vector indexes within the specified vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).

Permissions

You must have the s3vectors:ListIndexes permission to use this operation.

Parameters:

Raises:

Source code in docs_src/capo_s3vectors/_services/async_s3_vectors.py
async def list_indexes(
    self,
    *,
    config_overrides: Optional[AsyncS3VectorsClientConfig] = None,
    vector_bucket_name: Optional[
        "capo_s3vectors.types.vector_bucket_name.VectorBucketName"
    ] = None,
    vector_bucket_arn: Optional[
        "capo_s3vectors.types.vector_bucket_arn.VectorBucketArn"
    ] = None,
    max_results: Optional[
        "capo_s3vectors.types.list_indexes_max_results.ListIndexesMaxResults"
    ] = None,
    next_token: Optional[
        "capo_s3vectors.types.list_indexes_next_token.ListIndexesNextToken"
    ] = None,
    prefix: Optional[
        "capo_s3vectors.types.list_indexes_prefix.ListIndexesPrefix"
    ] = None,
) -> "capo_s3vectors.types.list_indexes_output.ListIndexesOutput":
    """<p>Returns a list of all the vector indexes within the specified vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN). </p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3vectors:ListIndexes</code> permission to use this operation. </p> </dd> </dl>

    Args:
        vector_bucket_name: <p>The name of the vector bucket that contains the vector indexes. </p>
        vector_bucket_arn: <p>The ARN of the vector bucket that contains the vector indexes.</p>
        max_results: <p>The maximum number of items to be returned in the response. </p>
        next_token: <p>The previous pagination token. </p>
        prefix: <p>Limits the response to vector indexes that begin with the specified prefix.</p>

    Raises:
        capo_s3vectors.errors.access_denied_exception.AccessDeniedException: <p>Access denied.</p>
        capo_s3vectors.errors.internal_server_exception.InternalServerException: <p>The request failed due to an internal server error.</p>
        capo_s3vectors.errors.request_timeout_exception.RequestTimeoutException: <p>The request timed out. Retry your request.</p>
        capo_s3vectors.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was denied due to request throttling.</p>
        capo_s3vectors.errors.validation_exception.ValidationException: <p>The requested action isn't valid.</p>
        capo_s3vectors.errors.not_found_exception.NotFoundException: <p>The request was rejected because the specified resource can't be found.</p>
        capo_s3vectors.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.</p>
        capo_s3vectors.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_s3vectors.types.list_indexes_input.ListIndexesInput]",
    ) -> AsyncOperationResponse[
        "capo_s3vectors.types.list_indexes_output.ListIndexesOutput"
    ]:
        import capo_s3vectors._operations.s3_vectors.list_indexes

        (
            output,
            http_response,
        ) = await capo_s3vectors._operations.s3_vectors.list_indexes.async_list_indexes(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListIndexes")
    )
    input_: capo_s3vectors.types.list_indexes_input.ListIndexesInput = {}
    if vector_bucket_name is not None:
        input_["vector_bucket_name"] = vector_bucket_name
    if vector_bucket_arn is not None:
        input_["vector_bucket_arn"] = vector_bucket_arn
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if prefix is not None:
        input_["prefix"] = prefix

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output