/AWS1/IF_S3V=>PUTVECTORS()
¶
About PutVectors¶
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Adds one or more vectors to a vector index. 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).
For more information about limits, see Limitations and restrictions in the Amazon S3 User Guide.
When inserting vector data into your vector index, you must provide the vector data as float32
(32-bit floating point) values. If you pass higher-precision values to an Amazon Web Services SDK, S3 Vectors converts the values to 32-bit floating point before storing them, and GetVectors
, ListVectors
, and QueryVectors
operations return the float32 values. Different Amazon Web Services SDKs may have different default numeric types, so ensure your vectors are properly formatted as float32
values regardless of which SDK you're using. For example, in Python, use numpy.float32
or explicitly cast your values.
- Permissions
-
You must have the
s3vectors:PutVectors
permission to use this operation.
Method Signature¶
IMPORTING¶
Required arguments:¶
it_vectors
TYPE /AWS1/CL_S3VPUTINPUTVECTOR=>TT_PUTVECTORSINPUTLIST
TT_PUTVECTORSINPUTLIST
¶
The vectors to add to a vector index. The number of vectors in a single request must not exceed the resource capacity, otherwise the request will be rejected with the error
ServiceUnavailableException
with the error message "Currently unable to handle the request".
Optional arguments:¶
iv_vectorbucketname
TYPE /AWS1/S3VVECTORBUCKETNAME
/AWS1/S3VVECTORBUCKETNAME
¶
The name of the vector bucket that contains the vector index.
iv_indexname
TYPE /AWS1/S3VINDEXNAME
/AWS1/S3VINDEXNAME
¶
The name of the vector index where you want to write vectors.
iv_indexarn
TYPE /AWS1/S3VINDEXARN
/AWS1/S3VINDEXARN
¶
The ARN of the vector index where you want to write vectors.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_s3vputvectorsoutput
/AWS1/CL_S3VPUTVECTORSOUTPUT
¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->/aws1/if_s3v~putvectors(
it_vectors = VALUE /aws1/cl_s3vputinputvector=>tt_putvectorsinputlist(
(
new /aws1/cl_s3vputinputvector(
io_data = new /aws1/cl_s3vvectordata(
it_float32 = VALUE /aws1/cl_s3vfloat32vectordat00=>tt_float32vectordata(
( new /aws1/cl_s3vfloat32vectordat00( |0.1| ) )
)
)
io_metadata = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
iv_key = |string|
)
)
)
iv_indexarn = |string|
iv_indexname = |string|
iv_vectorbucketname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.