putVectors method
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.
- Permissions
-
You must have the
s3vectors:PutVectorspermission to use this operation.
May throw AccessDeniedException.
May throw KmsDisabledException.
May throw KmsInvalidKeyUsageException.
May throw KmsInvalidStateException.
May throw KmsNotFoundException.
May throw NotFoundException.
May throw ServiceQuotaExceededException.
May throw ServiceUnavailableException.
Parameter vectors :
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".
Parameter indexArn :
The ARN of the vector index where you want to write vectors.
Parameter indexName :
The name of the vector index where you want to write vectors.
Parameter vectorBucketName :
The name of the vector bucket that contains the vector index.
Implementation
Future<void> putVectors({
required List<PutInputVector> vectors,
String? indexArn,
String? indexName,
String? vectorBucketName,
}) async {
final $payload = <String, dynamic>{
'vectors': vectors,
if (indexArn != null) 'indexArn': indexArn,
if (indexName != null) 'indexName': indexName,
if (vectorBucketName != null) 'vectorBucketName': vectorBucketName,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/PutVectors',
exceptionFnMap: _exceptionFns,
);
}