aws-sdk-s3vectors 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1500 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/rest_json'
38
+
39
+ module Aws::S3Vectors
40
+ # An API client for S3Vectors. To construct a client, you need to configure a `:region` and `:credentials`.
41
+ #
42
+ # client = Aws::S3Vectors::Client.new(
43
+ # region: region_name,
44
+ # credentials: credentials,
45
+ # # ...
46
+ # )
47
+ #
48
+ # For details on configuring region and credentials see
49
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
50
+ #
51
+ # See {#initialize} for a full list of supported configuration options.
52
+ class Client < Seahorse::Client::Base
53
+
54
+ include Aws::ClientStubs
55
+
56
+ @identifier = :s3vectors
57
+
58
+ set_api(ClientApi::API)
59
+
60
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
61
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
62
+ add_plugin(Aws::Plugins::Logging)
63
+ add_plugin(Aws::Plugins::ParamConverter)
64
+ add_plugin(Aws::Plugins::ParamValidator)
65
+ add_plugin(Aws::Plugins::UserAgent)
66
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
67
+ add_plugin(Aws::Plugins::RetryErrors)
68
+ add_plugin(Aws::Plugins::GlobalConfiguration)
69
+ add_plugin(Aws::Plugins::RegionalEndpoint)
70
+ add_plugin(Aws::Plugins::EndpointDiscovery)
71
+ add_plugin(Aws::Plugins::EndpointPattern)
72
+ add_plugin(Aws::Plugins::ResponsePaging)
73
+ add_plugin(Aws::Plugins::StubResponses)
74
+ add_plugin(Aws::Plugins::IdempotencyToken)
75
+ add_plugin(Aws::Plugins::InvocationId)
76
+ add_plugin(Aws::Plugins::JsonvalueConverter)
77
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
78
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
79
+ add_plugin(Aws::Plugins::TransferEncoding)
80
+ add_plugin(Aws::Plugins::HttpChecksum)
81
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
82
+ add_plugin(Aws::Plugins::RequestCompression)
83
+ add_plugin(Aws::Plugins::DefaultsMode)
84
+ add_plugin(Aws::Plugins::RecursionDetection)
85
+ add_plugin(Aws::Plugins::Telemetry)
86
+ add_plugin(Aws::Plugins::Sign)
87
+ add_plugin(Aws::Plugins::Protocols::RestJson)
88
+ add_plugin(Aws::S3Vectors::Plugins::Endpoints)
89
+
90
+ # @overload initialize(options)
91
+ # @param [Hash] options
92
+ #
93
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
94
+ # A list of plugins to apply to the client. Each plugin is either a
95
+ # class name or an instance of a plugin class.
96
+ #
97
+ # @option options [required, Aws::CredentialProvider] :credentials
98
+ # Your AWS credentials. This can be an instance of any one of the
99
+ # following classes:
100
+ #
101
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
102
+ # credentials.
103
+ #
104
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
105
+ # shared file, such as `~/.aws/config`.
106
+ #
107
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
108
+ #
109
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
110
+ # assume a role after providing credentials via the web.
111
+ #
112
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
113
+ # access token generated from `aws login`.
114
+ #
115
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
116
+ # process that outputs to stdout.
117
+ #
118
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
119
+ # from an EC2 IMDS on an EC2 instance.
120
+ #
121
+ # * `Aws::ECSCredentials` - Used for loading credentials from
122
+ # instances running in ECS.
123
+ #
124
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
125
+ # from the Cognito Identity service.
126
+ #
127
+ # When `:credentials` are not configured directly, the following
128
+ # locations will be searched for credentials:
129
+ #
130
+ # * `Aws.config[:credentials]`
131
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
132
+ # `:account_id` options.
133
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
134
+ # ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
135
+ # * `~/.aws/credentials`
136
+ # * `~/.aws/config`
137
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
138
+ # are very aggressive. Construct and pass an instance of
139
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
140
+ # enable retries and extended timeouts. Instance profile credential
141
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
142
+ # to true.
143
+ #
144
+ # @option options [required, String] :region
145
+ # The AWS region to connect to. The configured `:region` is
146
+ # used to determine the service `:endpoint`. When not passed,
147
+ # a default `:region` is searched for in the following locations:
148
+ #
149
+ # * `Aws.config[:region]`
150
+ # * `ENV['AWS_REGION']`
151
+ # * `ENV['AMAZON_REGION']`
152
+ # * `ENV['AWS_DEFAULT_REGION']`
153
+ # * `~/.aws/credentials`
154
+ # * `~/.aws/config`
155
+ #
156
+ # @option options [String] :access_key_id
157
+ #
158
+ # @option options [String] :account_id
159
+ #
160
+ # @option options [Boolean] :active_endpoint_cache (false)
161
+ # When set to `true`, a thread polling for endpoints will be running in
162
+ # the background every 60 secs (default). Defaults to `false`.
163
+ #
164
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
165
+ # Used only in `adaptive` retry mode. When true, the request will sleep
166
+ # until there is sufficent client side capacity to retry the request.
167
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
168
+ # not retry instead of sleeping.
169
+ #
170
+ # @option options [Boolean] :client_side_monitoring (false)
171
+ # When `true`, client-side metrics will be collected for all API requests from
172
+ # this client.
173
+ #
174
+ # @option options [String] :client_side_monitoring_client_id ("")
175
+ # Allows you to provide an identifier for this client which will be attached to
176
+ # all generated client side metrics. Defaults to an empty string.
177
+ #
178
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
179
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
180
+ # side monitoring agent is running on, where client metrics will be published via UDP.
181
+ #
182
+ # @option options [Integer] :client_side_monitoring_port (31000)
183
+ # Required for publishing client metrics. The port that the client side monitoring
184
+ # agent is running on, where client metrics will be published via UDP.
185
+ #
186
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
187
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
188
+ # will use the Client Side Monitoring Agent Publisher.
189
+ #
190
+ # @option options [Boolean] :convert_params (true)
191
+ # When `true`, an attempt is made to coerce request parameters into
192
+ # the required types.
193
+ #
194
+ # @option options [Boolean] :correct_clock_skew (true)
195
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
196
+ # a clock skew correction and retry requests with skewed client clocks.
197
+ #
198
+ # @option options [String] :defaults_mode ("legacy")
199
+ # See {Aws::DefaultsModeConfiguration} for a list of the
200
+ # accepted modes and the configuration defaults that are included.
201
+ #
202
+ # @option options [Boolean] :disable_host_prefix_injection (false)
203
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
204
+ #
205
+ # @option options [Boolean] :disable_request_compression (false)
206
+ # When set to 'true' the request body will not be compressed
207
+ # for supported operations.
208
+ #
209
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
210
+ # Normally you should not configure the `:endpoint` option
211
+ # directly. This is normally constructed from the `:region`
212
+ # option. Configuring `:endpoint` is normally reserved for
213
+ # connecting to test or custom endpoints. The endpoint should
214
+ # be a URI formatted like:
215
+ #
216
+ # 'http://example.com'
217
+ # 'https://example.com'
218
+ # 'http://example.com:123'
219
+ #
220
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
221
+ # Used for the maximum size limit of the LRU cache storing endpoints data
222
+ # for endpoint discovery enabled operations. Defaults to 1000.
223
+ #
224
+ # @option options [Integer] :endpoint_cache_max_threads (10)
225
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
226
+ #
227
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
228
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
229
+ # Use this option to config the time interval in seconds for making
230
+ # requests fetching endpoints information. Defaults to 60 sec.
231
+ #
232
+ # @option options [Boolean] :endpoint_discovery (false)
233
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
234
+ #
235
+ # @option options [Boolean] :ignore_configured_endpoint_urls
236
+ # Setting to true disables use of endpoint URLs provided via environment
237
+ # variables and the shared configuration file.
238
+ #
239
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
240
+ # The log formatter.
241
+ #
242
+ # @option options [Symbol] :log_level (:info)
243
+ # The log level to send messages to the `:logger` at.
244
+ #
245
+ # @option options [Logger] :logger
246
+ # The Logger instance to send log messages to. If this option
247
+ # is not set, logging will be disabled.
248
+ #
249
+ # @option options [Integer] :max_attempts (3)
250
+ # An integer representing the maximum number attempts that will be made for
251
+ # a single request, including the initial attempt. For example,
252
+ # setting this value to 5 will result in a request being retried up to
253
+ # 4 times. Used in `standard` and `adaptive` retry modes.
254
+ #
255
+ # @option options [String] :profile ("default")
256
+ # Used when loading credentials from the shared credentials file
257
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
258
+ #
259
+ # @option options [String] :request_checksum_calculation ("when_supported")
260
+ # Determines when a checksum will be calculated for request payloads. Values are:
261
+ #
262
+ # * `when_supported` - (default) When set, a checksum will be
263
+ # calculated for all request payloads of operations modeled with the
264
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
265
+ # `requestAlgorithmMember` is modeled.
266
+ # * `when_required` - When set, a checksum will only be calculated for
267
+ # request payloads of operations modeled with the `httpChecksum` trait where
268
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
269
+ # is modeled and supplied.
270
+ #
271
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
272
+ # The minimum size in bytes that triggers compression for request
273
+ # bodies. The value must be non-negative integer value between 0
274
+ # and 10485780 bytes inclusive.
275
+ #
276
+ # @option options [String] :response_checksum_validation ("when_supported")
277
+ # Determines when checksum validation will be performed on response payloads. Values are:
278
+ #
279
+ # * `when_supported` - (default) When set, checksum validation is performed on all
280
+ # response payloads of operations modeled with the `httpChecksum` trait where
281
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
282
+ # are supported.
283
+ # * `when_required` - When set, checksum validation is not performed on
284
+ # response payloads of operations unless the checksum algorithm is supported and
285
+ # the `requestValidationModeMember` member is set to `ENABLED`.
286
+ #
287
+ # @option options [Proc] :retry_backoff
288
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
289
+ # This option is only used in the `legacy` retry mode.
290
+ #
291
+ # @option options [Float] :retry_base_delay (0.3)
292
+ # The base delay in seconds used by the default backoff function. This option
293
+ # is only used in the `legacy` retry mode.
294
+ #
295
+ # @option options [Symbol] :retry_jitter (:none)
296
+ # A delay randomiser function used by the default backoff function.
297
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
298
+ # otherwise a Proc that takes and returns a number. This option is only used
299
+ # in the `legacy` retry mode.
300
+ #
301
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
302
+ #
303
+ # @option options [Integer] :retry_limit (3)
304
+ # The maximum number of times to retry failed requests. Only
305
+ # ~ 500 level server errors and certain ~ 400 level client errors
306
+ # are retried. Generally, these are throttling errors, data
307
+ # checksum errors, networking errors, timeout errors, auth errors,
308
+ # endpoint discovery, and errors from expired credentials.
309
+ # This option is only used in the `legacy` retry mode.
310
+ #
311
+ # @option options [Integer] :retry_max_delay (0)
312
+ # The maximum number of seconds to delay between retries (0 for no limit)
313
+ # used by the default backoff function. This option is only used in the
314
+ # `legacy` retry mode.
315
+ #
316
+ # @option options [String] :retry_mode ("legacy")
317
+ # Specifies which retry algorithm to use. Values are:
318
+ #
319
+ # * `legacy` - The pre-existing retry behavior. This is default value if
320
+ # no retry mode is provided.
321
+ #
322
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
323
+ # This includes support for retry quotas, which limit the number of
324
+ # unsuccessful retries a client can make.
325
+ #
326
+ # * `adaptive` - An experimental retry mode that includes all the
327
+ # functionality of `standard` mode along with automatic client side
328
+ # throttling. This is a provisional mode that may change behavior
329
+ # in the future.
330
+ #
331
+ # @option options [String] :sdk_ua_app_id
332
+ # A unique and opaque application ID that is appended to the
333
+ # User-Agent header as app/sdk_ua_app_id. It should have a
334
+ # maximum length of 50. This variable is sourced from environment
335
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
336
+ #
337
+ # @option options [String] :secret_access_key
338
+ #
339
+ # @option options [String] :session_token
340
+ #
341
+ # @option options [Array] :sigv4a_signing_region_set
342
+ # A list of regions that should be signed with SigV4a signing. When
343
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
344
+ # in the following locations:
345
+ #
346
+ # * `Aws.config[:sigv4a_signing_region_set]`
347
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
348
+ # * `~/.aws/config`
349
+ #
350
+ # @option options [Boolean] :stub_responses (false)
351
+ # Causes the client to return stubbed responses. By default
352
+ # fake responses are generated and returned. You can specify
353
+ # the response data to return or errors to raise by calling
354
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
355
+ #
356
+ # ** Please note ** When response stubbing is enabled, no HTTP
357
+ # requests are made, and retries are disabled.
358
+ #
359
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
360
+ # Allows you to provide a telemetry provider, which is used to
361
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
362
+ # will not record or emit any telemetry data. The SDK supports the
363
+ # following telemetry providers:
364
+ #
365
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
366
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
367
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
368
+ #
369
+ # @option options [Aws::TokenProvider] :token_provider
370
+ # A Bearer Token Provider. This can be an instance of any one of the
371
+ # following classes:
372
+ #
373
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
374
+ # tokens.
375
+ #
376
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
377
+ # access token generated from `aws login`.
378
+ #
379
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
380
+ # will be used to search for tokens configured for your profile in shared configuration files.
381
+ #
382
+ # @option options [Boolean] :use_dualstack_endpoint
383
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
384
+ # will be used if available.
385
+ #
386
+ # @option options [Boolean] :use_fips_endpoint
387
+ # When set to `true`, fips compatible endpoints will be used if available.
388
+ # When a `fips` region is used, the region is normalized and this config
389
+ # is set to `true`.
390
+ #
391
+ # @option options [Boolean] :validate_params (true)
392
+ # When `true`, request parameters are validated before
393
+ # sending the request.
394
+ #
395
+ # @option options [Aws::S3Vectors::EndpointProvider] :endpoint_provider
396
+ # The endpoint provider used to resolve endpoints. Any object that responds to
397
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
398
+ # `Aws::S3Vectors::EndpointParameters`.
399
+ #
400
+ # @option options [Float] :http_continue_timeout (1)
401
+ # The number of seconds to wait for a 100-continue response before sending the
402
+ # request body. This option has no effect unless the request has "Expect"
403
+ # header set to "100-continue". Defaults to `nil` which disables this
404
+ # behaviour. This value can safely be set per request on the session.
405
+ #
406
+ # @option options [Float] :http_idle_timeout (5)
407
+ # The number of seconds a connection is allowed to sit idle before it
408
+ # is considered stale. Stale connections are closed and removed from the
409
+ # pool before making a request.
410
+ #
411
+ # @option options [Float] :http_open_timeout (15)
412
+ # The default number of seconds to wait for response data.
413
+ # This value can safely be set per-request on the session.
414
+ #
415
+ # @option options [URI::HTTP,String] :http_proxy
416
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
417
+ #
418
+ # @option options [Float] :http_read_timeout (60)
419
+ # The default number of seconds to wait for response data.
420
+ # This value can safely be set per-request on the session.
421
+ #
422
+ # @option options [Boolean] :http_wire_trace (false)
423
+ # When `true`, HTTP debug output will be sent to the `:logger`.
424
+ #
425
+ # @option options [Proc] :on_chunk_received
426
+ # When a Proc object is provided, it will be used as callback when each chunk
427
+ # of the response body is received. It provides three arguments: the chunk,
428
+ # the number of bytes received, and the total number of
429
+ # bytes in the response (or nil if the server did not send a `content-length`).
430
+ #
431
+ # @option options [Proc] :on_chunk_sent
432
+ # When a Proc object is provided, it will be used as callback when each chunk
433
+ # of the request body is sent. It provides three arguments: the chunk,
434
+ # the number of bytes read from the body, and the total number of
435
+ # bytes in the body.
436
+ #
437
+ # @option options [Boolean] :raise_response_errors (true)
438
+ # When `true`, response errors are raised.
439
+ #
440
+ # @option options [String] :ssl_ca_bundle
441
+ # Full path to the SSL certificate authority bundle file that should be used when
442
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
443
+ # `:ssl_ca_directory` the the system default will be used if available.
444
+ #
445
+ # @option options [String] :ssl_ca_directory
446
+ # Full path of the directory that contains the unbundled SSL certificate
447
+ # authority files for verifying peer certificates. If you do
448
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
449
+ # default will be used if available.
450
+ #
451
+ # @option options [String] :ssl_ca_store
452
+ # Sets the X509::Store to verify peer certificate.
453
+ #
454
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
455
+ # Sets a client certificate when creating http connections.
456
+ #
457
+ # @option options [OpenSSL::PKey] :ssl_key
458
+ # Sets a client key when creating http connections.
459
+ #
460
+ # @option options [Float] :ssl_timeout
461
+ # Sets the SSL timeout in seconds
462
+ #
463
+ # @option options [Boolean] :ssl_verify_peer (true)
464
+ # When `true`, SSL peer certificates are verified when establishing a connection.
465
+ #
466
+ def initialize(*args)
467
+ super
468
+ end
469
+
470
+ # @!group API Operations
471
+
472
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
473
+ # S3 and is subject
474
+ # to change.
475
+ #
476
+ # </note>
477
+ #
478
+ # Creates a vector index within a vector bucket. To specify the vector
479
+ # bucket, you must use either the vector bucket name or the vector
480
+ # bucket Amazon Resource Name (ARN).
481
+ #
482
+ # Permissions
483
+ #
484
+ # \: You must have the `s3vectors:CreateIndex` permission to use this
485
+ # operation.
486
+ #
487
+ # @option params [String] :vector_bucket_name
488
+ # The name of the vector bucket to create the vector index in.
489
+ #
490
+ # @option params [String] :vector_bucket_arn
491
+ # The Amazon Resource Name (ARN) of the vector bucket to create the
492
+ # vector index in.
493
+ #
494
+ # @option params [required, String] :index_name
495
+ # The name of the vector index to create.
496
+ #
497
+ # @option params [required, String] :data_type
498
+ # The data type of the vectors to be inserted into the vector index.
499
+ #
500
+ # @option params [required, Integer] :dimension
501
+ # The dimensions of the vectors to be inserted into the vector index.
502
+ #
503
+ # @option params [required, String] :distance_metric
504
+ # The distance metric to be used for similarity search.
505
+ #
506
+ # @option params [Types::MetadataConfiguration] :metadata_configuration
507
+ # The metadata configuration for the vector index.
508
+ #
509
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
510
+ #
511
+ # @example Request syntax with placeholder values
512
+ #
513
+ # resp = client.create_index({
514
+ # vector_bucket_name: "VectorBucketName",
515
+ # vector_bucket_arn: "VectorBucketArn",
516
+ # index_name: "IndexName", # required
517
+ # data_type: "float32", # required, accepts float32
518
+ # dimension: 1, # required
519
+ # distance_metric: "euclidean", # required, accepts euclidean, cosine
520
+ # metadata_configuration: {
521
+ # non_filterable_metadata_keys: ["MetadataKey"], # required
522
+ # },
523
+ # })
524
+ #
525
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/CreateIndex AWS API Documentation
526
+ #
527
+ # @overload create_index(params = {})
528
+ # @param [Hash] params ({})
529
+ def create_index(params = {}, options = {})
530
+ req = build_request(:create_index, params)
531
+ req.send_request(options)
532
+ end
533
+
534
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
535
+ # S3 and is subject
536
+ # to change.
537
+ #
538
+ # </note>
539
+ #
540
+ # Creates a vector bucket in the Amazon Web Services Region that you
541
+ # want your bucket to be in.
542
+ #
543
+ # Permissions
544
+ #
545
+ # \: You must have the `s3vectors:CreateVectorBucket` permission to use
546
+ # this operation.
547
+ #
548
+ # @option params [required, String] :vector_bucket_name
549
+ # The name of the vector bucket to create.
550
+ #
551
+ # @option params [Types::EncryptionConfiguration] :encryption_configuration
552
+ # The encryption configuration for the vector bucket. By default, if you
553
+ # don't specify, all new vectors in Amazon S3 vector buckets use
554
+ # server-side encryption with Amazon S3 managed keys (SSE-S3),
555
+ # specifically `AES256`.
556
+ #
557
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
558
+ #
559
+ # @example Request syntax with placeholder values
560
+ #
561
+ # resp = client.create_vector_bucket({
562
+ # vector_bucket_name: "VectorBucketName", # required
563
+ # encryption_configuration: {
564
+ # sse_type: "AES256", # accepts AES256, aws:kms
565
+ # kms_key_arn: "KmsKeyArn",
566
+ # },
567
+ # })
568
+ #
569
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/CreateVectorBucket AWS API Documentation
570
+ #
571
+ # @overload create_vector_bucket(params = {})
572
+ # @param [Hash] params ({})
573
+ def create_vector_bucket(params = {}, options = {})
574
+ req = build_request(:create_vector_bucket, params)
575
+ req.send_request(options)
576
+ end
577
+
578
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
579
+ # S3 and is subject
580
+ # to change.
581
+ #
582
+ # </note>
583
+ #
584
+ # Deletes a vector index. To specify the vector index, you can either
585
+ # use both the vector bucket name and vector index name, or use the
586
+ # vector index Amazon Resource Name (ARN).
587
+ #
588
+ # Permissions
589
+ #
590
+ # \: You must have the `s3vectors:DeleteIndex` permission to use this
591
+ # operation.
592
+ #
593
+ # @option params [String] :vector_bucket_name
594
+ # The name of the vector bucket that contains the vector index.
595
+ #
596
+ # @option params [String] :index_name
597
+ # The name of the vector index to delete.
598
+ #
599
+ # @option params [String] :index_arn
600
+ # The ARN of the vector index to delete.
601
+ #
602
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
603
+ #
604
+ # @example Request syntax with placeholder values
605
+ #
606
+ # resp = client.delete_index({
607
+ # vector_bucket_name: "VectorBucketName",
608
+ # index_name: "IndexName",
609
+ # index_arn: "IndexArn",
610
+ # })
611
+ #
612
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/DeleteIndex AWS API Documentation
613
+ #
614
+ # @overload delete_index(params = {})
615
+ # @param [Hash] params ({})
616
+ def delete_index(params = {}, options = {})
617
+ req = build_request(:delete_index, params)
618
+ req.send_request(options)
619
+ end
620
+
621
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
622
+ # S3 and is subject
623
+ # to change.
624
+ #
625
+ # </note>
626
+ #
627
+ # Deletes a vector bucket. All vector indexes in the vector bucket must
628
+ # be deleted before the vector bucket can be deleted. To perform this
629
+ # operation, you must use either the vector bucket name or the vector
630
+ # bucket Amazon Resource Name (ARN).
631
+ #
632
+ # Permissions
633
+ #
634
+ # \: You must have the `s3vectors:DeleteVectorBucket` permission to use
635
+ # this operation.
636
+ #
637
+ # @option params [String] :vector_bucket_name
638
+ # The name of the vector bucket to delete.
639
+ #
640
+ # @option params [String] :vector_bucket_arn
641
+ # The ARN of the vector bucket to delete.
642
+ #
643
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
644
+ #
645
+ # @example Request syntax with placeholder values
646
+ #
647
+ # resp = client.delete_vector_bucket({
648
+ # vector_bucket_name: "VectorBucketName",
649
+ # vector_bucket_arn: "VectorBucketArn",
650
+ # })
651
+ #
652
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/DeleteVectorBucket AWS API Documentation
653
+ #
654
+ # @overload delete_vector_bucket(params = {})
655
+ # @param [Hash] params ({})
656
+ def delete_vector_bucket(params = {}, options = {})
657
+ req = build_request(:delete_vector_bucket, params)
658
+ req.send_request(options)
659
+ end
660
+
661
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
662
+ # S3 and is subject
663
+ # to change.
664
+ #
665
+ # </note>
666
+ #
667
+ # Deletes a vector bucket policy. To specify the bucket, you must use
668
+ # either the vector bucket name or the vector bucket Amazon Resource
669
+ # Name (ARN).
670
+ #
671
+ # Permissions
672
+ #
673
+ # \: You must have the `s3vectors:DeleteVectorBucketPolicy` permission to
674
+ # use this operation.
675
+ #
676
+ # @option params [String] :vector_bucket_name
677
+ # The name of the vector bucket to delete the policy from.
678
+ #
679
+ # @option params [String] :vector_bucket_arn
680
+ # The ARN of the vector bucket to delete the policy from.
681
+ #
682
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
683
+ #
684
+ # @example Request syntax with placeholder values
685
+ #
686
+ # resp = client.delete_vector_bucket_policy({
687
+ # vector_bucket_name: "VectorBucketName",
688
+ # vector_bucket_arn: "VectorBucketArn",
689
+ # })
690
+ #
691
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/DeleteVectorBucketPolicy AWS API Documentation
692
+ #
693
+ # @overload delete_vector_bucket_policy(params = {})
694
+ # @param [Hash] params ({})
695
+ def delete_vector_bucket_policy(params = {}, options = {})
696
+ req = build_request(:delete_vector_bucket_policy, params)
697
+ req.send_request(options)
698
+ end
699
+
700
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
701
+ # S3 and is subject
702
+ # to change.
703
+ #
704
+ # </note>
705
+ #
706
+ # Deletes one or more vectors in a vector index. To specify the vector
707
+ # index, you can either use both the vector bucket name and vector index
708
+ # name, or use the vector index Amazon Resource Name (ARN).
709
+ #
710
+ # Permissions
711
+ #
712
+ # \: You must have the `s3vectors:DeleteVectors` permission to use this
713
+ # operation.
714
+ #
715
+ # @option params [String] :vector_bucket_name
716
+ # The name of the vector bucket that contains the vector index.
717
+ #
718
+ # @option params [String] :index_name
719
+ # The name of the vector index that contains a vector you want to
720
+ # delete.
721
+ #
722
+ # @option params [String] :index_arn
723
+ # The ARN of the vector index that contains a vector you want to delete.
724
+ #
725
+ # @option params [required, Array<String>] :keys
726
+ # The keys of the vectors to delete.
727
+ #
728
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
729
+ #
730
+ # @example Request syntax with placeholder values
731
+ #
732
+ # resp = client.delete_vectors({
733
+ # vector_bucket_name: "VectorBucketName",
734
+ # index_name: "IndexName",
735
+ # index_arn: "IndexArn",
736
+ # keys: ["VectorKey"], # required
737
+ # })
738
+ #
739
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/DeleteVectors AWS API Documentation
740
+ #
741
+ # @overload delete_vectors(params = {})
742
+ # @param [Hash] params ({})
743
+ def delete_vectors(params = {}, options = {})
744
+ req = build_request(:delete_vectors, params)
745
+ req.send_request(options)
746
+ end
747
+
748
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
749
+ # S3 and is subject
750
+ # to change.
751
+ #
752
+ # </note>
753
+ #
754
+ # Returns vector index attributes. To specify the vector index, you can
755
+ # either use both the vector bucket name and the vector index name, or
756
+ # use the vector index Amazon Resource Name (ARN).
757
+ #
758
+ # Permissions
759
+ #
760
+ # \: You must have the `s3vectors:GetIndex` permission to use this
761
+ # operation.
762
+ #
763
+ # @option params [String] :vector_bucket_name
764
+ # The name of the vector bucket that contains the vector index.
765
+ #
766
+ # @option params [String] :index_name
767
+ # The name of the vector index.
768
+ #
769
+ # @option params [String] :index_arn
770
+ # The ARN of the vector index.
771
+ #
772
+ # @return [Types::GetIndexOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
773
+ #
774
+ # * {Types::GetIndexOutput#index #index} => Types::Index
775
+ #
776
+ # @example Request syntax with placeholder values
777
+ #
778
+ # resp = client.get_index({
779
+ # vector_bucket_name: "VectorBucketName",
780
+ # index_name: "IndexName",
781
+ # index_arn: "IndexArn",
782
+ # })
783
+ #
784
+ # @example Response structure
785
+ #
786
+ # resp.index.vector_bucket_name #=> String
787
+ # resp.index.index_name #=> String
788
+ # resp.index.index_arn #=> String
789
+ # resp.index.creation_time #=> Time
790
+ # resp.index.data_type #=> String, one of "float32"
791
+ # resp.index.dimension #=> Integer
792
+ # resp.index.distance_metric #=> String, one of "euclidean", "cosine"
793
+ # resp.index.metadata_configuration.non_filterable_metadata_keys #=> Array
794
+ # resp.index.metadata_configuration.non_filterable_metadata_keys[0] #=> String
795
+ #
796
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/GetIndex AWS API Documentation
797
+ #
798
+ # @overload get_index(params = {})
799
+ # @param [Hash] params ({})
800
+ def get_index(params = {}, options = {})
801
+ req = build_request(:get_index, params)
802
+ req.send_request(options)
803
+ end
804
+
805
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
806
+ # S3 and is subject
807
+ # to change.
808
+ #
809
+ # </note>
810
+ #
811
+ # Returns vector bucket attributes. To specify the bucket, you must use
812
+ # either the vector bucket name or the vector bucket Amazon Resource
813
+ # Name (ARN).
814
+ #
815
+ # Permissions
816
+ #
817
+ # \: You must have the `s3vectors:GetVectorBucket` permission to use this
818
+ # operation.
819
+ #
820
+ # @option params [String] :vector_bucket_name
821
+ # The name of the vector bucket to retrieve information about.
822
+ #
823
+ # @option params [String] :vector_bucket_arn
824
+ # The ARN of the vector bucket to retrieve information about.
825
+ #
826
+ # @return [Types::GetVectorBucketOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
827
+ #
828
+ # * {Types::GetVectorBucketOutput#vector_bucket #vector_bucket} => Types::VectorBucket
829
+ #
830
+ # @example Request syntax with placeholder values
831
+ #
832
+ # resp = client.get_vector_bucket({
833
+ # vector_bucket_name: "VectorBucketName",
834
+ # vector_bucket_arn: "VectorBucketArn",
835
+ # })
836
+ #
837
+ # @example Response structure
838
+ #
839
+ # resp.vector_bucket.vector_bucket_name #=> String
840
+ # resp.vector_bucket.vector_bucket_arn #=> String
841
+ # resp.vector_bucket.creation_time #=> Time
842
+ # resp.vector_bucket.encryption_configuration.sse_type #=> String, one of "AES256", "aws:kms"
843
+ # resp.vector_bucket.encryption_configuration.kms_key_arn #=> String
844
+ #
845
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/GetVectorBucket AWS API Documentation
846
+ #
847
+ # @overload get_vector_bucket(params = {})
848
+ # @param [Hash] params ({})
849
+ def get_vector_bucket(params = {}, options = {})
850
+ req = build_request(:get_vector_bucket, params)
851
+ req.send_request(options)
852
+ end
853
+
854
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
855
+ # S3 and is subject
856
+ # to change.
857
+ #
858
+ # </note>
859
+ #
860
+ # Gets details about a vector bucket policy. To specify the bucket, you
861
+ # must use either the vector bucket name or the vector bucket Amazon
862
+ # Resource Name (ARN).
863
+ #
864
+ # Permissions
865
+ #
866
+ # \: You must have the `s3vectors:GetVectorBucketPolicy` permission to
867
+ # use this operation.
868
+ #
869
+ # @option params [String] :vector_bucket_name
870
+ # The name of the vector bucket.
871
+ #
872
+ # @option params [String] :vector_bucket_arn
873
+ # The ARN of the vector bucket.
874
+ #
875
+ # @return [Types::GetVectorBucketPolicyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
876
+ #
877
+ # * {Types::GetVectorBucketPolicyOutput#policy #policy} => String
878
+ #
879
+ # @example Request syntax with placeholder values
880
+ #
881
+ # resp = client.get_vector_bucket_policy({
882
+ # vector_bucket_name: "VectorBucketName",
883
+ # vector_bucket_arn: "VectorBucketArn",
884
+ # })
885
+ #
886
+ # @example Response structure
887
+ #
888
+ # resp.policy #=> String
889
+ #
890
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/GetVectorBucketPolicy AWS API Documentation
891
+ #
892
+ # @overload get_vector_bucket_policy(params = {})
893
+ # @param [Hash] params ({})
894
+ def get_vector_bucket_policy(params = {}, options = {})
895
+ req = build_request(:get_vector_bucket_policy, params)
896
+ req.send_request(options)
897
+ end
898
+
899
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
900
+ # S3 and is subject
901
+ # to change.
902
+ #
903
+ # </note>
904
+ #
905
+ # Returns vector attributes. To specify the vector index, you can
906
+ # either
907
+ # use both the vector bucket name and the vector index name, or use the
908
+ # vector index Amazon Resource Name (ARN).
909
+ #
910
+ # Permissions
911
+ #
912
+ # \: You must have the `s3vectors:GetVectors` permission to use this
913
+ # operation.
914
+ #
915
+ # @option params [String] :vector_bucket_name
916
+ # The name of the vector bucket that contains the vector index.
917
+ #
918
+ # @option params [String] :index_name
919
+ # The name of the vector index.
920
+ #
921
+ # @option params [String] :index_arn
922
+ # The ARN of the vector index.
923
+ #
924
+ # @option params [required, Array<String>] :keys
925
+ # The names of the vectors you want to return attributes for.
926
+ #
927
+ # @option params [Boolean] :return_data
928
+ # Indicates whether to include the vector data in the response. The
929
+ # default value is `false`.
930
+ #
931
+ # @option params [Boolean] :return_metadata
932
+ # Indicates whether to include metadata in the response. The default
933
+ # value is `false`.
934
+ #
935
+ # @return [Types::GetVectorsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
936
+ #
937
+ # * {Types::GetVectorsOutput#vectors #vectors} => Array&lt;Types::GetOutputVector&gt;
938
+ #
939
+ # @example Request syntax with placeholder values
940
+ #
941
+ # resp = client.get_vectors({
942
+ # vector_bucket_name: "VectorBucketName",
943
+ # index_name: "IndexName",
944
+ # index_arn: "IndexArn",
945
+ # keys: ["VectorKey"], # required
946
+ # return_data: false,
947
+ # return_metadata: false,
948
+ # })
949
+ #
950
+ # @example Response structure
951
+ #
952
+ # resp.vectors #=> Array
953
+ # resp.vectors[0].key #=> String
954
+ # resp.vectors[0].data.float32 #=> Array
955
+ # resp.vectors[0].data.float32[0] #=> Float
956
+ #
957
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/GetVectors AWS API Documentation
958
+ #
959
+ # @overload get_vectors(params = {})
960
+ # @param [Hash] params ({})
961
+ def get_vectors(params = {}, options = {})
962
+ req = build_request(:get_vectors, params)
963
+ req.send_request(options)
964
+ end
965
+
966
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
967
+ # S3 and is subject
968
+ # to change.
969
+ #
970
+ # </note>
971
+ #
972
+ # Returns a list of all the vector indexes within the specified vector
973
+ # bucket. To specify the bucket, you must use either the vector bucket
974
+ # name or the vector bucket Amazon Resource Name (ARN).
975
+ #
976
+ # Permissions
977
+ #
978
+ # \: You must have the `s3vectors:ListIndexes` permission to use this
979
+ # operation.
980
+ #
981
+ # @option params [String] :vector_bucket_name
982
+ # The name of the vector bucket that contains the vector indexes.
983
+ #
984
+ # @option params [String] :vector_bucket_arn
985
+ # The ARN of the vector bucket that contains the vector indexes.
986
+ #
987
+ # @option params [Integer] :max_results
988
+ # The maximum number of items to be returned in the response.
989
+ #
990
+ # @option params [String] :next_token
991
+ # The previous pagination token.
992
+ #
993
+ # @option params [String] :prefix
994
+ # Limits the response to vector indexes that begin with the specified
995
+ # prefix.
996
+ #
997
+ # @return [Types::ListIndexesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
998
+ #
999
+ # * {Types::ListIndexesOutput#next_token #next_token} => String
1000
+ # * {Types::ListIndexesOutput#indexes #indexes} => Array&lt;Types::IndexSummary&gt;
1001
+ #
1002
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1003
+ #
1004
+ # @example Request syntax with placeholder values
1005
+ #
1006
+ # resp = client.list_indexes({
1007
+ # vector_bucket_name: "VectorBucketName",
1008
+ # vector_bucket_arn: "VectorBucketArn",
1009
+ # max_results: 1,
1010
+ # next_token: "ListIndexesNextToken",
1011
+ # prefix: "ListIndexesPrefix",
1012
+ # })
1013
+ #
1014
+ # @example Response structure
1015
+ #
1016
+ # resp.next_token #=> String
1017
+ # resp.indexes #=> Array
1018
+ # resp.indexes[0].vector_bucket_name #=> String
1019
+ # resp.indexes[0].index_name #=> String
1020
+ # resp.indexes[0].index_arn #=> String
1021
+ # resp.indexes[0].creation_time #=> Time
1022
+ #
1023
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/ListIndexes AWS API Documentation
1024
+ #
1025
+ # @overload list_indexes(params = {})
1026
+ # @param [Hash] params ({})
1027
+ def list_indexes(params = {}, options = {})
1028
+ req = build_request(:list_indexes, params)
1029
+ req.send_request(options)
1030
+ end
1031
+
1032
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
1033
+ # S3 and is subject
1034
+ # to change.
1035
+ #
1036
+ # </note>
1037
+ #
1038
+ # Returns a list of all the vector buckets that are owned by the
1039
+ # authenticated sender of the request.
1040
+ #
1041
+ # Permissions
1042
+ #
1043
+ # \: You must have the `s3vectors:ListVectorBuckets` permission to use
1044
+ # this operation.
1045
+ #
1046
+ # @option params [Integer] :max_results
1047
+ # The maximum number of vector buckets to be returned in the response.
1048
+ #
1049
+ # @option params [String] :next_token
1050
+ # The previous pagination token.
1051
+ #
1052
+ # @option params [String] :prefix
1053
+ # Limits the response to vector buckets that begin with the specified
1054
+ # prefix.
1055
+ #
1056
+ # @return [Types::ListVectorBucketsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1057
+ #
1058
+ # * {Types::ListVectorBucketsOutput#next_token #next_token} => String
1059
+ # * {Types::ListVectorBucketsOutput#vector_buckets #vector_buckets} => Array&lt;Types::VectorBucketSummary&gt;
1060
+ #
1061
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1062
+ #
1063
+ # @example Request syntax with placeholder values
1064
+ #
1065
+ # resp = client.list_vector_buckets({
1066
+ # max_results: 1,
1067
+ # next_token: "ListVectorBucketsNextToken",
1068
+ # prefix: "ListVectorBucketsPrefix",
1069
+ # })
1070
+ #
1071
+ # @example Response structure
1072
+ #
1073
+ # resp.next_token #=> String
1074
+ # resp.vector_buckets #=> Array
1075
+ # resp.vector_buckets[0].vector_bucket_name #=> String
1076
+ # resp.vector_buckets[0].vector_bucket_arn #=> String
1077
+ # resp.vector_buckets[0].creation_time #=> Time
1078
+ #
1079
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/ListVectorBuckets AWS API Documentation
1080
+ #
1081
+ # @overload list_vector_buckets(params = {})
1082
+ # @param [Hash] params ({})
1083
+ def list_vector_buckets(params = {}, options = {})
1084
+ req = build_request(:list_vector_buckets, params)
1085
+ req.send_request(options)
1086
+ end
1087
+
1088
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
1089
+ # S3 and is subject
1090
+ # to change.
1091
+ #
1092
+ # </note>
1093
+ #
1094
+ # List vectors in the specified vector index. To specify the vector
1095
+ # index, you can either use both the vector bucket name and the vector
1096
+ # index name, or use the vector index Amazon Resource Name (ARN).
1097
+ #
1098
+ # `ListVectors` operations proceed sequentially; however, for faster
1099
+ # performance on a large number of vectors in a vector index,
1100
+ # applications can request a parallel `ListVectors` operation by
1101
+ # providing the `segmentCount` and `segmentIndex` parameters.
1102
+ #
1103
+ # Permissions
1104
+ #
1105
+ # \: You must have the `s3vectors:ListVectors` permission to use this
1106
+ # operation. Additional permissions are required based on the request
1107
+ # parameters you specify:
1108
+ #
1109
+ # * With only `s3vectors:ListVectors` permission, you can list vector
1110
+ # keys when `returnData` and `returnMetadata` are both set to false
1111
+ # or not specified..
1112
+ #
1113
+ # * If you set `returnData` or `returnMetadata` to true, you must have
1114
+ # both `s3vectors:ListVectors` and `s3vectors:GetVectors`
1115
+ # permissions. The request fails with a `403 Forbidden` error if you
1116
+ # request vector data or metadata without the `s3vectors:GetVectors`
1117
+ # permission.
1118
+ #
1119
+ # @option params [String] :vector_bucket_name
1120
+ # The name of the vector bucket.
1121
+ #
1122
+ # @option params [String] :index_name
1123
+ # The name of the vector index.
1124
+ #
1125
+ # @option params [String] :index_arn
1126
+ # The Amazon resource Name (ARN) of the vector index.
1127
+ #
1128
+ # @option params [Integer] :max_results
1129
+ # The maximum number of vectors to return on a page.
1130
+ #
1131
+ # If you don't specify `maxResults`, the `ListVectors` operation uses a
1132
+ # default value of 500.
1133
+ #
1134
+ # If the processed dataset size exceeds 1 MB before reaching the
1135
+ # `maxResults` value, the operation stops and returns the vectors that
1136
+ # are retrieved up to that point, along with a `nextToken` that you can
1137
+ # use in a subsequent request to retrieve the next set of results.
1138
+ #
1139
+ # @option params [String] :next_token
1140
+ # Pagination token from a previous request. The value of this field is
1141
+ # empty for an initial request.
1142
+ #
1143
+ # @option params [Integer] :segment_count
1144
+ # For a parallel `ListVectors` request, `segmentCount` represents the
1145
+ # total number of vector segments into which the `ListVectors` operation
1146
+ # will be divided. The value of `segmentCount` corresponds to the number
1147
+ # of application workers that will perform the parallel `ListVectors`
1148
+ # operation. For example, if you want to use four application threads to
1149
+ # list vectors in a vector index, specify a `segmentCount` value of 4.
1150
+ #
1151
+ # If you specify a `segmentCount` value of 1, the `ListVectors`
1152
+ # operation will be sequential rather than parallel.
1153
+ #
1154
+ # If you specify `segmentCount`, you must also specify `segmentIndex`.
1155
+ #
1156
+ # @option params [Integer] :segment_index
1157
+ # For a parallel `ListVectors` request, `segmentIndex` is the index of
1158
+ # the segment from which to list vectors in the current request. It
1159
+ # identifies an individual segment to be listed by an application
1160
+ # worker.
1161
+ #
1162
+ # Segment IDs are zero-based, so the first segment is always 0. For
1163
+ # example, if you want to use four application threads to list vectors
1164
+ # in a vector index, then the first thread specifies a `segmentIndex`
1165
+ # value of 0, the second thread specifies 1, and so on.
1166
+ #
1167
+ # The value of `segmentIndex` must be less than the value provided for
1168
+ # `segmentCount`.
1169
+ #
1170
+ # If you provide `segmentIndex`, you must also provide `segmentCount`.
1171
+ #
1172
+ # @option params [Boolean] :return_data
1173
+ # If true, the vector data of each vector will be included in the
1174
+ # response. The default value is `false`.
1175
+ #
1176
+ # @option params [Boolean] :return_metadata
1177
+ # If true, the metadata associated with each vector will be included in
1178
+ # the response. The default value is `false`.
1179
+ #
1180
+ # @return [Types::ListVectorsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1181
+ #
1182
+ # * {Types::ListVectorsOutput#next_token #next_token} => String
1183
+ # * {Types::ListVectorsOutput#vectors #vectors} => Array&lt;Types::ListOutputVector&gt;
1184
+ #
1185
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1186
+ #
1187
+ # @example Request syntax with placeholder values
1188
+ #
1189
+ # resp = client.list_vectors({
1190
+ # vector_bucket_name: "VectorBucketName",
1191
+ # index_name: "IndexName",
1192
+ # index_arn: "IndexArn",
1193
+ # max_results: 1,
1194
+ # next_token: "ListVectorsNextToken",
1195
+ # segment_count: 1,
1196
+ # segment_index: 1,
1197
+ # return_data: false,
1198
+ # return_metadata: false,
1199
+ # })
1200
+ #
1201
+ # @example Response structure
1202
+ #
1203
+ # resp.next_token #=> String
1204
+ # resp.vectors #=> Array
1205
+ # resp.vectors[0].key #=> String
1206
+ # resp.vectors[0].data.float32 #=> Array
1207
+ # resp.vectors[0].data.float32[0] #=> Float
1208
+ #
1209
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/ListVectors AWS API Documentation
1210
+ #
1211
+ # @overload list_vectors(params = {})
1212
+ # @param [Hash] params ({})
1213
+ def list_vectors(params = {}, options = {})
1214
+ req = build_request(:list_vectors, params)
1215
+ req.send_request(options)
1216
+ end
1217
+
1218
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
1219
+ # S3 and is subject
1220
+ # to change.
1221
+ #
1222
+ # </note>
1223
+ #
1224
+ # Creates a bucket policy for a vector bucket. To specify the bucket,
1225
+ # you must use either the vector bucket name or the vector bucket Amazon
1226
+ # Resource Name (ARN).
1227
+ #
1228
+ # Permissions
1229
+ #
1230
+ # \: You must have the `s3vectors:PutVectorBucketPolicy` permission to
1231
+ # use this operation.
1232
+ #
1233
+ # @option params [String] :vector_bucket_name
1234
+ # The name of the vector bucket.
1235
+ #
1236
+ # @option params [String] :vector_bucket_arn
1237
+ # The Amazon Resource Name (ARN) of the vector bucket.
1238
+ #
1239
+ # @option params [required, String] :policy
1240
+ # The `JSON` that defines the policy. For more information about bucket
1241
+ # policies for S3 Vectors, see [Managing vector bucket policies][1] in
1242
+ # the *Amazon S3 User Guide*.
1243
+ #
1244
+ #
1245
+ #
1246
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-bucket-policy.html
1247
+ #
1248
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1249
+ #
1250
+ # @example Request syntax with placeholder values
1251
+ #
1252
+ # resp = client.put_vector_bucket_policy({
1253
+ # vector_bucket_name: "VectorBucketName",
1254
+ # vector_bucket_arn: "VectorBucketArn",
1255
+ # policy: "VectorBucketPolicy", # required
1256
+ # })
1257
+ #
1258
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/PutVectorBucketPolicy AWS API Documentation
1259
+ #
1260
+ # @overload put_vector_bucket_policy(params = {})
1261
+ # @param [Hash] params ({})
1262
+ def put_vector_bucket_policy(params = {}, options = {})
1263
+ req = build_request(:put_vector_bucket_policy, params)
1264
+ req.send_request(options)
1265
+ end
1266
+
1267
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
1268
+ # S3 and is subject
1269
+ # to change.
1270
+ #
1271
+ # </note>
1272
+ #
1273
+ # Adds one or more vectors to a vector index. To specify the vector
1274
+ # index, you can either use both the vector bucket name and the vector
1275
+ # index name, or use the vector index Amazon Resource Name (ARN).
1276
+ #
1277
+ # For more information about limits, see [Limitations and
1278
+ # restrictions][1] in the *Amazon S3 User Guide*.
1279
+ #
1280
+ # <note markdown="1"> When inserting vector data into your vector
1281
+ # index, you must provide
1282
+ # the vector data as `float32` (32-bit floating point) values. If you
1283
+ # pass higher-precision values to an Amazon Web Services SDK, S3 Vectors
1284
+ # converts the values to 32-bit floating point before storing them, and
1285
+ # `GetVectors`, `ListVectors`, and `QueryVectors` operations return the
1286
+ # float32 values. Different Amazon Web Services SDKs may have different
1287
+ # default numeric types, so ensure your vectors are properly formatted
1288
+ # as `float32` values regardless of which SDK you're using. For
1289
+ # example, in Python, use `numpy.float32` or explicitly cast your
1290
+ # values.
1291
+ #
1292
+ # </note>
1293
+ #
1294
+ # Permissions
1295
+ #
1296
+ # \: You must have the `s3vectors:PutVectors` permission to use this
1297
+ # operation.
1298
+ #
1299
+ #
1300
+ #
1301
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-limitations.html
1302
+ #
1303
+ # @option params [String] :vector_bucket_name
1304
+ # The name of the vector bucket that contains the vector index.
1305
+ #
1306
+ # @option params [String] :index_name
1307
+ # The name of the vector index where you want to write vectors.
1308
+ #
1309
+ # @option params [String] :index_arn
1310
+ # The ARN of the vector index where you want to write vectors.
1311
+ #
1312
+ # @option params [required, Array<Types::PutInputVector>] :vectors
1313
+ # The vectors to add to a vector index. The number of vectors in a
1314
+ # single request must not exceed the resource capacity, otherwise the
1315
+ # request will be rejected with the error `ServiceUnavailableException`
1316
+ # with the error message "Currently unable to handle the request".
1317
+ #
1318
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1319
+ #
1320
+ # @example Request syntax with placeholder values
1321
+ #
1322
+ # resp = client.put_vectors({
1323
+ # vector_bucket_name: "VectorBucketName",
1324
+ # index_name: "IndexName",
1325
+ # index_arn: "IndexArn",
1326
+ # vectors: [ # required
1327
+ # {
1328
+ # key: "VectorKey", # required
1329
+ # data: { # required
1330
+ # float32: [1.0],
1331
+ # },
1332
+ # metadata: {
1333
+ # },
1334
+ # },
1335
+ # ],
1336
+ # })
1337
+ #
1338
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/PutVectors AWS API Documentation
1339
+ #
1340
+ # @overload put_vectors(params = {})
1341
+ # @param [Hash] params ({})
1342
+ def put_vectors(params = {}, options = {})
1343
+ req = build_request(:put_vectors, params)
1344
+ req.send_request(options)
1345
+ end
1346
+
1347
+ # <note markdown="1"> Amazon S3 Vectors is in preview release for Amazon
1348
+ # S3 and is subject
1349
+ # to change.
1350
+ #
1351
+ # </note>
1352
+ #
1353
+ # Performs an approximate nearest neighbor search query in a vector
1354
+ # index using a query vector. By default, it returns the keys of
1355
+ # approximate nearest neighbors. You can optionally include the computed
1356
+ # distance (between the query vector and each vector in the response),
1357
+ # the vector data, and metadata of each vector in the response.
1358
+ #
1359
+ # To specify the vector index, you can either use both the vector
1360
+ # bucket
1361
+ # name and the vector index name, or use the vector index Amazon
1362
+ # Resource Name (ARN).
1363
+ #
1364
+ # Permissions
1365
+ #
1366
+ # \: You must have the `s3vectors:QueryVectors` permission to use this
1367
+ # operation. Additional permissions are required based on the request
1368
+ # parameters you specify:
1369
+ #
1370
+ # * With only `s3vectors:QueryVectors` permission, you can retrieve
1371
+ # vector keys of approximate nearest neighbors and computed
1372
+ # distances between these vectors. This permission is sufficient
1373
+ # only when you don't set any metadata filters and don't request
1374
+ # vector data or metadata (by keeping the `returnMetadata` parameter
1375
+ # set to `false` or not specified).
1376
+ #
1377
+ # * If you specify a metadata filter or set `returnMetadata` to true,
1378
+ # you must have both `s3vectors:QueryVectors` and
1379
+ # `s3vectors:GetVectors` permissions. The request fails with a `403
1380
+ # Forbidden error` if you request metadata filtering, vector data,
1381
+ # or metadata without the `s3vectors:GetVectors` permission.
1382
+ #
1383
+ # @option params [String] :vector_bucket_name
1384
+ # The name of the vector bucket that contains the vector index.
1385
+ #
1386
+ # @option params [String] :index_name
1387
+ # The name of the vector index that you want to query.
1388
+ #
1389
+ # @option params [String] :index_arn
1390
+ # The ARN of the vector index that you want to query.
1391
+ #
1392
+ # @option params [required, Integer] :top_k
1393
+ # The number of results to return for each query.
1394
+ #
1395
+ # @option params [required, Types::VectorData] :query_vector
1396
+ # The query vector. Ensure that the query vector has the same dimension
1397
+ # as the dimension of the vector index that's being queried. For
1398
+ # example, if your vector index contains vectors with 384 dimensions,
1399
+ # your query vector must also have 384 dimensions.
1400
+ #
1401
+ # @option params [Hash,Array,String,Numeric,Boolean] :filter
1402
+ # Metadata filter to apply during the query. For more information about
1403
+ # metadata keys, see [Metadata filtering][1] in the *Amazon S3 User
1404
+ # Guide*.
1405
+ #
1406
+ # Document type used to carry open content
1407
+ # (Hash,Array,String,Numeric,Boolean). A document type value is
1408
+ # serialized using the same format as its surroundings and requires no
1409
+ # additional encoding or escaping.
1410
+ #
1411
+ #
1412
+ #
1413
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-metadata-filtering.html
1414
+ #
1415
+ # @option params [Boolean] :return_metadata
1416
+ # Indicates whether to include metadata in the response. The default
1417
+ # value is `false`.
1418
+ #
1419
+ # @option params [Boolean] :return_distance
1420
+ # Indicates whether to include the computed distance in the response.
1421
+ # The default value is `false`.
1422
+ #
1423
+ # @return [Types::QueryVectorsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1424
+ #
1425
+ # * {Types::QueryVectorsOutput#vectors #vectors} => Array&lt;Types::QueryOutputVector&gt;
1426
+ #
1427
+ # @example Request syntax with placeholder values
1428
+ #
1429
+ # resp = client.query_vectors({
1430
+ # vector_bucket_name: "VectorBucketName",
1431
+ # index_name: "IndexName",
1432
+ # index_arn: "IndexArn",
1433
+ # top_k: 1, # required
1434
+ # query_vector: { # required
1435
+ # float32: [1.0],
1436
+ # },
1437
+ # filter: {
1438
+ # },
1439
+ # return_metadata: false,
1440
+ # return_distance: false,
1441
+ # })
1442
+ #
1443
+ # @example Response structure
1444
+ #
1445
+ # resp.vectors #=> Array
1446
+ # resp.vectors[0].key #=> String
1447
+ # resp.vectors[0].data.float32 #=> Array
1448
+ # resp.vectors[0].data.float32[0] #=> Float
1449
+ # resp.vectors[0].distance #=> Float
1450
+ #
1451
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3vectors-2025-07-15/QueryVectors AWS API Documentation
1452
+ #
1453
+ # @overload query_vectors(params = {})
1454
+ # @param [Hash] params ({})
1455
+ def query_vectors(params = {}, options = {})
1456
+ req = build_request(:query_vectors, params)
1457
+ req.send_request(options)
1458
+ end
1459
+
1460
+ # @!endgroup
1461
+
1462
+ # @param params ({})
1463
+ # @api private
1464
+ def build_request(operation_name, params = {})
1465
+ handlers = @handlers.for(operation_name)
1466
+ tracer = config.telemetry_provider.tracer_provider.tracer(
1467
+ Aws::Telemetry.module_to_tracer_name('Aws::S3Vectors')
1468
+ )
1469
+ context = Seahorse::Client::RequestContext.new(
1470
+ operation_name: operation_name,
1471
+ operation: config.api.operation(operation_name),
1472
+ client: self,
1473
+ params: params,
1474
+ config: config,
1475
+ tracer: tracer
1476
+ )
1477
+ context[:gem_name] = 'aws-sdk-s3vectors'
1478
+ context[:gem_version] = '1.0.0'
1479
+ Seahorse::Client::Request.new(handlers, context)
1480
+ end
1481
+
1482
+ # @api private
1483
+ # @deprecated
1484
+ def waiter_names
1485
+ []
1486
+ end
1487
+
1488
+ class << self
1489
+
1490
+ # @api private
1491
+ attr_reader :identifier
1492
+
1493
+ # @api private
1494
+ def errors_module
1495
+ Errors
1496
+ end
1497
+
1498
+ end
1499
+ end
1500
+ end