S3Vectors / Client / get_vectors

get_vectors

S3Vectors.Client.get_vectors(**kwargs)

Note

Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.

Returns vector attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).

Permissions

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

See also: AWS API Documentation

Request Syntax

response = client.get_vectors(
    vectorBucketName='string',
    indexName='string',
    indexArn='string',
    keys=[
        'string',
    ],
    returnData=True|False,
    returnMetadata=True|False
)
Parameters:
  • vectorBucketName (string) – The name of the vector bucket that contains the vector index.

  • indexName (string) – The name of the vector index.

  • indexArn (string) – The ARN of the vector index.

  • keys (list) –

    [REQUIRED]

    The names of the vectors you want to return attributes for.

    • (string) –

  • returnData (boolean) – Indicates whether to include the vector data in the response. The default value is false.

  • returnMetadata (boolean) – Indicates whether to include metadata in the response. The default value is false.

Return type:

dict

Returns:

Response Syntax

{
    'vectors': [
        {
            'key': 'string',
            'data': {
                'float32': [
                    ...,
                ]
            },
            'metadata': {...}|[...]|123|123.4|'string'|True|None
        },
    ]
}

Response Structure

  • (dict) –

    • vectors (list) –

      The attributes of the vectors.

      • (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 GetVectors operation.

        • 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 set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is 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.

Exceptions