S3Vectors / Paginator / ListVectors
ListVectors¶
- class S3Vectors.Paginator.ListVectors¶
paginator = client.get_paginator('list_vectors')
- paginate(**kwargs)¶
Creates an iterator that will paginate through responses from
S3Vectors.Client.list_vectors().See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( vectorBucketName='string', indexName='string', indexArn='string', segmentCount=123, segmentIndex=123, returnData=True|False, returnMetadata=True|False, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
vectorBucketName (string) – The name of the vector bucket.
indexName (string) – The name of the vector index.
indexArn (string) – The Amazon resource Name (ARN) of the vector index.
segmentCount (integer) –
For a parallel
ListVectorsrequest,segmentCountrepresents the total number of vector segments into which theListVectorsoperation will be divided. The value ofsegmentCountcorresponds to the number of application workers that will perform the parallelListVectorsoperation. For example, if you want to use four application threads to list vectors in a vector index, specify asegmentCountvalue of 4.If you specify a
segmentCountvalue of 1, theListVectorsoperation will be sequential rather than parallel.If you specify
segmentCount, you must also specifysegmentIndex.segmentIndex (integer) –
For a parallel
ListVectorsrequest,segmentIndexis the index of the segment from which to list vectors in the current request. It identifies an individual segment to be listed by an application worker.Segment IDs are zero-based, so the first segment is always 0. For example, if you want to use four application threads to list vectors in a vector index, then the first thread specifies a
segmentIndexvalue of 0, the second thread specifies 1, and so on.The value of
segmentIndexmust be less than the value provided forsegmentCount.If you provide
segmentIndex, you must also providesegmentCount.returnData (boolean) – If true, the vector data of each vector will be included in the response. The default value is
false.returnMetadata (boolean) – If true, the metadata associated with each vector will be included in the response. The default value is
false.PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a
NextTokenwill be provided in the output that you can use to resume pagination.PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the
NextTokenfrom a previous response.
- Return type:
dict
- Returns:
Response Syntax
{ 'vectors': [ { 'key': 'string', 'data': { 'float32': [ ..., ] }, 'metadata': {...}|[...]|123|123.4|'string'|True|None }, ], 'NextToken': 'string' }
Response Structure
(dict) –
vectors (list) –
Vectors in the current segment.
(dict) –
Note
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
The attributes of a vector returned by the
ListVectorsoperation.key (string) –
The name of the vector.
data (dict) –
The vector data of the vector.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
float32. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
float32 (list) –
The vector data as 32-bit floating point numbers. The number of elements in this array must exactly match the dimension of the vector index where the operation is being performed.
(float) –
metadata (document) –
Metadata about the vector.
NextToken (string) –
A token to resume pagination.