Class: Aws::S3Vectors::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::S3Vectors::Client
- Includes:
- ClientStubs
- Defined in:
- 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](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
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_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
Performs an approximate nearest neighbor search query in a vector index using a query vector.
-
#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.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
473 474 475 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 473 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1619 1620 1621 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1619 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1622 1623 1624 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1622 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1592 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::S3Vectors') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-s3vectors' context[:gem_version] = '1.10.0' Seahorse::Client::Request.new(handlers, context) end |
#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:CreateIndex` permission to use this
operation.
You must have the `s3vectors:TagResource` in addition to
`s3vectors:CreateIndex` to create a vector index with
.
568 569 570 571 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 568 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:CreateVectorBucket` permission to use
this operation.
You must have the `s3vectors:TagResource` in addition to
`s3vectors:CreateVectorBucket` to create a vector bucket
with .
636 637 638 639 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 636 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.
673 674 675 676 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 673 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.
707 708 709 710 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 707 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.
740 741 742 743 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 740 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.
782 783 784 785 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 782 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.
835 836 837 838 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 835 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.
878 879 880 881 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 878 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.
917 918 919 920 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 917 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.
977 978 979 980 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 977 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.
1037 1038 1039 1040 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1037 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.
<note markdown=“1”> For a list of S3 resources that support tagging, see [Managing tags for Amazon S3 resources].
</note>
Permissions
: For vector buckets and vector indexes, you must have the
`s3vectors:ListTagsForResource` to use this operation.
[1]: docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#manage-tags
1085 1086 1087 1088 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1085 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:ListVectorBuckets` permission to use
this operation.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1135 1136 1137 1138 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1135 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 are required based on the request
parameters you specify:
* With only `s3vectors:ListVectors` , you can list vector
keys when `returnData` and `returnMetadata` are both set to false
or not specified..
* If you set `returnData` or `returnMetadata` to true, you must have
both `s3vectors:ListVectors` and `s3vectors:GetVectors`
. The request fails with a `403 Forbidden` error if you
request vector data or without the `s3vectors:GetVectors`
.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1259 1260 1261 1262 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1259 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.
1302 1303 1304 1305 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1302 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*.
<note markdown=“1”> 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.
</note>
Permissions
: You must have the ‘s3vectors:PutVectors` permission to use this
operation.
[1]: docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-limitations.html
1375 1376 1377 1378 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1375 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 are required based on the request
parameters you specify:
* With only `s3vectors:QueryVectors` , you can retrieve
vector keys of approximate nearest neighbors and computed
distances between these vectors. This is sufficient
only when you don't set any metadata filters and don't request
vector data or (by keeping the `returnMetadata` parameter
set to `false` or not specified).
* If you specify a filter or set `returnMetadata` to true,
you must have both `s3vectors:QueryVectors` and
`s3vectors:GetVectors` . The request fails with a `403
Forbidden error` if you request filtering, vector data,
or without the `s3vectors:GetVectors` .
1481 1482 1483 1484 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1481 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.
<note markdown=“1”> For a list of S3 resources that support tagging, see [Managing tags for Amazon S3 resources].
</note>
Permissions
: For vector buckets and vector indexes, you must have the
`s3vectors:TagResource` to use this operation.
[1]: docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#manage-tags
1534 1535 1536 1537 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1534 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.
<note markdown=“1”> For a list of S3 resources that support tagging, see [Managing tags for Amazon S3 resources].
</note>
Permissions
: For vector buckets and vector indexes, you must have the
`s3vectors:UntagResource` to use this operation.
[1]: docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#manage-tags
1583 1584 1585 1586 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1583 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1612 1613 1614 |
# File 'lib/aws-sdk-s3vectors/client.rb', line 1612 def waiter_names [] end |