aws-sdk-kendraranking 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,817 @@
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.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
32
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
35
+
36
+ Aws::Plugins::GlobalConfiguration.add_identifier(:kendraranking)
37
+
38
+ module Aws::KendraRanking
39
+ # An API client for KendraRanking. To construct a client, you need to configure a `:region` and `:credentials`.
40
+ #
41
+ # client = Aws::KendraRanking::Client.new(
42
+ # region: region_name,
43
+ # credentials: credentials,
44
+ # # ...
45
+ # )
46
+ #
47
+ # For details on configuring region and credentials see
48
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
49
+ #
50
+ # See {#initialize} for a full list of supported configuration options.
51
+ class Client < Seahorse::Client::Base
52
+
53
+ include Aws::ClientStubs
54
+
55
+ @identifier = :kendraranking
56
+
57
+ set_api(ClientApi::API)
58
+
59
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
60
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
61
+ add_plugin(Aws::Plugins::Logging)
62
+ add_plugin(Aws::Plugins::ParamConverter)
63
+ add_plugin(Aws::Plugins::ParamValidator)
64
+ add_plugin(Aws::Plugins::UserAgent)
65
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
66
+ add_plugin(Aws::Plugins::RetryErrors)
67
+ add_plugin(Aws::Plugins::GlobalConfiguration)
68
+ add_plugin(Aws::Plugins::RegionalEndpoint)
69
+ add_plugin(Aws::Plugins::EndpointDiscovery)
70
+ add_plugin(Aws::Plugins::EndpointPattern)
71
+ add_plugin(Aws::Plugins::ResponsePaging)
72
+ add_plugin(Aws::Plugins::StubResponses)
73
+ add_plugin(Aws::Plugins::IdempotencyToken)
74
+ add_plugin(Aws::Plugins::JsonvalueConverter)
75
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
76
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
77
+ add_plugin(Aws::Plugins::TransferEncoding)
78
+ add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
+ add_plugin(Aws::Plugins::DefaultsMode)
81
+ add_plugin(Aws::Plugins::RecursionDetection)
82
+ add_plugin(Aws::Plugins::Sign)
83
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
84
+ add_plugin(Aws::KendraRanking::Plugins::Endpoints)
85
+
86
+ # @overload initialize(options)
87
+ # @param [Hash] options
88
+ # @option options [required, Aws::CredentialProvider] :credentials
89
+ # Your AWS credentials. This can be an instance of any one of the
90
+ # following classes:
91
+ #
92
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
93
+ # credentials.
94
+ #
95
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
96
+ # shared file, such as `~/.aws/config`.
97
+ #
98
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
99
+ #
100
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
101
+ # assume a role after providing credentials via the web.
102
+ #
103
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
104
+ # access token generated from `aws login`.
105
+ #
106
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
107
+ # process that outputs to stdout.
108
+ #
109
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
110
+ # from an EC2 IMDS on an EC2 instance.
111
+ #
112
+ # * `Aws::ECSCredentials` - Used for loading credentials from
113
+ # instances running in ECS.
114
+ #
115
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
116
+ # from the Cognito Identity service.
117
+ #
118
+ # When `:credentials` are not configured directly, the following
119
+ # locations will be searched for credentials:
120
+ #
121
+ # * `Aws.config[:credentials]`
122
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
123
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
124
+ # * `~/.aws/credentials`
125
+ # * `~/.aws/config`
126
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
127
+ # are very aggressive. Construct and pass an instance of
128
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
129
+ # enable retries and extended timeouts. Instance profile credential
130
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
131
+ # to true.
132
+ #
133
+ # @option options [required, String] :region
134
+ # The AWS region to connect to. The configured `:region` is
135
+ # used to determine the service `:endpoint`. When not passed,
136
+ # a default `:region` is searched for in the following locations:
137
+ #
138
+ # * `Aws.config[:region]`
139
+ # * `ENV['AWS_REGION']`
140
+ # * `ENV['AMAZON_REGION']`
141
+ # * `ENV['AWS_DEFAULT_REGION']`
142
+ # * `~/.aws/credentials`
143
+ # * `~/.aws/config`
144
+ #
145
+ # @option options [String] :access_key_id
146
+ #
147
+ # @option options [Boolean] :active_endpoint_cache (false)
148
+ # When set to `true`, a thread polling for endpoints will be running in
149
+ # the background every 60 secs (default). Defaults to `false`.
150
+ #
151
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
152
+ # Used only in `adaptive` retry mode. When true, the request will sleep
153
+ # until there is sufficent client side capacity to retry the request.
154
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
155
+ # not retry instead of sleeping.
156
+ #
157
+ # @option options [Boolean] :client_side_monitoring (false)
158
+ # When `true`, client-side metrics will be collected for all API requests from
159
+ # this client.
160
+ #
161
+ # @option options [String] :client_side_monitoring_client_id ("")
162
+ # Allows you to provide an identifier for this client which will be attached to
163
+ # all generated client side metrics. Defaults to an empty string.
164
+ #
165
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
166
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
167
+ # side monitoring agent is running on, where client metrics will be published via UDP.
168
+ #
169
+ # @option options [Integer] :client_side_monitoring_port (31000)
170
+ # Required for publishing client metrics. The port that the client side monitoring
171
+ # agent is running on, where client metrics will be published via UDP.
172
+ #
173
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
174
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
175
+ # will use the Client Side Monitoring Agent Publisher.
176
+ #
177
+ # @option options [Boolean] :convert_params (true)
178
+ # When `true`, an attempt is made to coerce request parameters into
179
+ # the required types.
180
+ #
181
+ # @option options [Boolean] :correct_clock_skew (true)
182
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
183
+ # a clock skew correction and retry requests with skewed client clocks.
184
+ #
185
+ # @option options [String] :defaults_mode ("legacy")
186
+ # See {Aws::DefaultsModeConfiguration} for a list of the
187
+ # accepted modes and the configuration defaults that are included.
188
+ #
189
+ # @option options [Boolean] :disable_host_prefix_injection (false)
190
+ # Set to true to disable SDK automatically adding host prefix
191
+ # to default service endpoint when available.
192
+ #
193
+ # @option options [String] :endpoint
194
+ # The client endpoint is normally constructed from the `:region`
195
+ # option. You should only configure an `:endpoint` when connecting
196
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
197
+ #
198
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
199
+ # Used for the maximum size limit of the LRU cache storing endpoints data
200
+ # for endpoint discovery enabled operations. Defaults to 1000.
201
+ #
202
+ # @option options [Integer] :endpoint_cache_max_threads (10)
203
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
204
+ #
205
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
206
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
207
+ # Use this option to config the time interval in seconds for making
208
+ # requests fetching endpoints information. Defaults to 60 sec.
209
+ #
210
+ # @option options [Boolean] :endpoint_discovery (false)
211
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
212
+ #
213
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
214
+ # The log formatter.
215
+ #
216
+ # @option options [Symbol] :log_level (:info)
217
+ # The log level to send messages to the `:logger` at.
218
+ #
219
+ # @option options [Logger] :logger
220
+ # The Logger instance to send log messages to. If this option
221
+ # is not set, logging will be disabled.
222
+ #
223
+ # @option options [Integer] :max_attempts (3)
224
+ # An integer representing the maximum number attempts that will be made for
225
+ # a single request, including the initial attempt. For example,
226
+ # setting this value to 5 will result in a request being retried up to
227
+ # 4 times. Used in `standard` and `adaptive` retry modes.
228
+ #
229
+ # @option options [String] :profile ("default")
230
+ # Used when loading credentials from the shared credentials file
231
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
232
+ #
233
+ # @option options [Proc] :retry_backoff
234
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
235
+ # This option is only used in the `legacy` retry mode.
236
+ #
237
+ # @option options [Float] :retry_base_delay (0.3)
238
+ # The base delay in seconds used by the default backoff function. This option
239
+ # is only used in the `legacy` retry mode.
240
+ #
241
+ # @option options [Symbol] :retry_jitter (:none)
242
+ # A delay randomiser function used by the default backoff function.
243
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
244
+ # otherwise a Proc that takes and returns a number. This option is only used
245
+ # in the `legacy` retry mode.
246
+ #
247
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
248
+ #
249
+ # @option options [Integer] :retry_limit (3)
250
+ # The maximum number of times to retry failed requests. Only
251
+ # ~ 500 level server errors and certain ~ 400 level client errors
252
+ # are retried. Generally, these are throttling errors, data
253
+ # checksum errors, networking errors, timeout errors, auth errors,
254
+ # endpoint discovery, and errors from expired credentials.
255
+ # This option is only used in the `legacy` retry mode.
256
+ #
257
+ # @option options [Integer] :retry_max_delay (0)
258
+ # The maximum number of seconds to delay between retries (0 for no limit)
259
+ # used by the default backoff function. This option is only used in the
260
+ # `legacy` retry mode.
261
+ #
262
+ # @option options [String] :retry_mode ("legacy")
263
+ # Specifies which retry algorithm to use. Values are:
264
+ #
265
+ # * `legacy` - The pre-existing retry behavior. This is default value if
266
+ # no retry mode is provided.
267
+ #
268
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
269
+ # This includes support for retry quotas, which limit the number of
270
+ # unsuccessful retries a client can make.
271
+ #
272
+ # * `adaptive` - An experimental retry mode that includes all the
273
+ # functionality of `standard` mode along with automatic client side
274
+ # throttling. This is a provisional mode that may change behavior
275
+ # in the future.
276
+ #
277
+ #
278
+ # @option options [String] :secret_access_key
279
+ #
280
+ # @option options [String] :session_token
281
+ #
282
+ # @option options [Boolean] :simple_json (false)
283
+ # Disables request parameter conversion, validation, and formatting.
284
+ # Also disable response data type conversions. This option is useful
285
+ # when you want to ensure the highest level of performance by
286
+ # avoiding overhead of walking request parameters and response data
287
+ # structures.
288
+ #
289
+ # When `:simple_json` is enabled, the request parameters hash must
290
+ # be formatted exactly as the DynamoDB API expects.
291
+ #
292
+ # @option options [Boolean] :stub_responses (false)
293
+ # Causes the client to return stubbed responses. By default
294
+ # fake responses are generated and returned. You can specify
295
+ # the response data to return or errors to raise by calling
296
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
297
+ #
298
+ # ** Please note ** When response stubbing is enabled, no HTTP
299
+ # requests are made, and retries are disabled.
300
+ #
301
+ # @option options [Aws::TokenProvider] :token_provider
302
+ # A Bearer Token Provider. This can be an instance of any one of the
303
+ # following classes:
304
+ #
305
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
306
+ # tokens.
307
+ #
308
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
309
+ # access token generated from `aws login`.
310
+ #
311
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
312
+ # will be used to search for tokens configured for your profile in shared configuration files.
313
+ #
314
+ # @option options [Boolean] :use_dualstack_endpoint
315
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
316
+ # will be used if available.
317
+ #
318
+ # @option options [Boolean] :use_fips_endpoint
319
+ # When set to `true`, fips compatible endpoints will be used if available.
320
+ # When a `fips` region is used, the region is normalized and this config
321
+ # is set to `true`.
322
+ #
323
+ # @option options [Boolean] :validate_params (true)
324
+ # When `true`, request parameters are validated before
325
+ # sending the request.
326
+ #
327
+ # @option options [Aws::KendraRanking::EndpointProvider] :endpoint_provider
328
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::KendraRanking::EndpointParameters`
329
+ #
330
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
331
+ # requests through. Formatted like 'http://proxy.com:123'.
332
+ #
333
+ # @option options [Float] :http_open_timeout (15) The number of
334
+ # seconds to wait when opening a HTTP session before raising a
335
+ # `Timeout::Error`.
336
+ #
337
+ # @option options [Float] :http_read_timeout (60) The default
338
+ # number of seconds to wait for response data. This value can
339
+ # safely be set per-request on the session.
340
+ #
341
+ # @option options [Float] :http_idle_timeout (5) The number of
342
+ # seconds a connection is allowed to sit idle before it is
343
+ # considered stale. Stale connections are closed and removed
344
+ # from the pool before making a request.
345
+ #
346
+ # @option options [Float] :http_continue_timeout (1) The number of
347
+ # seconds to wait for a 100-continue response before sending the
348
+ # request body. This option has no effect unless the request has
349
+ # "Expect" header set to "100-continue". Defaults to `nil` which
350
+ # disables this behaviour. This value can safely be set per
351
+ # request on the session.
352
+ #
353
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
354
+ # in seconds.
355
+ #
356
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
357
+ # HTTP debug output will be sent to the `:logger`.
358
+ #
359
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
360
+ # SSL peer certificates are verified when establishing a
361
+ # connection.
362
+ #
363
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
364
+ # certificate authority bundle file that should be used when
365
+ # verifying peer certificates. If you do not pass
366
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
367
+ # will be used if available.
368
+ #
369
+ # @option options [String] :ssl_ca_directory Full path of the
370
+ # directory that contains the unbundled SSL certificate
371
+ # authority files for verifying peer certificates. If you do
372
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
373
+ # system default will be used if available.
374
+ #
375
+ def initialize(*args)
376
+ super
377
+ end
378
+
379
+ # @!group API Operations
380
+
381
+ # Creates a rescore execution plan. A rescore execution plan is an
382
+ # Amazon Kendra Intelligent Ranking resource used for provisioning the
383
+ # `Rescore` API. You set the number of capacity units that you require
384
+ # for Amazon Kendra Intelligent Ranking to rescore or re-rank a search
385
+ # service's results.
386
+ #
387
+ # For an example of using the `CreateRescoreExecutionPlan` API,
388
+ # including using the Python and Java SDKs, see [Semantically ranking a
389
+ # search service's results][1].
390
+ #
391
+ #
392
+ #
393
+ # [1]: https://docs.aws.amazon.com/kendra/latest/dg/search-service-rerank.html
394
+ #
395
+ # @option params [required, String] :name
396
+ # A name for the rescore execution plan.
397
+ #
398
+ # @option params [String] :description
399
+ # A description for the rescore execution plan.
400
+ #
401
+ # @option params [Types::CapacityUnitsConfiguration] :capacity_units
402
+ # You can set additional capacity units to meet the needs of your
403
+ # rescore execution plan. You are given a single capacity unit by
404
+ # default. If you want to use the default capacity, you don't set
405
+ # additional capacity units. For more information on the default
406
+ # capacity and additional capacity units, see [Adjusting capacity][1].
407
+ #
408
+ #
409
+ #
410
+ # [1]: https://docs.aws.amazon.com/kendra/latest/dg/adjusting-capacity.html
411
+ #
412
+ # @option params [Array<Types::Tag>] :tags
413
+ # A list of key-value pairs that identify or categorize your rescore
414
+ # execution plan. You can also use tags to help control access to the
415
+ # rescore execution plan. Tag keys and values can consist of Unicode
416
+ # letters, digits, white space, and any of the following symbols: \_ . :
417
+ # / = + - @.
418
+ #
419
+ # @option params [String] :client_token
420
+ # A token that you provide to identify the request to create a rescore
421
+ # execution plan. Multiple calls to the
422
+ # `CreateRescoreExecutionPlanRequest` API with the same client token
423
+ # will create only one rescore execution plan.
424
+ #
425
+ # **A suitable default value is auto-generated.** You should normally
426
+ # not need to pass this option.**
427
+ #
428
+ # @return [Types::CreateRescoreExecutionPlanResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
429
+ #
430
+ # * {Types::CreateRescoreExecutionPlanResponse#id #id} => String
431
+ # * {Types::CreateRescoreExecutionPlanResponse#arn #arn} => String
432
+ #
433
+ # @example Request syntax with placeholder values
434
+ #
435
+ # resp = client.create_rescore_execution_plan({
436
+ # name: "RescoreExecutionPlanName", # required
437
+ # description: "Description",
438
+ # capacity_units: {
439
+ # rescore_capacity_units: 1, # required
440
+ # },
441
+ # tags: [
442
+ # {
443
+ # key: "TagKey", # required
444
+ # value: "TagValue", # required
445
+ # },
446
+ # ],
447
+ # client_token: "ClientTokenName",
448
+ # })
449
+ #
450
+ # @example Response structure
451
+ #
452
+ # resp.id #=> String
453
+ # resp.arn #=> String
454
+ #
455
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/CreateRescoreExecutionPlan AWS API Documentation
456
+ #
457
+ # @overload create_rescore_execution_plan(params = {})
458
+ # @param [Hash] params ({})
459
+ def create_rescore_execution_plan(params = {}, options = {})
460
+ req = build_request(:create_rescore_execution_plan, params)
461
+ req.send_request(options)
462
+ end
463
+
464
+ # Deletes a rescore execution plan. A rescore execution plan is an
465
+ # Amazon Kendra Intelligent Ranking resource used for provisioning the
466
+ # `Rescore` API.
467
+ #
468
+ # @option params [required, String] :id
469
+ # The identifier of the rescore execution plan that you want to delete.
470
+ #
471
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
472
+ #
473
+ # @example Request syntax with placeholder values
474
+ #
475
+ # resp = client.delete_rescore_execution_plan({
476
+ # id: "RescoreExecutionPlanId", # required
477
+ # })
478
+ #
479
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/DeleteRescoreExecutionPlan AWS API Documentation
480
+ #
481
+ # @overload delete_rescore_execution_plan(params = {})
482
+ # @param [Hash] params ({})
483
+ def delete_rescore_execution_plan(params = {}, options = {})
484
+ req = build_request(:delete_rescore_execution_plan, params)
485
+ req.send_request(options)
486
+ end
487
+
488
+ # Gets information about a rescore execution plan. A rescore execution
489
+ # plan is an Amazon Kendra Intelligent Ranking resource used for
490
+ # provisioning the `Rescore` API.
491
+ #
492
+ # @option params [required, String] :id
493
+ # The identifier of the rescore execution plan that you want to get
494
+ # information on.
495
+ #
496
+ # @return [Types::DescribeRescoreExecutionPlanResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
497
+ #
498
+ # * {Types::DescribeRescoreExecutionPlanResponse#id #id} => String
499
+ # * {Types::DescribeRescoreExecutionPlanResponse#arn #arn} => String
500
+ # * {Types::DescribeRescoreExecutionPlanResponse#name #name} => String
501
+ # * {Types::DescribeRescoreExecutionPlanResponse#description #description} => String
502
+ # * {Types::DescribeRescoreExecutionPlanResponse#capacity_units #capacity_units} => Types::CapacityUnitsConfiguration
503
+ # * {Types::DescribeRescoreExecutionPlanResponse#created_at #created_at} => Time
504
+ # * {Types::DescribeRescoreExecutionPlanResponse#updated_at #updated_at} => Time
505
+ # * {Types::DescribeRescoreExecutionPlanResponse#status #status} => String
506
+ # * {Types::DescribeRescoreExecutionPlanResponse#error_message #error_message} => String
507
+ #
508
+ # @example Request syntax with placeholder values
509
+ #
510
+ # resp = client.describe_rescore_execution_plan({
511
+ # id: "RescoreExecutionPlanId", # required
512
+ # })
513
+ #
514
+ # @example Response structure
515
+ #
516
+ # resp.id #=> String
517
+ # resp.arn #=> String
518
+ # resp.name #=> String
519
+ # resp.description #=> String
520
+ # resp.capacity_units.rescore_capacity_units #=> Integer
521
+ # resp.created_at #=> Time
522
+ # resp.updated_at #=> Time
523
+ # resp.status #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED"
524
+ # resp.error_message #=> String
525
+ #
526
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/DescribeRescoreExecutionPlan AWS API Documentation
527
+ #
528
+ # @overload describe_rescore_execution_plan(params = {})
529
+ # @param [Hash] params ({})
530
+ def describe_rescore_execution_plan(params = {}, options = {})
531
+ req = build_request(:describe_rescore_execution_plan, params)
532
+ req.send_request(options)
533
+ end
534
+
535
+ # Lists your rescore execution plans. A rescore execution plan is an
536
+ # Amazon Kendra Intelligent Ranking resource used for provisioning the
537
+ # `Rescore` API.
538
+ #
539
+ # @option params [String] :next_token
540
+ # If the response is truncated, Amazon Kendra Intelligent Ranking
541
+ # returns a pagination token in the response. You can use this
542
+ # pagination token to retrieve the next set of rescore execution plans.
543
+ #
544
+ # @option params [Integer] :max_results
545
+ # The maximum number of rescore execution plans to return.
546
+ #
547
+ # @return [Types::ListRescoreExecutionPlansResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
548
+ #
549
+ # * {Types::ListRescoreExecutionPlansResponse#summary_items #summary_items} => Array&lt;Types::RescoreExecutionPlanSummary&gt;
550
+ # * {Types::ListRescoreExecutionPlansResponse#next_token #next_token} => String
551
+ #
552
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
553
+ #
554
+ # @example Request syntax with placeholder values
555
+ #
556
+ # resp = client.list_rescore_execution_plans({
557
+ # next_token: "NextToken",
558
+ # max_results: 1,
559
+ # })
560
+ #
561
+ # @example Response structure
562
+ #
563
+ # resp.summary_items #=> Array
564
+ # resp.summary_items[0].name #=> String
565
+ # resp.summary_items[0].id #=> String
566
+ # resp.summary_items[0].created_at #=> Time
567
+ # resp.summary_items[0].updated_at #=> Time
568
+ # resp.summary_items[0].status #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED"
569
+ # resp.next_token #=> String
570
+ #
571
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/ListRescoreExecutionPlans AWS API Documentation
572
+ #
573
+ # @overload list_rescore_execution_plans(params = {})
574
+ # @param [Hash] params ({})
575
+ def list_rescore_execution_plans(params = {}, options = {})
576
+ req = build_request(:list_rescore_execution_plans, params)
577
+ req.send_request(options)
578
+ end
579
+
580
+ # Gets a list of tags associated with a specified resource. A rescore
581
+ # execution plan is an example of a resource that can have tags
582
+ # associated with it.
583
+ #
584
+ # @option params [required, String] :resource_arn
585
+ # The Amazon Resource Name (ARN) of the rescore execution plan to get a
586
+ # list of tags for.
587
+ #
588
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
589
+ #
590
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Array&lt;Types::Tag&gt;
591
+ #
592
+ # @example Request syntax with placeholder values
593
+ #
594
+ # resp = client.list_tags_for_resource({
595
+ # resource_arn: "AmazonResourceName", # required
596
+ # })
597
+ #
598
+ # @example Response structure
599
+ #
600
+ # resp.tags #=> Array
601
+ # resp.tags[0].key #=> String
602
+ # resp.tags[0].value #=> String
603
+ #
604
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/ListTagsForResource AWS API Documentation
605
+ #
606
+ # @overload list_tags_for_resource(params = {})
607
+ # @param [Hash] params ({})
608
+ def list_tags_for_resource(params = {}, options = {})
609
+ req = build_request(:list_tags_for_resource, params)
610
+ req.send_request(options)
611
+ end
612
+
613
+ # Rescores or re-ranks search results from a search service such as
614
+ # OpenSearch (self managed). You use the semantic search capabilities of
615
+ # Amazon Kendra Intelligent Ranking to improve the search service's
616
+ # results.
617
+ #
618
+ # @option params [required, String] :rescore_execution_plan_id
619
+ # The identifier of the rescore execution plan. A rescore execution plan
620
+ # is an Amazon Kendra Intelligent Ranking resource used for provisioning
621
+ # the `Rescore` API.
622
+ #
623
+ # @option params [required, String] :search_query
624
+ # The input query from the search service.
625
+ #
626
+ # @option params [required, Array<Types::Document>] :documents
627
+ # The list of documents for Amazon Kendra Intelligent Ranking to rescore
628
+ # or rank on.
629
+ #
630
+ # @return [Types::RescoreResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
631
+ #
632
+ # * {Types::RescoreResult#rescore_id #rescore_id} => String
633
+ # * {Types::RescoreResult#result_items #result_items} => Array&lt;Types::RescoreResultItem&gt;
634
+ #
635
+ # @example Request syntax with placeholder values
636
+ #
637
+ # resp = client.rescore({
638
+ # rescore_execution_plan_id: "RescoreExecutionPlanId", # required
639
+ # search_query: "SearchQuery", # required
640
+ # documents: [ # required
641
+ # {
642
+ # id: "DocumentId", # required
643
+ # group_id: "GroupId",
644
+ # title: "DocumentTitle",
645
+ # body: "DocumentBody",
646
+ # tokenized_title: ["Tokens"],
647
+ # tokenized_body: ["Tokens"],
648
+ # original_score: 1.0, # required
649
+ # },
650
+ # ],
651
+ # })
652
+ #
653
+ # @example Response structure
654
+ #
655
+ # resp.rescore_id #=> String
656
+ # resp.result_items #=> Array
657
+ # resp.result_items[0].document_id #=> String
658
+ # resp.result_items[0].score #=> Float
659
+ #
660
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/Rescore AWS API Documentation
661
+ #
662
+ # @overload rescore(params = {})
663
+ # @param [Hash] params ({})
664
+ def rescore(params = {}, options = {})
665
+ req = build_request(:rescore, params)
666
+ req.send_request(options)
667
+ end
668
+
669
+ # Adds a specified tag to a specified rescore execution plan. A rescore
670
+ # execution plan is an Amazon Kendra Intelligent Ranking resource used
671
+ # for provisioning the `Rescore` API. If the tag already exists, the
672
+ # existing value is replaced with the new value.
673
+ #
674
+ # @option params [required, String] :resource_arn
675
+ # The Amazon Resource Name (ARN) of the rescore execution plan to tag.
676
+ #
677
+ # @option params [required, Array<Types::Tag>] :tags
678
+ # A list of tag keys to add to a rescore execution plan. If a tag
679
+ # already exists, the existing value is replaced with the new value.
680
+ #
681
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
682
+ #
683
+ # @example Request syntax with placeholder values
684
+ #
685
+ # resp = client.tag_resource({
686
+ # resource_arn: "AmazonResourceName", # required
687
+ # tags: [ # required
688
+ # {
689
+ # key: "TagKey", # required
690
+ # value: "TagValue", # required
691
+ # },
692
+ # ],
693
+ # })
694
+ #
695
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/TagResource AWS API Documentation
696
+ #
697
+ # @overload tag_resource(params = {})
698
+ # @param [Hash] params ({})
699
+ def tag_resource(params = {}, options = {})
700
+ req = build_request(:tag_resource, params)
701
+ req.send_request(options)
702
+ end
703
+
704
+ # Removes a tag from a rescore execution plan. A rescore execution plan
705
+ # is an Amazon Kendra Intelligent Ranking resource used for provisioning
706
+ # the `Rescore` operation.
707
+ #
708
+ # @option params [required, String] :resource_arn
709
+ # The Amazon Resource Name (ARN) of the rescore execution plan to remove
710
+ # the tag.
711
+ #
712
+ # @option params [required, Array<String>] :tag_keys
713
+ # A list of tag keys to remove from the rescore execution plan. If a tag
714
+ # key does not exist on the resource, it is ignored.
715
+ #
716
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
717
+ #
718
+ # @example Request syntax with placeholder values
719
+ #
720
+ # resp = client.untag_resource({
721
+ # resource_arn: "AmazonResourceName", # required
722
+ # tag_keys: ["TagKey"], # required
723
+ # })
724
+ #
725
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/UntagResource AWS API Documentation
726
+ #
727
+ # @overload untag_resource(params = {})
728
+ # @param [Hash] params ({})
729
+ def untag_resource(params = {}, options = {})
730
+ req = build_request(:untag_resource, params)
731
+ req.send_request(options)
732
+ end
733
+
734
+ # Updates a rescore execution plan. A rescore execution plan is an
735
+ # Amazon Kendra Intelligent Ranking resource used for provisioning the
736
+ # `Rescore` API. You can update the number of capacity units you require
737
+ # for Amazon Kendra Intelligent Ranking to rescore or re-rank a search
738
+ # service's results.
739
+ #
740
+ # @option params [required, String] :id
741
+ # The identifier of the rescore execution plan that you want to update.
742
+ #
743
+ # @option params [String] :name
744
+ # A new name for the rescore execution plan.
745
+ #
746
+ # @option params [String] :description
747
+ # A new description for the rescore execution plan.
748
+ #
749
+ # @option params [Types::CapacityUnitsConfiguration] :capacity_units
750
+ # You can set additional capacity units to meet the needs of your
751
+ # rescore execution plan. You are given a single capacity unit by
752
+ # default. If you want to use the default capacity, you don't set
753
+ # additional capacity units. For more information on the default
754
+ # capacity and additional capacity units, see [Adjusting capacity][1].
755
+ #
756
+ #
757
+ #
758
+ # [1]: https://docs.aws.amazon.com/kendra/latest/dg/adjusting-capacity.html
759
+ #
760
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
761
+ #
762
+ # @example Request syntax with placeholder values
763
+ #
764
+ # resp = client.update_rescore_execution_plan({
765
+ # id: "RescoreExecutionPlanId", # required
766
+ # name: "RescoreExecutionPlanName",
767
+ # description: "Description",
768
+ # capacity_units: {
769
+ # rescore_capacity_units: 1, # required
770
+ # },
771
+ # })
772
+ #
773
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kendra-ranking-2022-10-19/UpdateRescoreExecutionPlan AWS API Documentation
774
+ #
775
+ # @overload update_rescore_execution_plan(params = {})
776
+ # @param [Hash] params ({})
777
+ def update_rescore_execution_plan(params = {}, options = {})
778
+ req = build_request(:update_rescore_execution_plan, params)
779
+ req.send_request(options)
780
+ end
781
+
782
+ # @!endgroup
783
+
784
+ # @param params ({})
785
+ # @api private
786
+ def build_request(operation_name, params = {})
787
+ handlers = @handlers.for(operation_name)
788
+ context = Seahorse::Client::RequestContext.new(
789
+ operation_name: operation_name,
790
+ operation: config.api.operation(operation_name),
791
+ client: self,
792
+ params: params,
793
+ config: config)
794
+ context[:gem_name] = 'aws-sdk-kendraranking'
795
+ context[:gem_version] = '1.0.0'
796
+ Seahorse::Client::Request.new(handlers, context)
797
+ end
798
+
799
+ # @api private
800
+ # @deprecated
801
+ def waiter_names
802
+ []
803
+ end
804
+
805
+ class << self
806
+
807
+ # @api private
808
+ attr_reader :identifier
809
+
810
+ # @api private
811
+ def errors_module
812
+ Errors
813
+ end
814
+
815
+ end
816
+ end
817
+ end