aws-sdk-bedrockagent 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,2675 @@
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/request_compression.rb'
32
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
33
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
34
+ require 'aws-sdk-core/plugins/sign.rb'
35
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
36
+
37
+ Aws::Plugins::GlobalConfiguration.add_identifier(:bedrockagent)
38
+
39
+ module Aws::BedrockAgent
40
+ # An API client for BedrockAgent. To construct a client, you need to configure a `:region` and `:credentials`.
41
+ #
42
+ # client = Aws::BedrockAgent::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 = :bedrockagent
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::JsonvalueConverter)
76
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
77
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
78
+ add_plugin(Aws::Plugins::TransferEncoding)
79
+ add_plugin(Aws::Plugins::HttpChecksum)
80
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
81
+ add_plugin(Aws::Plugins::RequestCompression)
82
+ add_plugin(Aws::Plugins::DefaultsMode)
83
+ add_plugin(Aws::Plugins::RecursionDetection)
84
+ add_plugin(Aws::Plugins::Sign)
85
+ add_plugin(Aws::Plugins::Protocols::RestJson)
86
+ add_plugin(Aws::BedrockAgent::Plugins::Endpoints)
87
+
88
+ # @overload initialize(options)
89
+ # @param [Hash] options
90
+ # @option options [required, Aws::CredentialProvider] :credentials
91
+ # Your AWS credentials. This can be an instance of any one of the
92
+ # following classes:
93
+ #
94
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
95
+ # credentials.
96
+ #
97
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
98
+ # shared file, such as `~/.aws/config`.
99
+ #
100
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
101
+ #
102
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
103
+ # assume a role after providing credentials via the web.
104
+ #
105
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
106
+ # access token generated from `aws login`.
107
+ #
108
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
109
+ # process that outputs to stdout.
110
+ #
111
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
112
+ # from an EC2 IMDS on an EC2 instance.
113
+ #
114
+ # * `Aws::ECSCredentials` - Used for loading credentials from
115
+ # instances running in ECS.
116
+ #
117
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
118
+ # from the Cognito Identity service.
119
+ #
120
+ # When `:credentials` are not configured directly, the following
121
+ # locations will be searched for credentials:
122
+ #
123
+ # * `Aws.config[:credentials]`
124
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
125
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
126
+ # * `~/.aws/credentials`
127
+ # * `~/.aws/config`
128
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
129
+ # are very aggressive. Construct and pass an instance of
130
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
131
+ # enable retries and extended timeouts. Instance profile credential
132
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
133
+ # to true.
134
+ #
135
+ # @option options [required, String] :region
136
+ # The AWS region to connect to. The configured `:region` is
137
+ # used to determine the service `:endpoint`. When not passed,
138
+ # a default `:region` is searched for in the following locations:
139
+ #
140
+ # * `Aws.config[:region]`
141
+ # * `ENV['AWS_REGION']`
142
+ # * `ENV['AMAZON_REGION']`
143
+ # * `ENV['AWS_DEFAULT_REGION']`
144
+ # * `~/.aws/credentials`
145
+ # * `~/.aws/config`
146
+ #
147
+ # @option options [String] :access_key_id
148
+ #
149
+ # @option options [Boolean] :active_endpoint_cache (false)
150
+ # When set to `true`, a thread polling for endpoints will be running in
151
+ # the background every 60 secs (default). Defaults to `false`.
152
+ #
153
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
154
+ # Used only in `adaptive` retry mode. When true, the request will sleep
155
+ # until there is sufficent client side capacity to retry the request.
156
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
157
+ # not retry instead of sleeping.
158
+ #
159
+ # @option options [Boolean] :client_side_monitoring (false)
160
+ # When `true`, client-side metrics will be collected for all API requests from
161
+ # this client.
162
+ #
163
+ # @option options [String] :client_side_monitoring_client_id ("")
164
+ # Allows you to provide an identifier for this client which will be attached to
165
+ # all generated client side metrics. Defaults to an empty string.
166
+ #
167
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
168
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
169
+ # side monitoring agent is running on, where client metrics will be published via UDP.
170
+ #
171
+ # @option options [Integer] :client_side_monitoring_port (31000)
172
+ # Required for publishing client metrics. The port that the client side monitoring
173
+ # agent is running on, where client metrics will be published via UDP.
174
+ #
175
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
176
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
177
+ # will use the Client Side Monitoring Agent Publisher.
178
+ #
179
+ # @option options [Boolean] :convert_params (true)
180
+ # When `true`, an attempt is made to coerce request parameters into
181
+ # the required types.
182
+ #
183
+ # @option options [Boolean] :correct_clock_skew (true)
184
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
185
+ # a clock skew correction and retry requests with skewed client clocks.
186
+ #
187
+ # @option options [String] :defaults_mode ("legacy")
188
+ # See {Aws::DefaultsModeConfiguration} for a list of the
189
+ # accepted modes and the configuration defaults that are included.
190
+ #
191
+ # @option options [Boolean] :disable_host_prefix_injection (false)
192
+ # Set to true to disable SDK automatically adding host prefix
193
+ # to default service endpoint when available.
194
+ #
195
+ # @option options [Boolean] :disable_request_compression (false)
196
+ # When set to 'true' the request body will not be compressed
197
+ # for supported operations.
198
+ #
199
+ # @option options [String] :endpoint
200
+ # The client endpoint is normally constructed from the `:region`
201
+ # option. You should only configure an `:endpoint` when connecting
202
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
203
+ #
204
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
205
+ # Used for the maximum size limit of the LRU cache storing endpoints data
206
+ # for endpoint discovery enabled operations. Defaults to 1000.
207
+ #
208
+ # @option options [Integer] :endpoint_cache_max_threads (10)
209
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
210
+ #
211
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
212
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
213
+ # Use this option to config the time interval in seconds for making
214
+ # requests fetching endpoints information. Defaults to 60 sec.
215
+ #
216
+ # @option options [Boolean] :endpoint_discovery (false)
217
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
218
+ #
219
+ # @option options [Boolean] :ignore_configured_endpoint_urls
220
+ # Setting to true disables use of endpoint URLs provided via environment
221
+ # variables and the shared configuration file.
222
+ #
223
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
224
+ # The log formatter.
225
+ #
226
+ # @option options [Symbol] :log_level (:info)
227
+ # The log level to send messages to the `:logger` at.
228
+ #
229
+ # @option options [Logger] :logger
230
+ # The Logger instance to send log messages to. If this option
231
+ # is not set, logging will be disabled.
232
+ #
233
+ # @option options [Integer] :max_attempts (3)
234
+ # An integer representing the maximum number attempts that will be made for
235
+ # a single request, including the initial attempt. For example,
236
+ # setting this value to 5 will result in a request being retried up to
237
+ # 4 times. Used in `standard` and `adaptive` retry modes.
238
+ #
239
+ # @option options [String] :profile ("default")
240
+ # Used when loading credentials from the shared credentials file
241
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
242
+ #
243
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
244
+ # The minimum size in bytes that triggers compression for request
245
+ # bodies. The value must be non-negative integer value between 0
246
+ # and 10485780 bytes inclusive.
247
+ #
248
+ # @option options [Proc] :retry_backoff
249
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
250
+ # This option is only used in the `legacy` retry mode.
251
+ #
252
+ # @option options [Float] :retry_base_delay (0.3)
253
+ # The base delay in seconds used by the default backoff function. This option
254
+ # is only used in the `legacy` retry mode.
255
+ #
256
+ # @option options [Symbol] :retry_jitter (:none)
257
+ # A delay randomiser function used by the default backoff function.
258
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
259
+ # otherwise a Proc that takes and returns a number. This option is only used
260
+ # in the `legacy` retry mode.
261
+ #
262
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
263
+ #
264
+ # @option options [Integer] :retry_limit (3)
265
+ # The maximum number of times to retry failed requests. Only
266
+ # ~ 500 level server errors and certain ~ 400 level client errors
267
+ # are retried. Generally, these are throttling errors, data
268
+ # checksum errors, networking errors, timeout errors, auth errors,
269
+ # endpoint discovery, and errors from expired credentials.
270
+ # This option is only used in the `legacy` retry mode.
271
+ #
272
+ # @option options [Integer] :retry_max_delay (0)
273
+ # The maximum number of seconds to delay between retries (0 for no limit)
274
+ # used by the default backoff function. This option is only used in the
275
+ # `legacy` retry mode.
276
+ #
277
+ # @option options [String] :retry_mode ("legacy")
278
+ # Specifies which retry algorithm to use. Values are:
279
+ #
280
+ # * `legacy` - The pre-existing retry behavior. This is default value if
281
+ # no retry mode is provided.
282
+ #
283
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
284
+ # This includes support for retry quotas, which limit the number of
285
+ # unsuccessful retries a client can make.
286
+ #
287
+ # * `adaptive` - An experimental retry mode that includes all the
288
+ # functionality of `standard` mode along with automatic client side
289
+ # throttling. This is a provisional mode that may change behavior
290
+ # in the future.
291
+ #
292
+ #
293
+ # @option options [String] :sdk_ua_app_id
294
+ # A unique and opaque application ID that is appended to the
295
+ # User-Agent header as app/<sdk_ua_app_id>. It should have a
296
+ # maximum length of 50.
297
+ #
298
+ # @option options [String] :secret_access_key
299
+ #
300
+ # @option options [String] :session_token
301
+ #
302
+ # @option options [Boolean] :stub_responses (false)
303
+ # Causes the client to return stubbed responses. By default
304
+ # fake responses are generated and returned. You can specify
305
+ # the response data to return or errors to raise by calling
306
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
307
+ #
308
+ # ** Please note ** When response stubbing is enabled, no HTTP
309
+ # requests are made, and retries are disabled.
310
+ #
311
+ # @option options [Aws::TokenProvider] :token_provider
312
+ # A Bearer Token Provider. This can be an instance of any one of the
313
+ # following classes:
314
+ #
315
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
316
+ # tokens.
317
+ #
318
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
319
+ # access token generated from `aws login`.
320
+ #
321
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
322
+ # will be used to search for tokens configured for your profile in shared configuration files.
323
+ #
324
+ # @option options [Boolean] :use_dualstack_endpoint
325
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
326
+ # will be used if available.
327
+ #
328
+ # @option options [Boolean] :use_fips_endpoint
329
+ # When set to `true`, fips compatible endpoints will be used if available.
330
+ # When a `fips` region is used, the region is normalized and this config
331
+ # is set to `true`.
332
+ #
333
+ # @option options [Boolean] :validate_params (true)
334
+ # When `true`, request parameters are validated before
335
+ # sending the request.
336
+ #
337
+ # @option options [Aws::BedrockAgent::EndpointProvider] :endpoint_provider
338
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::BedrockAgent::EndpointParameters`
339
+ #
340
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
341
+ # requests through. Formatted like 'http://proxy.com:123'.
342
+ #
343
+ # @option options [Float] :http_open_timeout (15) The number of
344
+ # seconds to wait when opening a HTTP session before raising a
345
+ # `Timeout::Error`.
346
+ #
347
+ # @option options [Float] :http_read_timeout (60) The default
348
+ # number of seconds to wait for response data. This value can
349
+ # safely be set per-request on the session.
350
+ #
351
+ # @option options [Float] :http_idle_timeout (5) The number of
352
+ # seconds a connection is allowed to sit idle before it is
353
+ # considered stale. Stale connections are closed and removed
354
+ # from the pool before making a request.
355
+ #
356
+ # @option options [Float] :http_continue_timeout (1) The number of
357
+ # seconds to wait for a 100-continue response before sending the
358
+ # request body. This option has no effect unless the request has
359
+ # "Expect" header set to "100-continue". Defaults to `nil` which
360
+ # disables this behaviour. This value can safely be set per
361
+ # request on the session.
362
+ #
363
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
364
+ # in seconds.
365
+ #
366
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
367
+ # HTTP debug output will be sent to the `:logger`.
368
+ #
369
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
370
+ # SSL peer certificates are verified when establishing a
371
+ # connection.
372
+ #
373
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
374
+ # certificate authority bundle file that should be used when
375
+ # verifying peer certificates. If you do not pass
376
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
377
+ # will be used if available.
378
+ #
379
+ # @option options [String] :ssl_ca_directory Full path of the
380
+ # directory that contains the unbundled SSL certificate
381
+ # authority files for verifying peer certificates. If you do
382
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
383
+ # system default will be used if available.
384
+ #
385
+ def initialize(*args)
386
+ super
387
+ end
388
+
389
+ # @!group API Operations
390
+
391
+ # Associate a Knowledge Base to an existing Amazon Bedrock Agent
392
+ #
393
+ # @option params [required, String] :agent_id
394
+ # Id generated at the server side when an Agent is created
395
+ #
396
+ # @option params [required, String] :agent_version
397
+ # Draft Version of the Agent.
398
+ #
399
+ # @option params [required, String] :knowledge_base_id
400
+ # Identifier for a resource.
401
+ #
402
+ # @option params [required, String] :description
403
+ # Description of the Resource.
404
+ #
405
+ # @option params [String] :knowledge_base_state
406
+ # State of the knowledge base; whether it is enabled or disabled
407
+ #
408
+ # @return [Types::AssociateAgentKnowledgeBaseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
409
+ #
410
+ # * {Types::AssociateAgentKnowledgeBaseResponse#agent_knowledge_base #agent_knowledge_base} => Types::AgentKnowledgeBase
411
+ #
412
+ # @example Request syntax with placeholder values
413
+ #
414
+ # resp = client.associate_agent_knowledge_base({
415
+ # agent_id: "Id", # required
416
+ # agent_version: "DraftVersion", # required
417
+ # knowledge_base_id: "Id", # required
418
+ # description: "Description", # required
419
+ # knowledge_base_state: "ENABLED", # accepts ENABLED, DISABLED
420
+ # })
421
+ #
422
+ # @example Response structure
423
+ #
424
+ # resp.agent_knowledge_base.agent_id #=> String
425
+ # resp.agent_knowledge_base.agent_version #=> String
426
+ # resp.agent_knowledge_base.knowledge_base_id #=> String
427
+ # resp.agent_knowledge_base.description #=> String
428
+ # resp.agent_knowledge_base.created_at #=> Time
429
+ # resp.agent_knowledge_base.updated_at #=> Time
430
+ # resp.agent_knowledge_base.knowledge_base_state #=> String, one of "ENABLED", "DISABLED"
431
+ #
432
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/AssociateAgentKnowledgeBase AWS API Documentation
433
+ #
434
+ # @overload associate_agent_knowledge_base(params = {})
435
+ # @param [Hash] params ({})
436
+ def associate_agent_knowledge_base(params = {}, options = {})
437
+ req = build_request(:associate_agent_knowledge_base, params)
438
+ req.send_request(options)
439
+ end
440
+
441
+ # Creates an Amazon Bedrock Agent
442
+ #
443
+ # @option params [required, String] :agent_name
444
+ # Name for a resource.
445
+ #
446
+ # @option params [String] :client_token
447
+ # Client specified token used for idempotency checks
448
+ #
449
+ # **A suitable default value is auto-generated.** You should normally
450
+ # not need to pass this option.**
451
+ #
452
+ # @option params [String] :instruction
453
+ # Instruction for the agent.
454
+ #
455
+ # @option params [String] :foundation_model
456
+ # ARN or name of a Bedrock model.
457
+ #
458
+ # @option params [String] :description
459
+ # Description of the Resource.
460
+ #
461
+ # @option params [Integer] :idle_session_ttl_in_seconds
462
+ # Max Session Time.
463
+ #
464
+ # @option params [required, String] :agent_resource_role_arn
465
+ # ARN of a IAM role.
466
+ #
467
+ # @option params [String] :customer_encryption_key_arn
468
+ # A KMS key ARN
469
+ #
470
+ # @option params [Hash<String,String>] :tags
471
+ # A map of tag keys and values
472
+ #
473
+ # @option params [Types::PromptOverrideConfiguration] :prompt_override_configuration
474
+ # Configuration for prompt override.
475
+ #
476
+ # @return [Types::CreateAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
477
+ #
478
+ # * {Types::CreateAgentResponse#agent #agent} => Types::Agent
479
+ #
480
+ # @example Request syntax with placeholder values
481
+ #
482
+ # resp = client.create_agent({
483
+ # agent_name: "Name", # required
484
+ # client_token: "ClientToken",
485
+ # instruction: "Instruction",
486
+ # foundation_model: "ModelIdentifier",
487
+ # description: "Description",
488
+ # idle_session_ttl_in_seconds: 1,
489
+ # agent_resource_role_arn: "AgentRoleArn", # required
490
+ # customer_encryption_key_arn: "KmsKeyArn",
491
+ # tags: {
492
+ # "TagKey" => "TagValue",
493
+ # },
494
+ # prompt_override_configuration: {
495
+ # prompt_configurations: [ # required
496
+ # {
497
+ # prompt_type: "PRE_PROCESSING", # accepts PRE_PROCESSING, ORCHESTRATION, POST_PROCESSING, KNOWLEDGE_BASE_RESPONSE_GENERATION
498
+ # prompt_creation_mode: "DEFAULT", # accepts DEFAULT, OVERRIDDEN
499
+ # prompt_state: "ENABLED", # accepts ENABLED, DISABLED
500
+ # base_prompt_template: "BasePromptTemplate",
501
+ # inference_configuration: {
502
+ # temperature: 1.0,
503
+ # top_p: 1.0,
504
+ # top_k: 1,
505
+ # maximum_length: 1,
506
+ # stop_sequences: ["String"],
507
+ # },
508
+ # parser_mode: "DEFAULT", # accepts DEFAULT, OVERRIDDEN
509
+ # },
510
+ # ],
511
+ # override_lambda: "LambdaArn",
512
+ # },
513
+ # })
514
+ #
515
+ # @example Response structure
516
+ #
517
+ # resp.agent.agent_id #=> String
518
+ # resp.agent.agent_name #=> String
519
+ # resp.agent.agent_arn #=> String
520
+ # resp.agent.agent_version #=> String
521
+ # resp.agent.client_token #=> String
522
+ # resp.agent.instruction #=> String
523
+ # resp.agent.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
524
+ # resp.agent.foundation_model #=> String
525
+ # resp.agent.description #=> String
526
+ # resp.agent.idle_session_ttl_in_seconds #=> Integer
527
+ # resp.agent.agent_resource_role_arn #=> String
528
+ # resp.agent.customer_encryption_key_arn #=> String
529
+ # resp.agent.created_at #=> Time
530
+ # resp.agent.updated_at #=> Time
531
+ # resp.agent.prepared_at #=> Time
532
+ # resp.agent.failure_reasons #=> Array
533
+ # resp.agent.failure_reasons[0] #=> String
534
+ # resp.agent.recommended_actions #=> Array
535
+ # resp.agent.recommended_actions[0] #=> String
536
+ # resp.agent.prompt_override_configuration.prompt_configurations #=> Array
537
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "POST_PROCESSING", "KNOWLEDGE_BASE_RESPONSE_GENERATION"
538
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_creation_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
539
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_state #=> String, one of "ENABLED", "DISABLED"
540
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].base_prompt_template #=> String
541
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.temperature #=> Float
542
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_p #=> Float
543
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_k #=> Integer
544
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.maximum_length #=> Integer
545
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences #=> Array
546
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences[0] #=> String
547
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].parser_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
548
+ # resp.agent.prompt_override_configuration.override_lambda #=> String
549
+ #
550
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/CreateAgent AWS API Documentation
551
+ #
552
+ # @overload create_agent(params = {})
553
+ # @param [Hash] params ({})
554
+ def create_agent(params = {}, options = {})
555
+ req = build_request(:create_agent, params)
556
+ req.send_request(options)
557
+ end
558
+
559
+ # Creates an Action Group for existing Amazon Bedrock Agent
560
+ #
561
+ # @option params [required, String] :agent_id
562
+ # Id generated at the server side when an Agent is created
563
+ #
564
+ # @option params [required, String] :agent_version
565
+ # Draft Version of the Agent.
566
+ #
567
+ # @option params [required, String] :action_group_name
568
+ # Name for a resource.
569
+ #
570
+ # @option params [String] :client_token
571
+ # Client specified token used for idempotency checks
572
+ #
573
+ # **A suitable default value is auto-generated.** You should normally
574
+ # not need to pass this option.**
575
+ #
576
+ # @option params [String] :description
577
+ # Description of the Resource.
578
+ #
579
+ # @option params [String] :parent_action_group_signature
580
+ # Action Group Signature for a BuiltIn Action
581
+ #
582
+ # @option params [Types::ActionGroupExecutor] :action_group_executor
583
+ # Type of Executors for an Action Group
584
+ #
585
+ # @option params [Types::APISchema] :api_schema
586
+ # Contains information about the API Schema for the Action Group
587
+ #
588
+ # @option params [String] :action_group_state
589
+ # State of the action group
590
+ #
591
+ # @return [Types::CreateAgentActionGroupResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
592
+ #
593
+ # * {Types::CreateAgentActionGroupResponse#agent_action_group #agent_action_group} => Types::AgentActionGroup
594
+ #
595
+ # @example Request syntax with placeholder values
596
+ #
597
+ # resp = client.create_agent_action_group({
598
+ # agent_id: "Id", # required
599
+ # agent_version: "DraftVersion", # required
600
+ # action_group_name: "Name", # required
601
+ # client_token: "ClientToken",
602
+ # description: "Description",
603
+ # parent_action_group_signature: "AMAZON.UserInput", # accepts AMAZON.UserInput
604
+ # action_group_executor: {
605
+ # lambda: "LambdaArn",
606
+ # },
607
+ # api_schema: {
608
+ # s3: {
609
+ # s3_bucket_name: "S3BucketName",
610
+ # s3_object_key: "S3ObjectKey",
611
+ # },
612
+ # payload: "Payload",
613
+ # },
614
+ # action_group_state: "ENABLED", # accepts ENABLED, DISABLED
615
+ # })
616
+ #
617
+ # @example Response structure
618
+ #
619
+ # resp.agent_action_group.agent_id #=> String
620
+ # resp.agent_action_group.agent_version #=> String
621
+ # resp.agent_action_group.action_group_id #=> String
622
+ # resp.agent_action_group.action_group_name #=> String
623
+ # resp.agent_action_group.client_token #=> String
624
+ # resp.agent_action_group.description #=> String
625
+ # resp.agent_action_group.created_at #=> Time
626
+ # resp.agent_action_group.updated_at #=> Time
627
+ # resp.agent_action_group.parent_action_signature #=> String, one of "AMAZON.UserInput"
628
+ # resp.agent_action_group.action_group_executor.lambda #=> String
629
+ # resp.agent_action_group.api_schema.s3.s3_bucket_name #=> String
630
+ # resp.agent_action_group.api_schema.s3.s3_object_key #=> String
631
+ # resp.agent_action_group.api_schema.payload #=> String
632
+ # resp.agent_action_group.action_group_state #=> String, one of "ENABLED", "DISABLED"
633
+ #
634
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/CreateAgentActionGroup AWS API Documentation
635
+ #
636
+ # @overload create_agent_action_group(params = {})
637
+ # @param [Hash] params ({})
638
+ def create_agent_action_group(params = {}, options = {})
639
+ req = build_request(:create_agent_action_group, params)
640
+ req.send_request(options)
641
+ end
642
+
643
+ # Creates an Alias for an existing Amazon Bedrock Agent
644
+ #
645
+ # @option params [required, String] :agent_id
646
+ # Id generated at the server side when an Agent is created
647
+ #
648
+ # @option params [required, String] :agent_alias_name
649
+ # Name for a resource.
650
+ #
651
+ # @option params [String] :client_token
652
+ # Client specified token used for idempotency checks
653
+ #
654
+ # **A suitable default value is auto-generated.** You should normally
655
+ # not need to pass this option.**
656
+ #
657
+ # @option params [String] :description
658
+ # Description of the Resource.
659
+ #
660
+ # @option params [Array<Types::AgentAliasRoutingConfigurationListItem>] :routing_configuration
661
+ # Routing configuration for an Agent alias.
662
+ #
663
+ # @option params [Hash<String,String>] :tags
664
+ # A map of tag keys and values
665
+ #
666
+ # @return [Types::CreateAgentAliasResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
667
+ #
668
+ # * {Types::CreateAgentAliasResponse#agent_alias #agent_alias} => Types::AgentAlias
669
+ #
670
+ # @example Request syntax with placeholder values
671
+ #
672
+ # resp = client.create_agent_alias({
673
+ # agent_id: "Id", # required
674
+ # agent_alias_name: "Name", # required
675
+ # client_token: "ClientToken",
676
+ # description: "Description",
677
+ # routing_configuration: [
678
+ # {
679
+ # agent_version: "Version", # required
680
+ # },
681
+ # ],
682
+ # tags: {
683
+ # "TagKey" => "TagValue",
684
+ # },
685
+ # })
686
+ #
687
+ # @example Response structure
688
+ #
689
+ # resp.agent_alias.agent_id #=> String
690
+ # resp.agent_alias.agent_alias_id #=> String
691
+ # resp.agent_alias.agent_alias_name #=> String
692
+ # resp.agent_alias.agent_alias_arn #=> String
693
+ # resp.agent_alias.client_token #=> String
694
+ # resp.agent_alias.description #=> String
695
+ # resp.agent_alias.routing_configuration #=> Array
696
+ # resp.agent_alias.routing_configuration[0].agent_version #=> String
697
+ # resp.agent_alias.created_at #=> Time
698
+ # resp.agent_alias.updated_at #=> Time
699
+ # resp.agent_alias.agent_alias_history_events #=> Array
700
+ # resp.agent_alias.agent_alias_history_events[0].routing_configuration #=> Array
701
+ # resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].agent_version #=> String
702
+ # resp.agent_alias.agent_alias_history_events[0].end_date #=> Time
703
+ # resp.agent_alias.agent_alias_history_events[0].start_date #=> Time
704
+ # resp.agent_alias.agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
705
+ #
706
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/CreateAgentAlias AWS API Documentation
707
+ #
708
+ # @overload create_agent_alias(params = {})
709
+ # @param [Hash] params ({})
710
+ def create_agent_alias(params = {}, options = {})
711
+ req = build_request(:create_agent_alias, params)
712
+ req.send_request(options)
713
+ end
714
+
715
+ # Create a new data source
716
+ #
717
+ # @option params [required, String] :knowledge_base_id
718
+ # Identifier for a resource.
719
+ #
720
+ # @option params [String] :client_token
721
+ # Client specified token used for idempotency checks
722
+ #
723
+ # **A suitable default value is auto-generated.** You should normally
724
+ # not need to pass this option.**
725
+ #
726
+ # @option params [required, String] :name
727
+ # Name for a resource.
728
+ #
729
+ # @option params [String] :description
730
+ # Description of the Resource.
731
+ #
732
+ # @option params [required, Types::DataSourceConfiguration] :data_source_configuration
733
+ # Specifies a raw data source location to ingest.
734
+ #
735
+ # @option params [Types::ServerSideEncryptionConfiguration] :server_side_encryption_configuration
736
+ # Server-side encryption configuration.
737
+ #
738
+ # @option params [Types::VectorIngestionConfiguration] :vector_ingestion_configuration
739
+ # Configures ingestion for a vector knowledge base
740
+ #
741
+ # @return [Types::CreateDataSourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
742
+ #
743
+ # * {Types::CreateDataSourceResponse#data_source #data_source} => Types::DataSource
744
+ #
745
+ # @example Request syntax with placeholder values
746
+ #
747
+ # resp = client.create_data_source({
748
+ # knowledge_base_id: "Id", # required
749
+ # client_token: "ClientToken",
750
+ # name: "Name", # required
751
+ # description: "Description",
752
+ # data_source_configuration: { # required
753
+ # type: "S3", # required, accepts S3
754
+ # s3_configuration: {
755
+ # bucket_arn: "S3BucketArn", # required
756
+ # inclusion_prefixes: ["S3Prefix"],
757
+ # },
758
+ # },
759
+ # server_side_encryption_configuration: {
760
+ # kms_key_arn: "KmsKeyArn",
761
+ # },
762
+ # vector_ingestion_configuration: {
763
+ # chunking_configuration: {
764
+ # chunking_strategy: "FIXED_SIZE", # required, accepts FIXED_SIZE, NONE
765
+ # fixed_size_chunking_configuration: {
766
+ # max_tokens: 1, # required
767
+ # overlap_percentage: 1, # required
768
+ # },
769
+ # },
770
+ # },
771
+ # })
772
+ #
773
+ # @example Response structure
774
+ #
775
+ # resp.data_source.knowledge_base_id #=> String
776
+ # resp.data_source.data_source_id #=> String
777
+ # resp.data_source.name #=> String
778
+ # resp.data_source.status #=> String, one of "AVAILABLE", "DELETING"
779
+ # resp.data_source.description #=> String
780
+ # resp.data_source.data_source_configuration.type #=> String, one of "S3"
781
+ # resp.data_source.data_source_configuration.s3_configuration.bucket_arn #=> String
782
+ # resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes #=> Array
783
+ # resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes[0] #=> String
784
+ # resp.data_source.server_side_encryption_configuration.kms_key_arn #=> String
785
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.chunking_strategy #=> String, one of "FIXED_SIZE", "NONE"
786
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.max_tokens #=> Integer
787
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.overlap_percentage #=> Integer
788
+ # resp.data_source.created_at #=> Time
789
+ # resp.data_source.updated_at #=> Time
790
+ #
791
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/CreateDataSource AWS API Documentation
792
+ #
793
+ # @overload create_data_source(params = {})
794
+ # @param [Hash] params ({})
795
+ def create_data_source(params = {}, options = {})
796
+ req = build_request(:create_data_source, params)
797
+ req.send_request(options)
798
+ end
799
+
800
+ # Create a new knowledge base
801
+ #
802
+ # @option params [String] :client_token
803
+ # Client specified token used for idempotency checks
804
+ #
805
+ # **A suitable default value is auto-generated.** You should normally
806
+ # not need to pass this option.**
807
+ #
808
+ # @option params [required, String] :name
809
+ # Name for a resource.
810
+ #
811
+ # @option params [String] :description
812
+ # Description of the Resource.
813
+ #
814
+ # @option params [required, String] :role_arn
815
+ # ARN of a IAM role.
816
+ #
817
+ # @option params [required, Types::KnowledgeBaseConfiguration] :knowledge_base_configuration
818
+ # Configures a bedrock knowledge base.
819
+ #
820
+ # @option params [required, Types::StorageConfiguration] :storage_configuration
821
+ # Configures the physical storage of ingested data in a knowledge base.
822
+ #
823
+ # @option params [Hash<String,String>] :tags
824
+ # A map of tag keys and values
825
+ #
826
+ # @return [Types::CreateKnowledgeBaseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
827
+ #
828
+ # * {Types::CreateKnowledgeBaseResponse#knowledge_base #knowledge_base} => Types::KnowledgeBase
829
+ #
830
+ # @example Request syntax with placeholder values
831
+ #
832
+ # resp = client.create_knowledge_base({
833
+ # client_token: "ClientToken",
834
+ # name: "Name", # required
835
+ # description: "Description",
836
+ # role_arn: "KnowledgeBaseRoleArn", # required
837
+ # knowledge_base_configuration: { # required
838
+ # type: "VECTOR", # required, accepts VECTOR
839
+ # vector_knowledge_base_configuration: {
840
+ # embedding_model_arn: "BedrockEmbeddingModelArn", # required
841
+ # },
842
+ # },
843
+ # storage_configuration: { # required
844
+ # type: "OPENSEARCH_SERVERLESS", # required, accepts OPENSEARCH_SERVERLESS, PINECONE, REDIS_ENTERPRISE_CLOUD
845
+ # opensearch_serverless_configuration: {
846
+ # collection_arn: "OpenSearchServerlessCollectionArn", # required
847
+ # vector_index_name: "OpenSearchServerlessIndexName", # required
848
+ # field_mapping: { # required
849
+ # vector_field: "FieldName", # required
850
+ # text_field: "FieldName", # required
851
+ # metadata_field: "FieldName", # required
852
+ # },
853
+ # },
854
+ # pinecone_configuration: {
855
+ # connection_string: "PineconeConnectionString", # required
856
+ # credentials_secret_arn: "SecretArn", # required
857
+ # namespace: "PineconeNamespace",
858
+ # field_mapping: { # required
859
+ # text_field: "FieldName", # required
860
+ # metadata_field: "FieldName", # required
861
+ # },
862
+ # },
863
+ # redis_enterprise_cloud_configuration: {
864
+ # endpoint: "RedisEnterpriseCloudEndpoint", # required
865
+ # vector_index_name: "RedisEnterpriseCloudIndexName", # required
866
+ # credentials_secret_arn: "SecretArn", # required
867
+ # field_mapping: { # required
868
+ # vector_field: "FieldName", # required
869
+ # text_field: "FieldName", # required
870
+ # metadata_field: "FieldName", # required
871
+ # },
872
+ # },
873
+ # },
874
+ # tags: {
875
+ # "TagKey" => "TagValue",
876
+ # },
877
+ # })
878
+ #
879
+ # @example Response structure
880
+ #
881
+ # resp.knowledge_base.knowledge_base_id #=> String
882
+ # resp.knowledge_base.name #=> String
883
+ # resp.knowledge_base.knowledge_base_arn #=> String
884
+ # resp.knowledge_base.description #=> String
885
+ # resp.knowledge_base.role_arn #=> String
886
+ # resp.knowledge_base.knowledge_base_configuration.type #=> String, one of "VECTOR"
887
+ # resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_arn #=> String
888
+ # resp.knowledge_base.storage_configuration.type #=> String, one of "OPENSEARCH_SERVERLESS", "PINECONE", "REDIS_ENTERPRISE_CLOUD"
889
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.collection_arn #=> String
890
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.vector_index_name #=> String
891
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.vector_field #=> String
892
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.text_field #=> String
893
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.metadata_field #=> String
894
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.connection_string #=> String
895
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.credentials_secret_arn #=> String
896
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.namespace #=> String
897
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.text_field #=> String
898
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.metadata_field #=> String
899
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.endpoint #=> String
900
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.vector_index_name #=> String
901
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.credentials_secret_arn #=> String
902
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.vector_field #=> String
903
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.text_field #=> String
904
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.metadata_field #=> String
905
+ # resp.knowledge_base.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED"
906
+ # resp.knowledge_base.created_at #=> Time
907
+ # resp.knowledge_base.updated_at #=> Time
908
+ # resp.knowledge_base.failure_reasons #=> Array
909
+ # resp.knowledge_base.failure_reasons[0] #=> String
910
+ #
911
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/CreateKnowledgeBase AWS API Documentation
912
+ #
913
+ # @overload create_knowledge_base(params = {})
914
+ # @param [Hash] params ({})
915
+ def create_knowledge_base(params = {}, options = {})
916
+ req = build_request(:create_knowledge_base, params)
917
+ req.send_request(options)
918
+ end
919
+
920
+ # Deletes an Agent for existing Amazon Bedrock Agent
921
+ #
922
+ # @option params [required, String] :agent_id
923
+ # Id generated at the server side when an Agent is created
924
+ #
925
+ # @option params [Boolean] :skip_resource_in_use_check
926
+ # Skips checking if resource is in use when set to true. Defaults to
927
+ # false
928
+ #
929
+ # @return [Types::DeleteAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
930
+ #
931
+ # * {Types::DeleteAgentResponse#agent_id #agent_id} => String
932
+ # * {Types::DeleteAgentResponse#agent_status #agent_status} => String
933
+ #
934
+ # @example Request syntax with placeholder values
935
+ #
936
+ # resp = client.delete_agent({
937
+ # agent_id: "Id", # required
938
+ # skip_resource_in_use_check: false,
939
+ # })
940
+ #
941
+ # @example Response structure
942
+ #
943
+ # resp.agent_id #=> String
944
+ # resp.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
945
+ #
946
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/DeleteAgent AWS API Documentation
947
+ #
948
+ # @overload delete_agent(params = {})
949
+ # @param [Hash] params ({})
950
+ def delete_agent(params = {}, options = {})
951
+ req = build_request(:delete_agent, params)
952
+ req.send_request(options)
953
+ end
954
+
955
+ # Deletes an Action Group for existing Amazon Bedrock Agent.
956
+ #
957
+ # @option params [required, String] :agent_id
958
+ # Id generated at the server side when an Agent is created
959
+ #
960
+ # @option params [required, String] :agent_version
961
+ # Draft Version of the Agent.
962
+ #
963
+ # @option params [required, String] :action_group_id
964
+ # Id generated at the server side when an Agent ActionGroup is created
965
+ #
966
+ # @option params [Boolean] :skip_resource_in_use_check
967
+ # Skips checking if resource is in use when set to true. Defaults to
968
+ # false
969
+ #
970
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
971
+ #
972
+ # @example Request syntax with placeholder values
973
+ #
974
+ # resp = client.delete_agent_action_group({
975
+ # agent_id: "Id", # required
976
+ # agent_version: "DraftVersion", # required
977
+ # action_group_id: "Id", # required
978
+ # skip_resource_in_use_check: false,
979
+ # })
980
+ #
981
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/DeleteAgentActionGroup AWS API Documentation
982
+ #
983
+ # @overload delete_agent_action_group(params = {})
984
+ # @param [Hash] params ({})
985
+ def delete_agent_action_group(params = {}, options = {})
986
+ req = build_request(:delete_agent_action_group, params)
987
+ req.send_request(options)
988
+ end
989
+
990
+ # Deletes an Alias for a Amazon Bedrock Agent
991
+ #
992
+ # @option params [required, String] :agent_id
993
+ # Id generated at the server side when an Agent is created
994
+ #
995
+ # @option params [required, String] :agent_alias_id
996
+ # Id generated at the server side when an Agent Alias is created
997
+ #
998
+ # @return [Types::DeleteAgentAliasResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
999
+ #
1000
+ # * {Types::DeleteAgentAliasResponse#agent_id #agent_id} => String
1001
+ # * {Types::DeleteAgentAliasResponse#agent_alias_id #agent_alias_id} => String
1002
+ # * {Types::DeleteAgentAliasResponse#agent_alias_status #agent_alias_status} => String
1003
+ #
1004
+ # @example Request syntax with placeholder values
1005
+ #
1006
+ # resp = client.delete_agent_alias({
1007
+ # agent_id: "Id", # required
1008
+ # agent_alias_id: "AgentAliasId", # required
1009
+ # })
1010
+ #
1011
+ # @example Response structure
1012
+ #
1013
+ # resp.agent_id #=> String
1014
+ # resp.agent_alias_id #=> String
1015
+ # resp.agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
1016
+ #
1017
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/DeleteAgentAlias AWS API Documentation
1018
+ #
1019
+ # @overload delete_agent_alias(params = {})
1020
+ # @param [Hash] params ({})
1021
+ def delete_agent_alias(params = {}, options = {})
1022
+ req = build_request(:delete_agent_alias, params)
1023
+ req.send_request(options)
1024
+ end
1025
+
1026
+ # Deletes an Agent version for existing Amazon Bedrock Agent
1027
+ #
1028
+ # @option params [required, String] :agent_id
1029
+ # Id generated at the server side when an Agent is created
1030
+ #
1031
+ # @option params [required, String] :agent_version
1032
+ # Numerical Agent Version.
1033
+ #
1034
+ # @option params [Boolean] :skip_resource_in_use_check
1035
+ # Skips checking if resource is in use when set to true. Defaults to
1036
+ # false
1037
+ #
1038
+ # @return [Types::DeleteAgentVersionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1039
+ #
1040
+ # * {Types::DeleteAgentVersionResponse#agent_id #agent_id} => String
1041
+ # * {Types::DeleteAgentVersionResponse#agent_version #agent_version} => String
1042
+ # * {Types::DeleteAgentVersionResponse#agent_status #agent_status} => String
1043
+ #
1044
+ # @example Request syntax with placeholder values
1045
+ #
1046
+ # resp = client.delete_agent_version({
1047
+ # agent_id: "Id", # required
1048
+ # agent_version: "NumericalVersion", # required
1049
+ # skip_resource_in_use_check: false,
1050
+ # })
1051
+ #
1052
+ # @example Response structure
1053
+ #
1054
+ # resp.agent_id #=> String
1055
+ # resp.agent_version #=> String
1056
+ # resp.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
1057
+ #
1058
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/DeleteAgentVersion AWS API Documentation
1059
+ #
1060
+ # @overload delete_agent_version(params = {})
1061
+ # @param [Hash] params ({})
1062
+ def delete_agent_version(params = {}, options = {})
1063
+ req = build_request(:delete_agent_version, params)
1064
+ req.send_request(options)
1065
+ end
1066
+
1067
+ # Delete an existing data source
1068
+ #
1069
+ # @option params [required, String] :knowledge_base_id
1070
+ # Identifier for a resource.
1071
+ #
1072
+ # @option params [required, String] :data_source_id
1073
+ # Identifier for a resource.
1074
+ #
1075
+ # @return [Types::DeleteDataSourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1076
+ #
1077
+ # * {Types::DeleteDataSourceResponse#knowledge_base_id #knowledge_base_id} => String
1078
+ # * {Types::DeleteDataSourceResponse#data_source_id #data_source_id} => String
1079
+ # * {Types::DeleteDataSourceResponse#status #status} => String
1080
+ #
1081
+ # @example Request syntax with placeholder values
1082
+ #
1083
+ # resp = client.delete_data_source({
1084
+ # knowledge_base_id: "Id", # required
1085
+ # data_source_id: "Id", # required
1086
+ # })
1087
+ #
1088
+ # @example Response structure
1089
+ #
1090
+ # resp.knowledge_base_id #=> String
1091
+ # resp.data_source_id #=> String
1092
+ # resp.status #=> String, one of "AVAILABLE", "DELETING"
1093
+ #
1094
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/DeleteDataSource AWS API Documentation
1095
+ #
1096
+ # @overload delete_data_source(params = {})
1097
+ # @param [Hash] params ({})
1098
+ def delete_data_source(params = {}, options = {})
1099
+ req = build_request(:delete_data_source, params)
1100
+ req.send_request(options)
1101
+ end
1102
+
1103
+ # Delete an existing knowledge base
1104
+ #
1105
+ # @option params [required, String] :knowledge_base_id
1106
+ # Identifier for a resource.
1107
+ #
1108
+ # @return [Types::DeleteKnowledgeBaseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1109
+ #
1110
+ # * {Types::DeleteKnowledgeBaseResponse#knowledge_base_id #knowledge_base_id} => String
1111
+ # * {Types::DeleteKnowledgeBaseResponse#status #status} => String
1112
+ #
1113
+ # @example Request syntax with placeholder values
1114
+ #
1115
+ # resp = client.delete_knowledge_base({
1116
+ # knowledge_base_id: "Id", # required
1117
+ # })
1118
+ #
1119
+ # @example Response structure
1120
+ #
1121
+ # resp.knowledge_base_id #=> String
1122
+ # resp.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED"
1123
+ #
1124
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/DeleteKnowledgeBase AWS API Documentation
1125
+ #
1126
+ # @overload delete_knowledge_base(params = {})
1127
+ # @param [Hash] params ({})
1128
+ def delete_knowledge_base(params = {}, options = {})
1129
+ req = build_request(:delete_knowledge_base, params)
1130
+ req.send_request(options)
1131
+ end
1132
+
1133
+ # Disassociate an existing Knowledge Base from an Amazon Bedrock Agent
1134
+ #
1135
+ # @option params [required, String] :agent_id
1136
+ # Id generated at the server side when an Agent is created
1137
+ #
1138
+ # @option params [required, String] :agent_version
1139
+ # Draft Version of the Agent.
1140
+ #
1141
+ # @option params [required, String] :knowledge_base_id
1142
+ # Id generated at the server side when a Knowledge Base is associated to
1143
+ # an Agent
1144
+ #
1145
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1146
+ #
1147
+ # @example Request syntax with placeholder values
1148
+ #
1149
+ # resp = client.disassociate_agent_knowledge_base({
1150
+ # agent_id: "Id", # required
1151
+ # agent_version: "DraftVersion", # required
1152
+ # knowledge_base_id: "Id", # required
1153
+ # })
1154
+ #
1155
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/DisassociateAgentKnowledgeBase AWS API Documentation
1156
+ #
1157
+ # @overload disassociate_agent_knowledge_base(params = {})
1158
+ # @param [Hash] params ({})
1159
+ def disassociate_agent_knowledge_base(params = {}, options = {})
1160
+ req = build_request(:disassociate_agent_knowledge_base, params)
1161
+ req.send_request(options)
1162
+ end
1163
+
1164
+ # Gets an Agent for existing Amazon Bedrock Agent
1165
+ #
1166
+ # @option params [required, String] :agent_id
1167
+ # Id generated at the server side when an Agent is created
1168
+ #
1169
+ # @return [Types::GetAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1170
+ #
1171
+ # * {Types::GetAgentResponse#agent #agent} => Types::Agent
1172
+ #
1173
+ # @example Request syntax with placeholder values
1174
+ #
1175
+ # resp = client.get_agent({
1176
+ # agent_id: "Id", # required
1177
+ # })
1178
+ #
1179
+ # @example Response structure
1180
+ #
1181
+ # resp.agent.agent_id #=> String
1182
+ # resp.agent.agent_name #=> String
1183
+ # resp.agent.agent_arn #=> String
1184
+ # resp.agent.agent_version #=> String
1185
+ # resp.agent.client_token #=> String
1186
+ # resp.agent.instruction #=> String
1187
+ # resp.agent.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
1188
+ # resp.agent.foundation_model #=> String
1189
+ # resp.agent.description #=> String
1190
+ # resp.agent.idle_session_ttl_in_seconds #=> Integer
1191
+ # resp.agent.agent_resource_role_arn #=> String
1192
+ # resp.agent.customer_encryption_key_arn #=> String
1193
+ # resp.agent.created_at #=> Time
1194
+ # resp.agent.updated_at #=> Time
1195
+ # resp.agent.prepared_at #=> Time
1196
+ # resp.agent.failure_reasons #=> Array
1197
+ # resp.agent.failure_reasons[0] #=> String
1198
+ # resp.agent.recommended_actions #=> Array
1199
+ # resp.agent.recommended_actions[0] #=> String
1200
+ # resp.agent.prompt_override_configuration.prompt_configurations #=> Array
1201
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "POST_PROCESSING", "KNOWLEDGE_BASE_RESPONSE_GENERATION"
1202
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_creation_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
1203
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_state #=> String, one of "ENABLED", "DISABLED"
1204
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].base_prompt_template #=> String
1205
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.temperature #=> Float
1206
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_p #=> Float
1207
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_k #=> Integer
1208
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.maximum_length #=> Integer
1209
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences #=> Array
1210
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences[0] #=> String
1211
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].parser_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
1212
+ # resp.agent.prompt_override_configuration.override_lambda #=> String
1213
+ #
1214
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/GetAgent AWS API Documentation
1215
+ #
1216
+ # @overload get_agent(params = {})
1217
+ # @param [Hash] params ({})
1218
+ def get_agent(params = {}, options = {})
1219
+ req = build_request(:get_agent, params)
1220
+ req.send_request(options)
1221
+ end
1222
+
1223
+ # Gets an Action Group for existing Amazon Bedrock Agent Version
1224
+ #
1225
+ # @option params [required, String] :agent_id
1226
+ # Id generated at the server side when an Agent is created
1227
+ #
1228
+ # @option params [required, String] :agent_version
1229
+ # Version number generated when a version is created
1230
+ #
1231
+ # @option params [required, String] :action_group_id
1232
+ # Id generated at the server side when an Agent Action Group is created
1233
+ #
1234
+ # @return [Types::GetAgentActionGroupResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1235
+ #
1236
+ # * {Types::GetAgentActionGroupResponse#agent_action_group #agent_action_group} => Types::AgentActionGroup
1237
+ #
1238
+ # @example Request syntax with placeholder values
1239
+ #
1240
+ # resp = client.get_agent_action_group({
1241
+ # agent_id: "Id", # required
1242
+ # agent_version: "Version", # required
1243
+ # action_group_id: "Id", # required
1244
+ # })
1245
+ #
1246
+ # @example Response structure
1247
+ #
1248
+ # resp.agent_action_group.agent_id #=> String
1249
+ # resp.agent_action_group.agent_version #=> String
1250
+ # resp.agent_action_group.action_group_id #=> String
1251
+ # resp.agent_action_group.action_group_name #=> String
1252
+ # resp.agent_action_group.client_token #=> String
1253
+ # resp.agent_action_group.description #=> String
1254
+ # resp.agent_action_group.created_at #=> Time
1255
+ # resp.agent_action_group.updated_at #=> Time
1256
+ # resp.agent_action_group.parent_action_signature #=> String, one of "AMAZON.UserInput"
1257
+ # resp.agent_action_group.action_group_executor.lambda #=> String
1258
+ # resp.agent_action_group.api_schema.s3.s3_bucket_name #=> String
1259
+ # resp.agent_action_group.api_schema.s3.s3_object_key #=> String
1260
+ # resp.agent_action_group.api_schema.payload #=> String
1261
+ # resp.agent_action_group.action_group_state #=> String, one of "ENABLED", "DISABLED"
1262
+ #
1263
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/GetAgentActionGroup AWS API Documentation
1264
+ #
1265
+ # @overload get_agent_action_group(params = {})
1266
+ # @param [Hash] params ({})
1267
+ def get_agent_action_group(params = {}, options = {})
1268
+ req = build_request(:get_agent_action_group, params)
1269
+ req.send_request(options)
1270
+ end
1271
+
1272
+ # Describes an Alias for a Amazon Bedrock Agent
1273
+ #
1274
+ # @option params [required, String] :agent_id
1275
+ # Id generated at the server side when an Agent is created
1276
+ #
1277
+ # @option params [required, String] :agent_alias_id
1278
+ # Id generated at the server side when an Agent Alias is created
1279
+ #
1280
+ # @return [Types::GetAgentAliasResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1281
+ #
1282
+ # * {Types::GetAgentAliasResponse#agent_alias #agent_alias} => Types::AgentAlias
1283
+ #
1284
+ # @example Request syntax with placeholder values
1285
+ #
1286
+ # resp = client.get_agent_alias({
1287
+ # agent_id: "Id", # required
1288
+ # agent_alias_id: "AgentAliasId", # required
1289
+ # })
1290
+ #
1291
+ # @example Response structure
1292
+ #
1293
+ # resp.agent_alias.agent_id #=> String
1294
+ # resp.agent_alias.agent_alias_id #=> String
1295
+ # resp.agent_alias.agent_alias_name #=> String
1296
+ # resp.agent_alias.agent_alias_arn #=> String
1297
+ # resp.agent_alias.client_token #=> String
1298
+ # resp.agent_alias.description #=> String
1299
+ # resp.agent_alias.routing_configuration #=> Array
1300
+ # resp.agent_alias.routing_configuration[0].agent_version #=> String
1301
+ # resp.agent_alias.created_at #=> Time
1302
+ # resp.agent_alias.updated_at #=> Time
1303
+ # resp.agent_alias.agent_alias_history_events #=> Array
1304
+ # resp.agent_alias.agent_alias_history_events[0].routing_configuration #=> Array
1305
+ # resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].agent_version #=> String
1306
+ # resp.agent_alias.agent_alias_history_events[0].end_date #=> Time
1307
+ # resp.agent_alias.agent_alias_history_events[0].start_date #=> Time
1308
+ # resp.agent_alias.agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
1309
+ #
1310
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/GetAgentAlias AWS API Documentation
1311
+ #
1312
+ # @overload get_agent_alias(params = {})
1313
+ # @param [Hash] params ({})
1314
+ def get_agent_alias(params = {}, options = {})
1315
+ req = build_request(:get_agent_alias, params)
1316
+ req.send_request(options)
1317
+ end
1318
+
1319
+ # Gets a knowledge base associated to an existing Amazon Bedrock Agent
1320
+ # Version
1321
+ #
1322
+ # @option params [required, String] :agent_id
1323
+ # Id generated at the server side when an Agent is created
1324
+ #
1325
+ # @option params [required, String] :agent_version
1326
+ # Version number generated when a version is created
1327
+ #
1328
+ # @option params [required, String] :knowledge_base_id
1329
+ # Id generated at the server side when a Knowledge Base is associated
1330
+ #
1331
+ # @return [Types::GetAgentKnowledgeBaseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1332
+ #
1333
+ # * {Types::GetAgentKnowledgeBaseResponse#agent_knowledge_base #agent_knowledge_base} => Types::AgentKnowledgeBase
1334
+ #
1335
+ # @example Request syntax with placeholder values
1336
+ #
1337
+ # resp = client.get_agent_knowledge_base({
1338
+ # agent_id: "Id", # required
1339
+ # agent_version: "Version", # required
1340
+ # knowledge_base_id: "Id", # required
1341
+ # })
1342
+ #
1343
+ # @example Response structure
1344
+ #
1345
+ # resp.agent_knowledge_base.agent_id #=> String
1346
+ # resp.agent_knowledge_base.agent_version #=> String
1347
+ # resp.agent_knowledge_base.knowledge_base_id #=> String
1348
+ # resp.agent_knowledge_base.description #=> String
1349
+ # resp.agent_knowledge_base.created_at #=> Time
1350
+ # resp.agent_knowledge_base.updated_at #=> Time
1351
+ # resp.agent_knowledge_base.knowledge_base_state #=> String, one of "ENABLED", "DISABLED"
1352
+ #
1353
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/GetAgentKnowledgeBase AWS API Documentation
1354
+ #
1355
+ # @overload get_agent_knowledge_base(params = {})
1356
+ # @param [Hash] params ({})
1357
+ def get_agent_knowledge_base(params = {}, options = {})
1358
+ req = build_request(:get_agent_knowledge_base, params)
1359
+ req.send_request(options)
1360
+ end
1361
+
1362
+ # Gets an Agent version for existing Amazon Bedrock Agent
1363
+ #
1364
+ # @option params [required, String] :agent_id
1365
+ # Id generated at the server side when an Agent is created
1366
+ #
1367
+ # @option params [required, String] :agent_version
1368
+ # Numerical Agent Version.
1369
+ #
1370
+ # @return [Types::GetAgentVersionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1371
+ #
1372
+ # * {Types::GetAgentVersionResponse#agent_version #agent_version} => Types::AgentVersion
1373
+ #
1374
+ # @example Request syntax with placeholder values
1375
+ #
1376
+ # resp = client.get_agent_version({
1377
+ # agent_id: "Id", # required
1378
+ # agent_version: "NumericalVersion", # required
1379
+ # })
1380
+ #
1381
+ # @example Response structure
1382
+ #
1383
+ # resp.agent_version.agent_id #=> String
1384
+ # resp.agent_version.agent_name #=> String
1385
+ # resp.agent_version.agent_arn #=> String
1386
+ # resp.agent_version.version #=> String
1387
+ # resp.agent_version.instruction #=> String
1388
+ # resp.agent_version.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
1389
+ # resp.agent_version.foundation_model #=> String
1390
+ # resp.agent_version.description #=> String
1391
+ # resp.agent_version.idle_session_ttl_in_seconds #=> Integer
1392
+ # resp.agent_version.agent_resource_role_arn #=> String
1393
+ # resp.agent_version.customer_encryption_key_arn #=> String
1394
+ # resp.agent_version.created_at #=> Time
1395
+ # resp.agent_version.updated_at #=> Time
1396
+ # resp.agent_version.failure_reasons #=> Array
1397
+ # resp.agent_version.failure_reasons[0] #=> String
1398
+ # resp.agent_version.recommended_actions #=> Array
1399
+ # resp.agent_version.recommended_actions[0] #=> String
1400
+ # resp.agent_version.prompt_override_configuration.prompt_configurations #=> Array
1401
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].prompt_type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "POST_PROCESSING", "KNOWLEDGE_BASE_RESPONSE_GENERATION"
1402
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].prompt_creation_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
1403
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].prompt_state #=> String, one of "ENABLED", "DISABLED"
1404
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].base_prompt_template #=> String
1405
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.temperature #=> Float
1406
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_p #=> Float
1407
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_k #=> Integer
1408
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.maximum_length #=> Integer
1409
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences #=> Array
1410
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences[0] #=> String
1411
+ # resp.agent_version.prompt_override_configuration.prompt_configurations[0].parser_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
1412
+ # resp.agent_version.prompt_override_configuration.override_lambda #=> String
1413
+ #
1414
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/GetAgentVersion AWS API Documentation
1415
+ #
1416
+ # @overload get_agent_version(params = {})
1417
+ # @param [Hash] params ({})
1418
+ def get_agent_version(params = {}, options = {})
1419
+ req = build_request(:get_agent_version, params)
1420
+ req.send_request(options)
1421
+ end
1422
+
1423
+ # Get an existing data source
1424
+ #
1425
+ # @option params [required, String] :knowledge_base_id
1426
+ # Identifier for a resource.
1427
+ #
1428
+ # @option params [required, String] :data_source_id
1429
+ # Identifier for a resource.
1430
+ #
1431
+ # @return [Types::GetDataSourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1432
+ #
1433
+ # * {Types::GetDataSourceResponse#data_source #data_source} => Types::DataSource
1434
+ #
1435
+ # @example Request syntax with placeholder values
1436
+ #
1437
+ # resp = client.get_data_source({
1438
+ # knowledge_base_id: "Id", # required
1439
+ # data_source_id: "Id", # required
1440
+ # })
1441
+ #
1442
+ # @example Response structure
1443
+ #
1444
+ # resp.data_source.knowledge_base_id #=> String
1445
+ # resp.data_source.data_source_id #=> String
1446
+ # resp.data_source.name #=> String
1447
+ # resp.data_source.status #=> String, one of "AVAILABLE", "DELETING"
1448
+ # resp.data_source.description #=> String
1449
+ # resp.data_source.data_source_configuration.type #=> String, one of "S3"
1450
+ # resp.data_source.data_source_configuration.s3_configuration.bucket_arn #=> String
1451
+ # resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes #=> Array
1452
+ # resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes[0] #=> String
1453
+ # resp.data_source.server_side_encryption_configuration.kms_key_arn #=> String
1454
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.chunking_strategy #=> String, one of "FIXED_SIZE", "NONE"
1455
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.max_tokens #=> Integer
1456
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.overlap_percentage #=> Integer
1457
+ # resp.data_source.created_at #=> Time
1458
+ # resp.data_source.updated_at #=> Time
1459
+ #
1460
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/GetDataSource AWS API Documentation
1461
+ #
1462
+ # @overload get_data_source(params = {})
1463
+ # @param [Hash] params ({})
1464
+ def get_data_source(params = {}, options = {})
1465
+ req = build_request(:get_data_source, params)
1466
+ req.send_request(options)
1467
+ end
1468
+
1469
+ # Get an ingestion job
1470
+ #
1471
+ # @option params [required, String] :knowledge_base_id
1472
+ # Identifier for a resource.
1473
+ #
1474
+ # @option params [required, String] :data_source_id
1475
+ # Identifier for a resource.
1476
+ #
1477
+ # @option params [required, String] :ingestion_job_id
1478
+ # Identifier for a resource.
1479
+ #
1480
+ # @return [Types::GetIngestionJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1481
+ #
1482
+ # * {Types::GetIngestionJobResponse#ingestion_job #ingestion_job} => Types::IngestionJob
1483
+ #
1484
+ # @example Request syntax with placeholder values
1485
+ #
1486
+ # resp = client.get_ingestion_job({
1487
+ # knowledge_base_id: "Id", # required
1488
+ # data_source_id: "Id", # required
1489
+ # ingestion_job_id: "Id", # required
1490
+ # })
1491
+ #
1492
+ # @example Response structure
1493
+ #
1494
+ # resp.ingestion_job.knowledge_base_id #=> String
1495
+ # resp.ingestion_job.data_source_id #=> String
1496
+ # resp.ingestion_job.ingestion_job_id #=> String
1497
+ # resp.ingestion_job.description #=> String
1498
+ # resp.ingestion_job.status #=> String, one of "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED"
1499
+ # resp.ingestion_job.statistics.number_of_documents_scanned #=> Integer
1500
+ # resp.ingestion_job.statistics.number_of_new_documents_indexed #=> Integer
1501
+ # resp.ingestion_job.statistics.number_of_modified_documents_indexed #=> Integer
1502
+ # resp.ingestion_job.statistics.number_of_documents_deleted #=> Integer
1503
+ # resp.ingestion_job.statistics.number_of_documents_failed #=> Integer
1504
+ # resp.ingestion_job.failure_reasons #=> Array
1505
+ # resp.ingestion_job.failure_reasons[0] #=> String
1506
+ # resp.ingestion_job.started_at #=> Time
1507
+ # resp.ingestion_job.updated_at #=> Time
1508
+ #
1509
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/GetIngestionJob AWS API Documentation
1510
+ #
1511
+ # @overload get_ingestion_job(params = {})
1512
+ # @param [Hash] params ({})
1513
+ def get_ingestion_job(params = {}, options = {})
1514
+ req = build_request(:get_ingestion_job, params)
1515
+ req.send_request(options)
1516
+ end
1517
+
1518
+ # Get an existing knowledge base
1519
+ #
1520
+ # @option params [required, String] :knowledge_base_id
1521
+ # Identifier for a resource.
1522
+ #
1523
+ # @return [Types::GetKnowledgeBaseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1524
+ #
1525
+ # * {Types::GetKnowledgeBaseResponse#knowledge_base #knowledge_base} => Types::KnowledgeBase
1526
+ #
1527
+ # @example Request syntax with placeholder values
1528
+ #
1529
+ # resp = client.get_knowledge_base({
1530
+ # knowledge_base_id: "Id", # required
1531
+ # })
1532
+ #
1533
+ # @example Response structure
1534
+ #
1535
+ # resp.knowledge_base.knowledge_base_id #=> String
1536
+ # resp.knowledge_base.name #=> String
1537
+ # resp.knowledge_base.knowledge_base_arn #=> String
1538
+ # resp.knowledge_base.description #=> String
1539
+ # resp.knowledge_base.role_arn #=> String
1540
+ # resp.knowledge_base.knowledge_base_configuration.type #=> String, one of "VECTOR"
1541
+ # resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_arn #=> String
1542
+ # resp.knowledge_base.storage_configuration.type #=> String, one of "OPENSEARCH_SERVERLESS", "PINECONE", "REDIS_ENTERPRISE_CLOUD"
1543
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.collection_arn #=> String
1544
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.vector_index_name #=> String
1545
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.vector_field #=> String
1546
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.text_field #=> String
1547
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.metadata_field #=> String
1548
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.connection_string #=> String
1549
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.credentials_secret_arn #=> String
1550
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.namespace #=> String
1551
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.text_field #=> String
1552
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.metadata_field #=> String
1553
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.endpoint #=> String
1554
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.vector_index_name #=> String
1555
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.credentials_secret_arn #=> String
1556
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.vector_field #=> String
1557
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.text_field #=> String
1558
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.metadata_field #=> String
1559
+ # resp.knowledge_base.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED"
1560
+ # resp.knowledge_base.created_at #=> Time
1561
+ # resp.knowledge_base.updated_at #=> Time
1562
+ # resp.knowledge_base.failure_reasons #=> Array
1563
+ # resp.knowledge_base.failure_reasons[0] #=> String
1564
+ #
1565
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/GetKnowledgeBase AWS API Documentation
1566
+ #
1567
+ # @overload get_knowledge_base(params = {})
1568
+ # @param [Hash] params ({})
1569
+ def get_knowledge_base(params = {}, options = {})
1570
+ req = build_request(:get_knowledge_base, params)
1571
+ req.send_request(options)
1572
+ end
1573
+
1574
+ # Lists an Action Group for existing Amazon Bedrock Agent Version
1575
+ #
1576
+ # @option params [required, String] :agent_id
1577
+ # Id generated at the server side when an Agent is Listed
1578
+ #
1579
+ # @option params [required, String] :agent_version
1580
+ # Id generated at the server side when an Agent is Listed
1581
+ #
1582
+ # @option params [Integer] :max_results
1583
+ # Max Results.
1584
+ #
1585
+ # @option params [String] :next_token
1586
+ # Opaque continuation token of previous paginated response.
1587
+ #
1588
+ # @return [Types::ListAgentActionGroupsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1589
+ #
1590
+ # * {Types::ListAgentActionGroupsResponse#action_group_summaries #action_group_summaries} => Array&lt;Types::ActionGroupSummary&gt;
1591
+ # * {Types::ListAgentActionGroupsResponse#next_token #next_token} => String
1592
+ #
1593
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1594
+ #
1595
+ # @example Request syntax with placeholder values
1596
+ #
1597
+ # resp = client.list_agent_action_groups({
1598
+ # agent_id: "Id", # required
1599
+ # agent_version: "Version", # required
1600
+ # max_results: 1,
1601
+ # next_token: "NextToken",
1602
+ # })
1603
+ #
1604
+ # @example Response structure
1605
+ #
1606
+ # resp.action_group_summaries #=> Array
1607
+ # resp.action_group_summaries[0].action_group_id #=> String
1608
+ # resp.action_group_summaries[0].action_group_name #=> String
1609
+ # resp.action_group_summaries[0].action_group_state #=> String, one of "ENABLED", "DISABLED"
1610
+ # resp.action_group_summaries[0].description #=> String
1611
+ # resp.action_group_summaries[0].updated_at #=> Time
1612
+ # resp.next_token #=> String
1613
+ #
1614
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListAgentActionGroups AWS API Documentation
1615
+ #
1616
+ # @overload list_agent_action_groups(params = {})
1617
+ # @param [Hash] params ({})
1618
+ def list_agent_action_groups(params = {}, options = {})
1619
+ req = build_request(:list_agent_action_groups, params)
1620
+ req.send_request(options)
1621
+ end
1622
+
1623
+ # Lists all the Aliases for an Amazon Bedrock Agent
1624
+ #
1625
+ # @option params [required, String] :agent_id
1626
+ # Id generated at the server side when an Agent is created
1627
+ #
1628
+ # @option params [Integer] :max_results
1629
+ # Max Results.
1630
+ #
1631
+ # @option params [String] :next_token
1632
+ # Opaque continuation token of previous paginated response.
1633
+ #
1634
+ # @return [Types::ListAgentAliasesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1635
+ #
1636
+ # * {Types::ListAgentAliasesResponse#agent_alias_summaries #agent_alias_summaries} => Array&lt;Types::AgentAliasSummary&gt;
1637
+ # * {Types::ListAgentAliasesResponse#next_token #next_token} => String
1638
+ #
1639
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1640
+ #
1641
+ # @example Request syntax with placeholder values
1642
+ #
1643
+ # resp = client.list_agent_aliases({
1644
+ # agent_id: "Id", # required
1645
+ # max_results: 1,
1646
+ # next_token: "NextToken",
1647
+ # })
1648
+ #
1649
+ # @example Response structure
1650
+ #
1651
+ # resp.agent_alias_summaries #=> Array
1652
+ # resp.agent_alias_summaries[0].agent_alias_id #=> String
1653
+ # resp.agent_alias_summaries[0].agent_alias_name #=> String
1654
+ # resp.agent_alias_summaries[0].description #=> String
1655
+ # resp.agent_alias_summaries[0].routing_configuration #=> Array
1656
+ # resp.agent_alias_summaries[0].routing_configuration[0].agent_version #=> String
1657
+ # resp.agent_alias_summaries[0].agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
1658
+ # resp.agent_alias_summaries[0].created_at #=> Time
1659
+ # resp.agent_alias_summaries[0].updated_at #=> Time
1660
+ # resp.next_token #=> String
1661
+ #
1662
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListAgentAliases AWS API Documentation
1663
+ #
1664
+ # @overload list_agent_aliases(params = {})
1665
+ # @param [Hash] params ({})
1666
+ def list_agent_aliases(params = {}, options = {})
1667
+ req = build_request(:list_agent_aliases, params)
1668
+ req.send_request(options)
1669
+ end
1670
+
1671
+ # List of Knowledge Bases associated to an existing Amazon Bedrock Agent
1672
+ # Version
1673
+ #
1674
+ # @option params [required, String] :agent_id
1675
+ # Id generated at the server side when an Agent is created
1676
+ #
1677
+ # @option params [required, String] :agent_version
1678
+ # Version number generated when a version is created
1679
+ #
1680
+ # @option params [Integer] :max_results
1681
+ # Max Results.
1682
+ #
1683
+ # @option params [String] :next_token
1684
+ # Opaque continuation token of previous paginated response.
1685
+ #
1686
+ # @return [Types::ListAgentKnowledgeBasesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1687
+ #
1688
+ # * {Types::ListAgentKnowledgeBasesResponse#agent_knowledge_base_summaries #agent_knowledge_base_summaries} => Array&lt;Types::AgentKnowledgeBaseSummary&gt;
1689
+ # * {Types::ListAgentKnowledgeBasesResponse#next_token #next_token} => String
1690
+ #
1691
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1692
+ #
1693
+ # @example Request syntax with placeholder values
1694
+ #
1695
+ # resp = client.list_agent_knowledge_bases({
1696
+ # agent_id: "Id", # required
1697
+ # agent_version: "Version", # required
1698
+ # max_results: 1,
1699
+ # next_token: "NextToken",
1700
+ # })
1701
+ #
1702
+ # @example Response structure
1703
+ #
1704
+ # resp.agent_knowledge_base_summaries #=> Array
1705
+ # resp.agent_knowledge_base_summaries[0].knowledge_base_id #=> String
1706
+ # resp.agent_knowledge_base_summaries[0].description #=> String
1707
+ # resp.agent_knowledge_base_summaries[0].knowledge_base_state #=> String, one of "ENABLED", "DISABLED"
1708
+ # resp.agent_knowledge_base_summaries[0].updated_at #=> Time
1709
+ # resp.next_token #=> String
1710
+ #
1711
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListAgentKnowledgeBases AWS API Documentation
1712
+ #
1713
+ # @overload list_agent_knowledge_bases(params = {})
1714
+ # @param [Hash] params ({})
1715
+ def list_agent_knowledge_bases(params = {}, options = {})
1716
+ req = build_request(:list_agent_knowledge_bases, params)
1717
+ req.send_request(options)
1718
+ end
1719
+
1720
+ # Lists Agent Versions
1721
+ #
1722
+ # @option params [required, String] :agent_id
1723
+ # Id generated at the server side when an Agent is created
1724
+ #
1725
+ # @option params [Integer] :max_results
1726
+ # Max Results.
1727
+ #
1728
+ # @option params [String] :next_token
1729
+ # Opaque continuation token of previous paginated response.
1730
+ #
1731
+ # @return [Types::ListAgentVersionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1732
+ #
1733
+ # * {Types::ListAgentVersionsResponse#agent_version_summaries #agent_version_summaries} => Array&lt;Types::AgentVersionSummary&gt;
1734
+ # * {Types::ListAgentVersionsResponse#next_token #next_token} => String
1735
+ #
1736
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1737
+ #
1738
+ # @example Request syntax with placeholder values
1739
+ #
1740
+ # resp = client.list_agent_versions({
1741
+ # agent_id: "Id", # required
1742
+ # max_results: 1,
1743
+ # next_token: "NextToken",
1744
+ # })
1745
+ #
1746
+ # @example Response structure
1747
+ #
1748
+ # resp.agent_version_summaries #=> Array
1749
+ # resp.agent_version_summaries[0].agent_name #=> String
1750
+ # resp.agent_version_summaries[0].agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
1751
+ # resp.agent_version_summaries[0].agent_version #=> String
1752
+ # resp.agent_version_summaries[0].created_at #=> Time
1753
+ # resp.agent_version_summaries[0].updated_at #=> Time
1754
+ # resp.agent_version_summaries[0].description #=> String
1755
+ # resp.next_token #=> String
1756
+ #
1757
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListAgentVersions AWS API Documentation
1758
+ #
1759
+ # @overload list_agent_versions(params = {})
1760
+ # @param [Hash] params ({})
1761
+ def list_agent_versions(params = {}, options = {})
1762
+ req = build_request(:list_agent_versions, params)
1763
+ req.send_request(options)
1764
+ end
1765
+
1766
+ # Lists Agents
1767
+ #
1768
+ # @option params [Integer] :max_results
1769
+ # Max Results.
1770
+ #
1771
+ # @option params [String] :next_token
1772
+ # Opaque continuation token of previous paginated response.
1773
+ #
1774
+ # @return [Types::ListAgentsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1775
+ #
1776
+ # * {Types::ListAgentsResponse#agent_summaries #agent_summaries} => Array&lt;Types::AgentSummary&gt;
1777
+ # * {Types::ListAgentsResponse#next_token #next_token} => String
1778
+ #
1779
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1780
+ #
1781
+ # @example Request syntax with placeholder values
1782
+ #
1783
+ # resp = client.list_agents({
1784
+ # max_results: 1,
1785
+ # next_token: "NextToken",
1786
+ # })
1787
+ #
1788
+ # @example Response structure
1789
+ #
1790
+ # resp.agent_summaries #=> Array
1791
+ # resp.agent_summaries[0].agent_id #=> String
1792
+ # resp.agent_summaries[0].agent_name #=> String
1793
+ # resp.agent_summaries[0].agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
1794
+ # resp.agent_summaries[0].description #=> String
1795
+ # resp.agent_summaries[0].updated_at #=> Time
1796
+ # resp.agent_summaries[0].latest_agent_version #=> String
1797
+ # resp.next_token #=> String
1798
+ #
1799
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListAgents AWS API Documentation
1800
+ #
1801
+ # @overload list_agents(params = {})
1802
+ # @param [Hash] params ({})
1803
+ def list_agents(params = {}, options = {})
1804
+ req = build_request(:list_agents, params)
1805
+ req.send_request(options)
1806
+ end
1807
+
1808
+ # List data sources
1809
+ #
1810
+ # @option params [required, String] :knowledge_base_id
1811
+ # Identifier for a resource.
1812
+ #
1813
+ # @option params [Integer] :max_results
1814
+ # Max Results.
1815
+ #
1816
+ # @option params [String] :next_token
1817
+ # Opaque continuation token of previous paginated response.
1818
+ #
1819
+ # @return [Types::ListDataSourcesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1820
+ #
1821
+ # * {Types::ListDataSourcesResponse#data_source_summaries #data_source_summaries} => Array&lt;Types::DataSourceSummary&gt;
1822
+ # * {Types::ListDataSourcesResponse#next_token #next_token} => String
1823
+ #
1824
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1825
+ #
1826
+ # @example Request syntax with placeholder values
1827
+ #
1828
+ # resp = client.list_data_sources({
1829
+ # knowledge_base_id: "Id", # required
1830
+ # max_results: 1,
1831
+ # next_token: "NextToken",
1832
+ # })
1833
+ #
1834
+ # @example Response structure
1835
+ #
1836
+ # resp.data_source_summaries #=> Array
1837
+ # resp.data_source_summaries[0].knowledge_base_id #=> String
1838
+ # resp.data_source_summaries[0].data_source_id #=> String
1839
+ # resp.data_source_summaries[0].name #=> String
1840
+ # resp.data_source_summaries[0].status #=> String, one of "AVAILABLE", "DELETING"
1841
+ # resp.data_source_summaries[0].description #=> String
1842
+ # resp.data_source_summaries[0].updated_at #=> Time
1843
+ # resp.next_token #=> String
1844
+ #
1845
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListDataSources AWS API Documentation
1846
+ #
1847
+ # @overload list_data_sources(params = {})
1848
+ # @param [Hash] params ({})
1849
+ def list_data_sources(params = {}, options = {})
1850
+ req = build_request(:list_data_sources, params)
1851
+ req.send_request(options)
1852
+ end
1853
+
1854
+ # List ingestion jobs
1855
+ #
1856
+ # @option params [required, String] :knowledge_base_id
1857
+ # Identifier for a resource.
1858
+ #
1859
+ # @option params [required, String] :data_source_id
1860
+ # Identifier for a resource.
1861
+ #
1862
+ # @option params [Array<Types::IngestionJobFilter>] :filters
1863
+ # List of IngestionJobFilters
1864
+ #
1865
+ # @option params [Types::IngestionJobSortBy] :sort_by
1866
+ # Sorts the response returned by ListIngestionJobs operation.
1867
+ #
1868
+ # @option params [Integer] :max_results
1869
+ # Max Results.
1870
+ #
1871
+ # @option params [String] :next_token
1872
+ # Opaque continuation token of previous paginated response.
1873
+ #
1874
+ # @return [Types::ListIngestionJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1875
+ #
1876
+ # * {Types::ListIngestionJobsResponse#ingestion_job_summaries #ingestion_job_summaries} => Array&lt;Types::IngestionJobSummary&gt;
1877
+ # * {Types::ListIngestionJobsResponse#next_token #next_token} => String
1878
+ #
1879
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1880
+ #
1881
+ # @example Request syntax with placeholder values
1882
+ #
1883
+ # resp = client.list_ingestion_jobs({
1884
+ # knowledge_base_id: "Id", # required
1885
+ # data_source_id: "Id", # required
1886
+ # filters: [
1887
+ # {
1888
+ # attribute: "STATUS", # required, accepts STATUS
1889
+ # operator: "EQ", # required, accepts EQ
1890
+ # values: ["IngestionJobFilterValue"], # required
1891
+ # },
1892
+ # ],
1893
+ # sort_by: {
1894
+ # attribute: "STATUS", # required, accepts STATUS, STARTED_AT
1895
+ # order: "ASCENDING", # required, accepts ASCENDING, DESCENDING
1896
+ # },
1897
+ # max_results: 1,
1898
+ # next_token: "NextToken",
1899
+ # })
1900
+ #
1901
+ # @example Response structure
1902
+ #
1903
+ # resp.ingestion_job_summaries #=> Array
1904
+ # resp.ingestion_job_summaries[0].knowledge_base_id #=> String
1905
+ # resp.ingestion_job_summaries[0].data_source_id #=> String
1906
+ # resp.ingestion_job_summaries[0].ingestion_job_id #=> String
1907
+ # resp.ingestion_job_summaries[0].description #=> String
1908
+ # resp.ingestion_job_summaries[0].status #=> String, one of "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED"
1909
+ # resp.ingestion_job_summaries[0].started_at #=> Time
1910
+ # resp.ingestion_job_summaries[0].updated_at #=> Time
1911
+ # resp.ingestion_job_summaries[0].statistics.number_of_documents_scanned #=> Integer
1912
+ # resp.ingestion_job_summaries[0].statistics.number_of_new_documents_indexed #=> Integer
1913
+ # resp.ingestion_job_summaries[0].statistics.number_of_modified_documents_indexed #=> Integer
1914
+ # resp.ingestion_job_summaries[0].statistics.number_of_documents_deleted #=> Integer
1915
+ # resp.ingestion_job_summaries[0].statistics.number_of_documents_failed #=> Integer
1916
+ # resp.next_token #=> String
1917
+ #
1918
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListIngestionJobs AWS API Documentation
1919
+ #
1920
+ # @overload list_ingestion_jobs(params = {})
1921
+ # @param [Hash] params ({})
1922
+ def list_ingestion_jobs(params = {}, options = {})
1923
+ req = build_request(:list_ingestion_jobs, params)
1924
+ req.send_request(options)
1925
+ end
1926
+
1927
+ # List Knowledge Bases
1928
+ #
1929
+ # @option params [Integer] :max_results
1930
+ # Max Results.
1931
+ #
1932
+ # @option params [String] :next_token
1933
+ # Opaque continuation token of previous paginated response.
1934
+ #
1935
+ # @return [Types::ListKnowledgeBasesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1936
+ #
1937
+ # * {Types::ListKnowledgeBasesResponse#knowledge_base_summaries #knowledge_base_summaries} => Array&lt;Types::KnowledgeBaseSummary&gt;
1938
+ # * {Types::ListKnowledgeBasesResponse#next_token #next_token} => String
1939
+ #
1940
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1941
+ #
1942
+ # @example Request syntax with placeholder values
1943
+ #
1944
+ # resp = client.list_knowledge_bases({
1945
+ # max_results: 1,
1946
+ # next_token: "NextToken",
1947
+ # })
1948
+ #
1949
+ # @example Response structure
1950
+ #
1951
+ # resp.knowledge_base_summaries #=> Array
1952
+ # resp.knowledge_base_summaries[0].knowledge_base_id #=> String
1953
+ # resp.knowledge_base_summaries[0].name #=> String
1954
+ # resp.knowledge_base_summaries[0].description #=> String
1955
+ # resp.knowledge_base_summaries[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED"
1956
+ # resp.knowledge_base_summaries[0].updated_at #=> Time
1957
+ # resp.next_token #=> String
1958
+ #
1959
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListKnowledgeBases AWS API Documentation
1960
+ #
1961
+ # @overload list_knowledge_bases(params = {})
1962
+ # @param [Hash] params ({})
1963
+ def list_knowledge_bases(params = {}, options = {})
1964
+ req = build_request(:list_knowledge_bases, params)
1965
+ req.send_request(options)
1966
+ end
1967
+
1968
+ # List tags for a resource
1969
+ #
1970
+ # @option params [required, String] :resource_arn
1971
+ # ARN of Taggable resources: \[Agent, AgentAlias, Knowledge-Base\]
1972
+ #
1973
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1974
+ #
1975
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Hash&lt;String,String&gt;
1976
+ #
1977
+ # @example Request syntax with placeholder values
1978
+ #
1979
+ # resp = client.list_tags_for_resource({
1980
+ # resource_arn: "TaggableResourcesArn", # required
1981
+ # })
1982
+ #
1983
+ # @example Response structure
1984
+ #
1985
+ # resp.tags #=> Hash
1986
+ # resp.tags["TagKey"] #=> String
1987
+ #
1988
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/ListTagsForResource AWS API Documentation
1989
+ #
1990
+ # @overload list_tags_for_resource(params = {})
1991
+ # @param [Hash] params ({})
1992
+ def list_tags_for_resource(params = {}, options = {})
1993
+ req = build_request(:list_tags_for_resource, params)
1994
+ req.send_request(options)
1995
+ end
1996
+
1997
+ # Prepares an existing Amazon Bedrock Agent to receive runtime requests
1998
+ #
1999
+ # @option params [required, String] :agent_id
2000
+ # Id generated at the server side when an Agent is created
2001
+ #
2002
+ # @return [Types::PrepareAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2003
+ #
2004
+ # * {Types::PrepareAgentResponse#agent_id #agent_id} => String
2005
+ # * {Types::PrepareAgentResponse#agent_status #agent_status} => String
2006
+ # * {Types::PrepareAgentResponse#agent_version #agent_version} => String
2007
+ # * {Types::PrepareAgentResponse#prepared_at #prepared_at} => Time
2008
+ #
2009
+ # @example Request syntax with placeholder values
2010
+ #
2011
+ # resp = client.prepare_agent({
2012
+ # agent_id: "Id", # required
2013
+ # })
2014
+ #
2015
+ # @example Response structure
2016
+ #
2017
+ # resp.agent_id #=> String
2018
+ # resp.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
2019
+ # resp.agent_version #=> String
2020
+ # resp.prepared_at #=> Time
2021
+ #
2022
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/PrepareAgent AWS API Documentation
2023
+ #
2024
+ # @overload prepare_agent(params = {})
2025
+ # @param [Hash] params ({})
2026
+ def prepare_agent(params = {}, options = {})
2027
+ req = build_request(:prepare_agent, params)
2028
+ req.send_request(options)
2029
+ end
2030
+
2031
+ # Start a new ingestion job
2032
+ #
2033
+ # @option params [required, String] :knowledge_base_id
2034
+ # Identifier for a resource.
2035
+ #
2036
+ # @option params [required, String] :data_source_id
2037
+ # Identifier for a resource.
2038
+ #
2039
+ # @option params [String] :client_token
2040
+ # Client specified token used for idempotency checks
2041
+ #
2042
+ # **A suitable default value is auto-generated.** You should normally
2043
+ # not need to pass this option.**
2044
+ #
2045
+ # @option params [String] :description
2046
+ # Description of the Resource.
2047
+ #
2048
+ # @return [Types::StartIngestionJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2049
+ #
2050
+ # * {Types::StartIngestionJobResponse#ingestion_job #ingestion_job} => Types::IngestionJob
2051
+ #
2052
+ # @example Request syntax with placeholder values
2053
+ #
2054
+ # resp = client.start_ingestion_job({
2055
+ # knowledge_base_id: "Id", # required
2056
+ # data_source_id: "Id", # required
2057
+ # client_token: "ClientToken",
2058
+ # description: "Description",
2059
+ # })
2060
+ #
2061
+ # @example Response structure
2062
+ #
2063
+ # resp.ingestion_job.knowledge_base_id #=> String
2064
+ # resp.ingestion_job.data_source_id #=> String
2065
+ # resp.ingestion_job.ingestion_job_id #=> String
2066
+ # resp.ingestion_job.description #=> String
2067
+ # resp.ingestion_job.status #=> String, one of "STARTING", "IN_PROGRESS", "COMPLETE", "FAILED"
2068
+ # resp.ingestion_job.statistics.number_of_documents_scanned #=> Integer
2069
+ # resp.ingestion_job.statistics.number_of_new_documents_indexed #=> Integer
2070
+ # resp.ingestion_job.statistics.number_of_modified_documents_indexed #=> Integer
2071
+ # resp.ingestion_job.statistics.number_of_documents_deleted #=> Integer
2072
+ # resp.ingestion_job.statistics.number_of_documents_failed #=> Integer
2073
+ # resp.ingestion_job.failure_reasons #=> Array
2074
+ # resp.ingestion_job.failure_reasons[0] #=> String
2075
+ # resp.ingestion_job.started_at #=> Time
2076
+ # resp.ingestion_job.updated_at #=> Time
2077
+ #
2078
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/StartIngestionJob AWS API Documentation
2079
+ #
2080
+ # @overload start_ingestion_job(params = {})
2081
+ # @param [Hash] params ({})
2082
+ def start_ingestion_job(params = {}, options = {})
2083
+ req = build_request(:start_ingestion_job, params)
2084
+ req.send_request(options)
2085
+ end
2086
+
2087
+ # Tag a resource
2088
+ #
2089
+ # @option params [required, String] :resource_arn
2090
+ # ARN of Taggable resources: \[Agent, AgentAlias, Knowledge-Base\]
2091
+ #
2092
+ # @option params [required, Hash<String,String>] :tags
2093
+ # A map of tag keys and values
2094
+ #
2095
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2096
+ #
2097
+ # @example Request syntax with placeholder values
2098
+ #
2099
+ # resp = client.tag_resource({
2100
+ # resource_arn: "TaggableResourcesArn", # required
2101
+ # tags: { # required
2102
+ # "TagKey" => "TagValue",
2103
+ # },
2104
+ # })
2105
+ #
2106
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/TagResource AWS API Documentation
2107
+ #
2108
+ # @overload tag_resource(params = {})
2109
+ # @param [Hash] params ({})
2110
+ def tag_resource(params = {}, options = {})
2111
+ req = build_request(:tag_resource, params)
2112
+ req.send_request(options)
2113
+ end
2114
+
2115
+ # Untag a resource
2116
+ #
2117
+ # @option params [required, String] :resource_arn
2118
+ # ARN of Taggable resources: \[Agent, AgentAlias, Knowledge-Base\]
2119
+ #
2120
+ # @option params [required, Array<String>] :tag_keys
2121
+ # List of Tag Keys
2122
+ #
2123
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2124
+ #
2125
+ # @example Request syntax with placeholder values
2126
+ #
2127
+ # resp = client.untag_resource({
2128
+ # resource_arn: "TaggableResourcesArn", # required
2129
+ # tag_keys: ["TagKey"], # required
2130
+ # })
2131
+ #
2132
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/UntagResource AWS API Documentation
2133
+ #
2134
+ # @overload untag_resource(params = {})
2135
+ # @param [Hash] params ({})
2136
+ def untag_resource(params = {}, options = {})
2137
+ req = build_request(:untag_resource, params)
2138
+ req.send_request(options)
2139
+ end
2140
+
2141
+ # Updates an existing Amazon Bedrock Agent
2142
+ #
2143
+ # @option params [required, String] :agent_id
2144
+ # Id generated at the server side when an Agent is created
2145
+ #
2146
+ # @option params [required, String] :agent_name
2147
+ # Name for a resource.
2148
+ #
2149
+ # @option params [String] :instruction
2150
+ # Instruction for the agent.
2151
+ #
2152
+ # @option params [String] :foundation_model
2153
+ # ARN or name of a Bedrock model.
2154
+ #
2155
+ # @option params [String] :description
2156
+ # Description of the Resource.
2157
+ #
2158
+ # @option params [Integer] :idle_session_ttl_in_seconds
2159
+ # Max Session Time.
2160
+ #
2161
+ # @option params [required, String] :agent_resource_role_arn
2162
+ # ARN of a IAM role.
2163
+ #
2164
+ # @option params [String] :customer_encryption_key_arn
2165
+ # A KMS key ARN
2166
+ #
2167
+ # @option params [Types::PromptOverrideConfiguration] :prompt_override_configuration
2168
+ # Configuration for prompt override.
2169
+ #
2170
+ # @return [Types::UpdateAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2171
+ #
2172
+ # * {Types::UpdateAgentResponse#agent #agent} => Types::Agent
2173
+ #
2174
+ # @example Request syntax with placeholder values
2175
+ #
2176
+ # resp = client.update_agent({
2177
+ # agent_id: "Id", # required
2178
+ # agent_name: "Name", # required
2179
+ # instruction: "Instruction",
2180
+ # foundation_model: "ModelIdentifier",
2181
+ # description: "Description",
2182
+ # idle_session_ttl_in_seconds: 1,
2183
+ # agent_resource_role_arn: "AgentRoleArn", # required
2184
+ # customer_encryption_key_arn: "KmsKeyArn",
2185
+ # prompt_override_configuration: {
2186
+ # prompt_configurations: [ # required
2187
+ # {
2188
+ # prompt_type: "PRE_PROCESSING", # accepts PRE_PROCESSING, ORCHESTRATION, POST_PROCESSING, KNOWLEDGE_BASE_RESPONSE_GENERATION
2189
+ # prompt_creation_mode: "DEFAULT", # accepts DEFAULT, OVERRIDDEN
2190
+ # prompt_state: "ENABLED", # accepts ENABLED, DISABLED
2191
+ # base_prompt_template: "BasePromptTemplate",
2192
+ # inference_configuration: {
2193
+ # temperature: 1.0,
2194
+ # top_p: 1.0,
2195
+ # top_k: 1,
2196
+ # maximum_length: 1,
2197
+ # stop_sequences: ["String"],
2198
+ # },
2199
+ # parser_mode: "DEFAULT", # accepts DEFAULT, OVERRIDDEN
2200
+ # },
2201
+ # ],
2202
+ # override_lambda: "LambdaArn",
2203
+ # },
2204
+ # })
2205
+ #
2206
+ # @example Response structure
2207
+ #
2208
+ # resp.agent.agent_id #=> String
2209
+ # resp.agent.agent_name #=> String
2210
+ # resp.agent.agent_arn #=> String
2211
+ # resp.agent.agent_version #=> String
2212
+ # resp.agent.client_token #=> String
2213
+ # resp.agent.instruction #=> String
2214
+ # resp.agent.agent_status #=> String, one of "CREATING", "PREPARING", "PREPARED", "NOT_PREPARED", "DELETING", "FAILED", "VERSIONING", "UPDATING"
2215
+ # resp.agent.foundation_model #=> String
2216
+ # resp.agent.description #=> String
2217
+ # resp.agent.idle_session_ttl_in_seconds #=> Integer
2218
+ # resp.agent.agent_resource_role_arn #=> String
2219
+ # resp.agent.customer_encryption_key_arn #=> String
2220
+ # resp.agent.created_at #=> Time
2221
+ # resp.agent.updated_at #=> Time
2222
+ # resp.agent.prepared_at #=> Time
2223
+ # resp.agent.failure_reasons #=> Array
2224
+ # resp.agent.failure_reasons[0] #=> String
2225
+ # resp.agent.recommended_actions #=> Array
2226
+ # resp.agent.recommended_actions[0] #=> String
2227
+ # resp.agent.prompt_override_configuration.prompt_configurations #=> Array
2228
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "POST_PROCESSING", "KNOWLEDGE_BASE_RESPONSE_GENERATION"
2229
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_creation_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
2230
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].prompt_state #=> String, one of "ENABLED", "DISABLED"
2231
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].base_prompt_template #=> String
2232
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.temperature #=> Float
2233
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_p #=> Float
2234
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.top_k #=> Integer
2235
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.maximum_length #=> Integer
2236
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences #=> Array
2237
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].inference_configuration.stop_sequences[0] #=> String
2238
+ # resp.agent.prompt_override_configuration.prompt_configurations[0].parser_mode #=> String, one of "DEFAULT", "OVERRIDDEN"
2239
+ # resp.agent.prompt_override_configuration.override_lambda #=> String
2240
+ #
2241
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/UpdateAgent AWS API Documentation
2242
+ #
2243
+ # @overload update_agent(params = {})
2244
+ # @param [Hash] params ({})
2245
+ def update_agent(params = {}, options = {})
2246
+ req = build_request(:update_agent, params)
2247
+ req.send_request(options)
2248
+ end
2249
+
2250
+ # Updates an existing Action Group for Amazon Bedrock Agent
2251
+ #
2252
+ # @option params [required, String] :agent_id
2253
+ # Id generated at the server side when an Agent is created
2254
+ #
2255
+ # @option params [required, String] :agent_version
2256
+ # Draft Version of the Agent.
2257
+ #
2258
+ # @option params [required, String] :action_group_id
2259
+ # Id generated at the server side when an Action Group is created under
2260
+ # Agent
2261
+ #
2262
+ # @option params [required, String] :action_group_name
2263
+ # Name for a resource.
2264
+ #
2265
+ # @option params [String] :description
2266
+ # Description of the Resource.
2267
+ #
2268
+ # @option params [String] :parent_action_group_signature
2269
+ # Action Group Signature for a BuiltIn Action
2270
+ #
2271
+ # @option params [Types::ActionGroupExecutor] :action_group_executor
2272
+ # Type of Executors for an Action Group
2273
+ #
2274
+ # @option params [String] :action_group_state
2275
+ # State of the action group
2276
+ #
2277
+ # @option params [Types::APISchema] :api_schema
2278
+ # Contains information about the API Schema for the Action Group
2279
+ #
2280
+ # @return [Types::UpdateAgentActionGroupResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2281
+ #
2282
+ # * {Types::UpdateAgentActionGroupResponse#agent_action_group #agent_action_group} => Types::AgentActionGroup
2283
+ #
2284
+ # @example Request syntax with placeholder values
2285
+ #
2286
+ # resp = client.update_agent_action_group({
2287
+ # agent_id: "Id", # required
2288
+ # agent_version: "DraftVersion", # required
2289
+ # action_group_id: "Id", # required
2290
+ # action_group_name: "Name", # required
2291
+ # description: "Description",
2292
+ # parent_action_group_signature: "AMAZON.UserInput", # accepts AMAZON.UserInput
2293
+ # action_group_executor: {
2294
+ # lambda: "LambdaArn",
2295
+ # },
2296
+ # action_group_state: "ENABLED", # accepts ENABLED, DISABLED
2297
+ # api_schema: {
2298
+ # s3: {
2299
+ # s3_bucket_name: "S3BucketName",
2300
+ # s3_object_key: "S3ObjectKey",
2301
+ # },
2302
+ # payload: "Payload",
2303
+ # },
2304
+ # })
2305
+ #
2306
+ # @example Response structure
2307
+ #
2308
+ # resp.agent_action_group.agent_id #=> String
2309
+ # resp.agent_action_group.agent_version #=> String
2310
+ # resp.agent_action_group.action_group_id #=> String
2311
+ # resp.agent_action_group.action_group_name #=> String
2312
+ # resp.agent_action_group.client_token #=> String
2313
+ # resp.agent_action_group.description #=> String
2314
+ # resp.agent_action_group.created_at #=> Time
2315
+ # resp.agent_action_group.updated_at #=> Time
2316
+ # resp.agent_action_group.parent_action_signature #=> String, one of "AMAZON.UserInput"
2317
+ # resp.agent_action_group.action_group_executor.lambda #=> String
2318
+ # resp.agent_action_group.api_schema.s3.s3_bucket_name #=> String
2319
+ # resp.agent_action_group.api_schema.s3.s3_object_key #=> String
2320
+ # resp.agent_action_group.api_schema.payload #=> String
2321
+ # resp.agent_action_group.action_group_state #=> String, one of "ENABLED", "DISABLED"
2322
+ #
2323
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/UpdateAgentActionGroup AWS API Documentation
2324
+ #
2325
+ # @overload update_agent_action_group(params = {})
2326
+ # @param [Hash] params ({})
2327
+ def update_agent_action_group(params = {}, options = {})
2328
+ req = build_request(:update_agent_action_group, params)
2329
+ req.send_request(options)
2330
+ end
2331
+
2332
+ # Updates an existing Alias for an Amazon Bedrock Agent
2333
+ #
2334
+ # @option params [required, String] :agent_id
2335
+ # Id generated at the server side when an Agent is created
2336
+ #
2337
+ # @option params [required, String] :agent_alias_id
2338
+ # Id generated at the server side when an Agent Alias is created
2339
+ #
2340
+ # @option params [required, String] :agent_alias_name
2341
+ # Name for a resource.
2342
+ #
2343
+ # @option params [String] :description
2344
+ # Description of the Resource.
2345
+ #
2346
+ # @option params [Array<Types::AgentAliasRoutingConfigurationListItem>] :routing_configuration
2347
+ # Routing configuration for an Agent alias.
2348
+ #
2349
+ # @return [Types::UpdateAgentAliasResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2350
+ #
2351
+ # * {Types::UpdateAgentAliasResponse#agent_alias #agent_alias} => Types::AgentAlias
2352
+ #
2353
+ # @example Request syntax with placeholder values
2354
+ #
2355
+ # resp = client.update_agent_alias({
2356
+ # agent_id: "Id", # required
2357
+ # agent_alias_id: "AgentAliasId", # required
2358
+ # agent_alias_name: "Name", # required
2359
+ # description: "Description",
2360
+ # routing_configuration: [
2361
+ # {
2362
+ # agent_version: "Version", # required
2363
+ # },
2364
+ # ],
2365
+ # })
2366
+ #
2367
+ # @example Response structure
2368
+ #
2369
+ # resp.agent_alias.agent_id #=> String
2370
+ # resp.agent_alias.agent_alias_id #=> String
2371
+ # resp.agent_alias.agent_alias_name #=> String
2372
+ # resp.agent_alias.agent_alias_arn #=> String
2373
+ # resp.agent_alias.client_token #=> String
2374
+ # resp.agent_alias.description #=> String
2375
+ # resp.agent_alias.routing_configuration #=> Array
2376
+ # resp.agent_alias.routing_configuration[0].agent_version #=> String
2377
+ # resp.agent_alias.created_at #=> Time
2378
+ # resp.agent_alias.updated_at #=> Time
2379
+ # resp.agent_alias.agent_alias_history_events #=> Array
2380
+ # resp.agent_alias.agent_alias_history_events[0].routing_configuration #=> Array
2381
+ # resp.agent_alias.agent_alias_history_events[0].routing_configuration[0].agent_version #=> String
2382
+ # resp.agent_alias.agent_alias_history_events[0].end_date #=> Time
2383
+ # resp.agent_alias.agent_alias_history_events[0].start_date #=> Time
2384
+ # resp.agent_alias.agent_alias_status #=> String, one of "CREATING", "PREPARED", "FAILED", "UPDATING", "DELETING"
2385
+ #
2386
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/UpdateAgentAlias AWS API Documentation
2387
+ #
2388
+ # @overload update_agent_alias(params = {})
2389
+ # @param [Hash] params ({})
2390
+ def update_agent_alias(params = {}, options = {})
2391
+ req = build_request(:update_agent_alias, params)
2392
+ req.send_request(options)
2393
+ end
2394
+
2395
+ # Updates an existing Knowledge Base associated to an Amazon Bedrock
2396
+ # Agent
2397
+ #
2398
+ # @option params [required, String] :agent_id
2399
+ # Id generated at the server side when an Agent is created
2400
+ #
2401
+ # @option params [required, String] :agent_version
2402
+ # Draft Version of the Agent.
2403
+ #
2404
+ # @option params [required, String] :knowledge_base_id
2405
+ # Id generated at the server side when a Knowledge Base is associated to
2406
+ # an Agent
2407
+ #
2408
+ # @option params [String] :description
2409
+ # Description of the Resource.
2410
+ #
2411
+ # @option params [String] :knowledge_base_state
2412
+ # State of the knowledge base; whether it is enabled or disabled
2413
+ #
2414
+ # @return [Types::UpdateAgentKnowledgeBaseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2415
+ #
2416
+ # * {Types::UpdateAgentKnowledgeBaseResponse#agent_knowledge_base #agent_knowledge_base} => Types::AgentKnowledgeBase
2417
+ #
2418
+ # @example Request syntax with placeholder values
2419
+ #
2420
+ # resp = client.update_agent_knowledge_base({
2421
+ # agent_id: "Id", # required
2422
+ # agent_version: "DraftVersion", # required
2423
+ # knowledge_base_id: "Id", # required
2424
+ # description: "Description",
2425
+ # knowledge_base_state: "ENABLED", # accepts ENABLED, DISABLED
2426
+ # })
2427
+ #
2428
+ # @example Response structure
2429
+ #
2430
+ # resp.agent_knowledge_base.agent_id #=> String
2431
+ # resp.agent_knowledge_base.agent_version #=> String
2432
+ # resp.agent_knowledge_base.knowledge_base_id #=> String
2433
+ # resp.agent_knowledge_base.description #=> String
2434
+ # resp.agent_knowledge_base.created_at #=> Time
2435
+ # resp.agent_knowledge_base.updated_at #=> Time
2436
+ # resp.agent_knowledge_base.knowledge_base_state #=> String, one of "ENABLED", "DISABLED"
2437
+ #
2438
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/UpdateAgentKnowledgeBase AWS API Documentation
2439
+ #
2440
+ # @overload update_agent_knowledge_base(params = {})
2441
+ # @param [Hash] params ({})
2442
+ def update_agent_knowledge_base(params = {}, options = {})
2443
+ req = build_request(:update_agent_knowledge_base, params)
2444
+ req.send_request(options)
2445
+ end
2446
+
2447
+ # Update an existing data source
2448
+ #
2449
+ # @option params [required, String] :knowledge_base_id
2450
+ # Identifier for a resource.
2451
+ #
2452
+ # @option params [required, String] :data_source_id
2453
+ # Identifier for a resource.
2454
+ #
2455
+ # @option params [required, String] :name
2456
+ # Name for a resource.
2457
+ #
2458
+ # @option params [String] :description
2459
+ # Description of the Resource.
2460
+ #
2461
+ # @option params [required, Types::DataSourceConfiguration] :data_source_configuration
2462
+ # Specifies a raw data source location to ingest.
2463
+ #
2464
+ # @option params [Types::ServerSideEncryptionConfiguration] :server_side_encryption_configuration
2465
+ # Server-side encryption configuration.
2466
+ #
2467
+ # @option params [Types::VectorIngestionConfiguration] :vector_ingestion_configuration
2468
+ # Configures ingestion for a vector knowledge base
2469
+ #
2470
+ # @return [Types::UpdateDataSourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2471
+ #
2472
+ # * {Types::UpdateDataSourceResponse#data_source #data_source} => Types::DataSource
2473
+ #
2474
+ # @example Request syntax with placeholder values
2475
+ #
2476
+ # resp = client.update_data_source({
2477
+ # knowledge_base_id: "Id", # required
2478
+ # data_source_id: "Id", # required
2479
+ # name: "Name", # required
2480
+ # description: "Description",
2481
+ # data_source_configuration: { # required
2482
+ # type: "S3", # required, accepts S3
2483
+ # s3_configuration: {
2484
+ # bucket_arn: "S3BucketArn", # required
2485
+ # inclusion_prefixes: ["S3Prefix"],
2486
+ # },
2487
+ # },
2488
+ # server_side_encryption_configuration: {
2489
+ # kms_key_arn: "KmsKeyArn",
2490
+ # },
2491
+ # vector_ingestion_configuration: {
2492
+ # chunking_configuration: {
2493
+ # chunking_strategy: "FIXED_SIZE", # required, accepts FIXED_SIZE, NONE
2494
+ # fixed_size_chunking_configuration: {
2495
+ # max_tokens: 1, # required
2496
+ # overlap_percentage: 1, # required
2497
+ # },
2498
+ # },
2499
+ # },
2500
+ # })
2501
+ #
2502
+ # @example Response structure
2503
+ #
2504
+ # resp.data_source.knowledge_base_id #=> String
2505
+ # resp.data_source.data_source_id #=> String
2506
+ # resp.data_source.name #=> String
2507
+ # resp.data_source.status #=> String, one of "AVAILABLE", "DELETING"
2508
+ # resp.data_source.description #=> String
2509
+ # resp.data_source.data_source_configuration.type #=> String, one of "S3"
2510
+ # resp.data_source.data_source_configuration.s3_configuration.bucket_arn #=> String
2511
+ # resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes #=> Array
2512
+ # resp.data_source.data_source_configuration.s3_configuration.inclusion_prefixes[0] #=> String
2513
+ # resp.data_source.server_side_encryption_configuration.kms_key_arn #=> String
2514
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.chunking_strategy #=> String, one of "FIXED_SIZE", "NONE"
2515
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.max_tokens #=> Integer
2516
+ # resp.data_source.vector_ingestion_configuration.chunking_configuration.fixed_size_chunking_configuration.overlap_percentage #=> Integer
2517
+ # resp.data_source.created_at #=> Time
2518
+ # resp.data_source.updated_at #=> Time
2519
+ #
2520
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/UpdateDataSource AWS API Documentation
2521
+ #
2522
+ # @overload update_data_source(params = {})
2523
+ # @param [Hash] params ({})
2524
+ def update_data_source(params = {}, options = {})
2525
+ req = build_request(:update_data_source, params)
2526
+ req.send_request(options)
2527
+ end
2528
+
2529
+ # Update an existing knowledge base
2530
+ #
2531
+ # @option params [required, String] :knowledge_base_id
2532
+ # Identifier for a resource.
2533
+ #
2534
+ # @option params [required, String] :name
2535
+ # Name for a resource.
2536
+ #
2537
+ # @option params [String] :description
2538
+ # Description of the Resource.
2539
+ #
2540
+ # @option params [required, String] :role_arn
2541
+ # ARN of a IAM role.
2542
+ #
2543
+ # @option params [required, Types::KnowledgeBaseConfiguration] :knowledge_base_configuration
2544
+ # Configures a bedrock knowledge base.
2545
+ #
2546
+ # @option params [required, Types::StorageConfiguration] :storage_configuration
2547
+ # Configures the physical storage of ingested data in a knowledge base.
2548
+ #
2549
+ # @return [Types::UpdateKnowledgeBaseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2550
+ #
2551
+ # * {Types::UpdateKnowledgeBaseResponse#knowledge_base #knowledge_base} => Types::KnowledgeBase
2552
+ #
2553
+ # @example Request syntax with placeholder values
2554
+ #
2555
+ # resp = client.update_knowledge_base({
2556
+ # knowledge_base_id: "Id", # required
2557
+ # name: "Name", # required
2558
+ # description: "Description",
2559
+ # role_arn: "KnowledgeBaseRoleArn", # required
2560
+ # knowledge_base_configuration: { # required
2561
+ # type: "VECTOR", # required, accepts VECTOR
2562
+ # vector_knowledge_base_configuration: {
2563
+ # embedding_model_arn: "BedrockEmbeddingModelArn", # required
2564
+ # },
2565
+ # },
2566
+ # storage_configuration: { # required
2567
+ # type: "OPENSEARCH_SERVERLESS", # required, accepts OPENSEARCH_SERVERLESS, PINECONE, REDIS_ENTERPRISE_CLOUD
2568
+ # opensearch_serverless_configuration: {
2569
+ # collection_arn: "OpenSearchServerlessCollectionArn", # required
2570
+ # vector_index_name: "OpenSearchServerlessIndexName", # required
2571
+ # field_mapping: { # required
2572
+ # vector_field: "FieldName", # required
2573
+ # text_field: "FieldName", # required
2574
+ # metadata_field: "FieldName", # required
2575
+ # },
2576
+ # },
2577
+ # pinecone_configuration: {
2578
+ # connection_string: "PineconeConnectionString", # required
2579
+ # credentials_secret_arn: "SecretArn", # required
2580
+ # namespace: "PineconeNamespace",
2581
+ # field_mapping: { # required
2582
+ # text_field: "FieldName", # required
2583
+ # metadata_field: "FieldName", # required
2584
+ # },
2585
+ # },
2586
+ # redis_enterprise_cloud_configuration: {
2587
+ # endpoint: "RedisEnterpriseCloudEndpoint", # required
2588
+ # vector_index_name: "RedisEnterpriseCloudIndexName", # required
2589
+ # credentials_secret_arn: "SecretArn", # required
2590
+ # field_mapping: { # required
2591
+ # vector_field: "FieldName", # required
2592
+ # text_field: "FieldName", # required
2593
+ # metadata_field: "FieldName", # required
2594
+ # },
2595
+ # },
2596
+ # },
2597
+ # })
2598
+ #
2599
+ # @example Response structure
2600
+ #
2601
+ # resp.knowledge_base.knowledge_base_id #=> String
2602
+ # resp.knowledge_base.name #=> String
2603
+ # resp.knowledge_base.knowledge_base_arn #=> String
2604
+ # resp.knowledge_base.description #=> String
2605
+ # resp.knowledge_base.role_arn #=> String
2606
+ # resp.knowledge_base.knowledge_base_configuration.type #=> String, one of "VECTOR"
2607
+ # resp.knowledge_base.knowledge_base_configuration.vector_knowledge_base_configuration.embedding_model_arn #=> String
2608
+ # resp.knowledge_base.storage_configuration.type #=> String, one of "OPENSEARCH_SERVERLESS", "PINECONE", "REDIS_ENTERPRISE_CLOUD"
2609
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.collection_arn #=> String
2610
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.vector_index_name #=> String
2611
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.vector_field #=> String
2612
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.text_field #=> String
2613
+ # resp.knowledge_base.storage_configuration.opensearch_serverless_configuration.field_mapping.metadata_field #=> String
2614
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.connection_string #=> String
2615
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.credentials_secret_arn #=> String
2616
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.namespace #=> String
2617
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.text_field #=> String
2618
+ # resp.knowledge_base.storage_configuration.pinecone_configuration.field_mapping.metadata_field #=> String
2619
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.endpoint #=> String
2620
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.vector_index_name #=> String
2621
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.credentials_secret_arn #=> String
2622
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.vector_field #=> String
2623
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.text_field #=> String
2624
+ # resp.knowledge_base.storage_configuration.redis_enterprise_cloud_configuration.field_mapping.metadata_field #=> String
2625
+ # resp.knowledge_base.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "UPDATING", "FAILED"
2626
+ # resp.knowledge_base.created_at #=> Time
2627
+ # resp.knowledge_base.updated_at #=> Time
2628
+ # resp.knowledge_base.failure_reasons #=> Array
2629
+ # resp.knowledge_base.failure_reasons[0] #=> String
2630
+ #
2631
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/UpdateKnowledgeBase AWS API Documentation
2632
+ #
2633
+ # @overload update_knowledge_base(params = {})
2634
+ # @param [Hash] params ({})
2635
+ def update_knowledge_base(params = {}, options = {})
2636
+ req = build_request(:update_knowledge_base, params)
2637
+ req.send_request(options)
2638
+ end
2639
+
2640
+ # @!endgroup
2641
+
2642
+ # @param params ({})
2643
+ # @api private
2644
+ def build_request(operation_name, params = {})
2645
+ handlers = @handlers.for(operation_name)
2646
+ context = Seahorse::Client::RequestContext.new(
2647
+ operation_name: operation_name,
2648
+ operation: config.api.operation(operation_name),
2649
+ client: self,
2650
+ params: params,
2651
+ config: config)
2652
+ context[:gem_name] = 'aws-sdk-bedrockagent'
2653
+ context[:gem_version] = '1.0.0'
2654
+ Seahorse::Client::Request.new(handlers, context)
2655
+ end
2656
+
2657
+ # @api private
2658
+ # @deprecated
2659
+ def waiter_names
2660
+ []
2661
+ end
2662
+
2663
+ class << self
2664
+
2665
+ # @api private
2666
+ attr_reader :identifier
2667
+
2668
+ # @api private
2669
+ def errors_module
2670
+ Errors
2671
+ end
2672
+
2673
+ end
2674
+ end
2675
+ end