Class: Aws::S3Vectors::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::S3Vectors::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb
Overview
An API client for S3Vectors. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::S3Vectors::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#create_index(params = {}) ⇒ Struct
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#create_vector_bucket(params = {}) ⇒ Struct
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#delete_index(params = {}) ⇒ Struct
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#delete_vector_bucket(params = {}) ⇒ Struct
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#delete_vector_bucket_policy(params = {}) ⇒ Struct
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#delete_vectors(params = {}) ⇒ Struct
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#get_index(params = {}) ⇒ Types::GetIndexOutput
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#get_vector_bucket(params = {}) ⇒ Types::GetVectorBucketOutput
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#get_vector_bucket_policy(params = {}) ⇒ Types::GetVectorBucketPolicyOutput
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#get_vectors(params = {}) ⇒ Types::GetVectorsOutput
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#list_indexes(params = {}) ⇒ Types::ListIndexesOutput
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#list_vector_buckets(params = {}) ⇒ Types::ListVectorBucketsOutput
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#list_vectors(params = {}) ⇒ Types::ListVectorsOutput
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#put_vector_bucket_policy(params = {}) ⇒ Struct
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#put_vectors(params = {}) ⇒ Struct
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change. -
#query_vectors(params = {}) ⇒ Types::QueryVectorsOutput
Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
466 467 468 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 466 def initialize(*args) super end |
Instance Method Details
#create_index(params = {}) ⇒ Struct
Creates a vector index within a vector bucket. To specify the vector bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).
Permissions
: You must have the s3vectors:CreateIndex
permission to use this
operation.
529 530 531 532 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 529 def create_index(params = {}, = {}) req = build_request(:create_index, params) req.send_request() end |
#create_vector_bucket(params = {}) ⇒ Struct
Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.
Permissions
: You must have the s3vectors:CreateVectorBucket
permission to use
this operation.
573 574 575 576 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 573 def create_vector_bucket(params = {}, = {}) req = build_request(:create_vector_bucket, params) req.send_request() end |
#delete_index(params = {}) ⇒ Struct
Deletes a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN).
Permissions
: You must have the s3vectors:DeleteIndex
permission to use this
operation.
616 617 618 619 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 616 def delete_index(params = {}, = {}) req = build_request(:delete_index, params) req.send_request() end |
#delete_vector_bucket(params = {}) ⇒ Struct
Deletes a vector bucket. All vector indexes in the vector bucket must be deleted before the vector bucket can be deleted. To perform this operation, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).
Permissions
: You must have the s3vectors:DeleteVectorBucket
permission to use
this operation.
656 657 658 659 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 656 def delete_vector_bucket(params = {}, = {}) req = build_request(:delete_vector_bucket, params) req.send_request() end |
#delete_vector_bucket_policy(params = {}) ⇒ Struct
Deletes a vector bucket policy. 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:DeleteVectorBucketPolicy
permission to
use this operation.
695 696 697 698 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 695 def delete_vector_bucket_policy(params = {}, = {}) req = build_request(:delete_vector_bucket_policy, params) req.send_request() end |
#delete_vectors(params = {}) ⇒ Struct
Deletes one or more vectors in a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN).
Permissions
: You must have the s3vectors:DeleteVectors
permission to use this
operation.
743 744 745 746 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 743 def delete_vectors(params = {}, = {}) req = build_request(:delete_vectors, params) req.send_request() end |
#get_index(params = {}) ⇒ Types::GetIndexOutput
Returns vector index 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:GetIndex
permission to use this
operation.
800 801 802 803 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 800 def get_index(params = {}, = {}) req = build_request(:get_index, params) req.send_request() end |
#get_vector_bucket(params = {}) ⇒ Types::GetVectorBucketOutput
Returns vector bucket attributes. 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:GetVectorBucket
permission to use this
operation.
849 850 851 852 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 849 def get_vector_bucket(params = {}, = {}) req = build_request(:get_vector_bucket, params) req.send_request() end |
#get_vector_bucket_policy(params = {}) ⇒ Types::GetVectorBucketPolicyOutput
Gets details about a vector bucket policy. 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:GetVectorBucketPolicy
permission to
use this operation.
894 895 896 897 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 894 def get_vector_bucket_policy(params = {}, = {}) req = build_request(:get_vector_bucket_policy, params) req.send_request() end |
#get_vectors(params = {}) ⇒ Types::GetVectorsOutput
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.
961 962 963 964 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 961 def get_vectors(params = {}, = {}) req = build_request(:get_vectors, params) req.send_request() end |
#list_indexes(params = {}) ⇒ Types::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.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1027 1028 1029 1030 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1027 def list_indexes(params = {}, = {}) req = build_request(:list_indexes, params) req.send_request() end |
#list_vector_buckets(params = {}) ⇒ Types::ListVectorBucketsOutput
Returns a list of all the vector buckets that are owned by the authenticated sender of the request.
Permissions
: You must have the s3vectors:ListVectorBuckets
permission to use
this operation.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1083 1084 1085 1086 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1083 def list_vector_buckets(params = {}, = {}) req = build_request(:list_vector_buckets, params) req.send_request() end |
#list_vectors(params = {}) ⇒ Types::ListVectorsOutput
List vectors in the specified 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).
ListVectors
operations proceed sequentially; however, for faster
performance on a large number of vectors in a vector index,
applications can request a parallel ListVectors
operation by
providing the segmentCount
and segmentIndex
parameters.
Permissions
: You must have the s3vectors:ListVectors
permission to use this
operation. Additional permissions are required based on the request
parameters you specify:
With only
s3vectors:ListVectors
permission, you can list vector keys whenreturnData
andreturnMetadata
are both set to false or not specified..If you set
returnData
orreturnMetadata
to true, you must have boths3vectors:ListVectors
ands3vectors:GetVectors
permissions. The request fails with a403 Forbidden
error if you request vector data or metadata without thes3vectors:GetVectors
permission.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1213 1214 1215 1216 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1213 def list_vectors(params = {}, = {}) req = build_request(:list_vectors, params) req.send_request() end |
#put_vector_bucket_policy(params = {}) ⇒ Struct
Creates a bucket policy for a 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:PutVectorBucketPolicy
permission to
use this operation.
1262 1263 1264 1265 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1262 def put_vector_bucket_policy(params = {}, = {}) req = build_request(:put_vector_bucket_policy, params) req.send_request() end |
#put_vectors(params = {}) ⇒ Struct
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.
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.
1342 1343 1344 1345 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1342 def put_vectors(params = {}, = {}) req = build_request(:put_vectors, params) req.send_request() end |
#query_vectors(params = {}) ⇒ Types::QueryVectorsOutput
Performs an approximate nearest neighbor search query in a vector index using a query vector. By default, it returns the keys of approximate nearest neighbors. You can optionally include the computed distance (between the query vector and each vector in the response), the vector data, and metadata of each vector in the response.
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:QueryVectors
permission to use this
operation. Additional permissions are required based on the request
parameters you specify:
With only
s3vectors:QueryVectors
permission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't set any metadata filters and don't request vector data or metadata (by keeping thereturnMetadata
parameter set tofalse
or not specified).If you specify a metadata filter or set
returnMetadata
to true, you must have boths3vectors:QueryVectors
ands3vectors:GetVectors
permissions. The request fails with a403 Forbidden error
if you request metadata filtering, vector data, or metadata without thes3vectors:GetVectors
permission.
1455 1456 1457 1458 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1455 def query_vectors(params = {}, = {}) req = build_request(:query_vectors, params) req.send_request() end |