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 = {}) ⇒ Types::CreateIndexOutput
Creates a vector index within a vector bucket.
-
#create_vector_bucket(params = {}) ⇒ Types::CreateVectorBucketOutput
Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.
-
#delete_index(params = {}) ⇒ Struct
Deletes a vector index.
-
#delete_vector_bucket(params = {}) ⇒ Struct
Deletes a vector bucket.
-
#delete_vector_bucket_policy(params = {}) ⇒ Struct
Deletes a vector bucket policy.
-
#delete_vectors(params = {}) ⇒ Struct
Deletes one or more vectors in a vector index.
-
#get_index(params = {}) ⇒ Types::GetIndexOutput
Returns vector index attributes.
-
#get_vector_bucket(params = {}) ⇒ Types::GetVectorBucketOutput
Returns vector bucket attributes.
-
#get_vector_bucket_policy(params = {}) ⇒ Types::GetVectorBucketPolicyOutput
Gets details about a vector bucket policy.
-
#get_vectors(params = {}) ⇒ Types::GetVectorsOutput
Returns vector attributes.
-
#list_indexes(params = {}) ⇒ Types::ListIndexesOutput
Returns a list of all the vector indexes within the specified vector bucket.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists all of the tags applied to a specified Amazon S3 Vectors resource.
-
#list_vector_buckets(params = {}) ⇒ Types::ListVectorBucketsOutput
Returns a list of all the vector buckets that are owned by the authenticated sender of the request.
-
#list_vectors(params = {}) ⇒ Types::ListVectorsOutput
List vectors in the specified vector index.
-
#put_vector_bucket_default_index_mode(params = {}) ⇒ Struct
Updates the default index mode for a vector bucket.
-
#put_vector_bucket_policy(params = {}) ⇒ Struct
Creates a bucket policy for a vector bucket.
-
#put_vectors(params = {}) ⇒ Struct
Adds one or more vectors to a vector index.
-
#query_vectors(params = {}) ⇒ Types::QueryVectorsOutput
Returns matching vector keys from a vector index ranked by vector similarity, full-text relevance, or both.
-
#tag_resource(params = {}) ⇒ Struct
Applies one or more user-defined tags to an Amazon S3 Vectors resource or updates existing tags.
-
#untag_resource(params = {}) ⇒ Struct
Removes the specified user-defined tags from an Amazon S3 Vectors resource.
-
#update_index_mode(params = {}) ⇒ Struct
Updates the mode for an existing vector index.
-
#update_metadata_configuration(params = {}) ⇒ Types::UpdateMetadataConfigurationOutput
Adds or deletes text search configurations on a vector index.
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.
479 480 481 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 479 def initialize(*args) super end |
Instance Method Details
#create_index(params = {}) ⇒ Types::CreateIndexOutput
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:CreateIndexpermission to use this operation.You must have the
s3vectors:TagResourcepermission in addition tos3vectors:CreateIndexpermission to create a vector index with tags.
581 582 583 584 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 581 def create_index(params = {}, = {}) req = build_request(:create_index, params) req.send_request() end |
#create_vector_bucket(params = {}) ⇒ Types::CreateVectorBucketOutput
Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.
- Permissions
You must have the
s3vectors:CreateVectorBucketpermission to use this operation.You must have the
s3vectors:TagResourcepermission in addition tos3vectors:CreateVectorBucketpermission to create a vector bucket with tags.
649 650 651 652 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 649 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:DeleteIndexpermission to use this operation.
686 687 688 689 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 686 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:DeleteVectorBucketpermission to use this operation.
720 721 722 723 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 720 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:DeleteVectorBucketPolicypermission to use this operation.
753 754 755 756 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 753 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:DeleteVectorspermission to use this operation.
795 796 797 798 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 795 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:GetIndexpermission to use this operation.
853 854 855 856 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 853 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:GetVectorBucketpermission to use this operation.
897 898 899 900 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 897 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:GetVectorBucketPolicypermission to use this operation.
936 937 938 939 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 936 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:GetVectorspermission to use this operation.
996 997 998 999 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 996 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:ListIndexespermission to use this operation.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1056 1057 1058 1059 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1056 def list_indexes(params = {}, = {}) req = build_request(:list_indexes, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists all of the tags applied to a specified Amazon S3 Vectors resource. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to resources.
- Permissions
For vector buckets and vector indexes, you must have the
s3vectors:ListTagsForResourcepermission to use this operation.
1104 1105 1106 1107 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1104 def (params = {}, = {}) req = build_request(:list_tags_for_resource, 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:ListVectorBucketspermission to use this operation.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1154 1155 1156 1157 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1154 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:ListVectorspermission to use this operation. Additional permissions are required based on the request parameters you specify:With only
s3vectors:ListVectorspermission, you can list vector keys whenreturnDataandreturnMetadataare both set to false or not specified..If you set
returnDataorreturnMetadatato true, you must have boths3vectors:ListVectorsands3vectors:GetVectorspermissions. The request fails with a403 Forbiddenerror if you request vector data or metadata without thes3vectors:GetVectorspermission.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1278 1279 1280 1281 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1278 def list_vectors(params = {}, = {}) req = build_request(:list_vectors, params) req.send_request() end |
#put_vector_bucket_default_index_mode(params = {}) ⇒ Struct
Updates the default index mode for a vector bucket. The updated default applies to vector indexes that you create after the request succeeds. The operation doesn't change existing vector indexes. 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:PutVectorBucketDefaultIndexModepermission to use this operation.
1318 1319 1320 1321 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1318 def put_vector_bucket_default_index_mode(params = {}, = {}) req = build_request(:put_vector_bucket_default_index_mode, 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:PutVectorBucketPolicypermission to use this operation.
1361 1362 1363 1364 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1361 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:PutVectorspermission to use this operation.
1434 1435 1436 1437 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1434 def put_vectors(params = {}, = {}) req = build_request(:put_vectors, params) req.send_request() end |
#query_vectors(params = {}) ⇒ Types::QueryVectorsOutput
Returns matching vector keys from a vector index ranked by vector
similarity, full-text relevance, or both. Specify queryVector to
perform a vector search, specify queryTexts to perform a full-text
search, or specify both to perform a hybrid search. Full-text search
ranks results using BM25. Hybrid search combines the vector and
full-text rankings using Reciprocal Rank Fusion (RRF).
Amazon S3 Vectors ranks results by distance for a vector-only search,
by BM25 score for a full-text-only search, and by RRF score for a
hybrid search. You can optionally include computed distances,
relevance scores, and vector metadata in the response. Full-text and
hybrid searches require a vector index in ENHANCED mode.
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:QueryVectorspermission to use this operation. Additional permissions are required based on the request parameters you specify:With only
s3vectors:QueryVectorspermission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't setqueryTexts, don't set any metadata filters, and don't request metadata (by keeping thereturnMetadataparameter set tofalseor not specified).To use
queryTexts, a metadata filter, orreturnMetadataset totruewith this operation, you must have both thes3vectors:QueryVectorsands3vectors:GetVectorspermissions. If you use any of these options without thes3vectors:GetVectorspermission, Amazon S3 Vectors returns anAccessDeniedException.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1595 1596 1597 1598 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1595 def query_vectors(params = {}, = {}) req = build_request(:query_vectors, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Applies one or more user-defined tags to an Amazon S3 Vectors resource or updates existing tags. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to your resources. You can add up to 50 tags for each resource.
- Permissions
For vector buckets and vector indexes, you must have the
s3vectors:TagResourcepermission to use this operation.
1648 1649 1650 1651 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1648 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the specified user-defined tags from an Amazon S3 Vectors resource. You can pass one or more tag keys.
- Permissions
For vector buckets and vector indexes, you must have the
s3vectors:UntagResourcepermission to use this operation.
1697 1698 1699 1700 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1697 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_index_mode(params = {}) ⇒ Struct
Updates the mode for an existing vector index. You can set the mode to
ENHANCED for any vector index. You can set the mode to CLASSIC
only for a vector index in a vector bucket created before September
30, 2026. This operation doesn't change the default index mode of the
vector bucket or the mode of other vector indexes. Specify the vector
index by using its Amazon Resource Name (ARN) or both the vector
bucket name and vector index name.
- Permissions
You must have the
s3vectors:UpdateIndexModepermission to use this operation.
1750 1751 1752 1753 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1750 def update_index_mode(params = {}, = {}) req = build_request(:update_index_mode, params) req.send_request() end |
#update_metadata_configuration(params = {}) ⇒ Types::UpdateMetadataConfigurationOutput
Adds or deletes text search configurations on a vector index. Specify
either add or delete, but not both. The vector index must be in
ENHANCED mode.
- Permissions
You must have the
s3vectors:UpdateMetadataConfigurationpermission to use this operation.
1815 1816 1817 1818 |
# File 'gems/aws-sdk-s3vectors/lib/aws-sdk-s3vectors/client.rb', line 1815 def (params = {}, = {}) req = build_request(:update_metadata_configuration, params) req.send_request() end |