aws-sdk-bedrockagentcore 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,2384 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/rest_json'
38
+ require 'aws-sdk-core/plugins/event_stream_configuration'
39
+
40
+ module Aws::BedrockAgentCore
41
+ # An API client for BedrockAgentCore. To construct a client, you need to configure a `:region` and `:credentials`.
42
+ #
43
+ # client = Aws::BedrockAgentCore::Client.new(
44
+ # region: region_name,
45
+ # credentials: credentials,
46
+ # # ...
47
+ # )
48
+ #
49
+ # For details on configuring region and credentials see
50
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
51
+ #
52
+ # See {#initialize} for a full list of supported configuration options.
53
+ class Client < Seahorse::Client::Base
54
+
55
+ include Aws::ClientStubs
56
+
57
+ @identifier = :bedrockagentcore
58
+
59
+ set_api(ClientApi::API)
60
+
61
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
62
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
63
+ add_plugin(Aws::Plugins::Logging)
64
+ add_plugin(Aws::Plugins::ParamConverter)
65
+ add_plugin(Aws::Plugins::ParamValidator)
66
+ add_plugin(Aws::Plugins::UserAgent)
67
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
68
+ add_plugin(Aws::Plugins::RetryErrors)
69
+ add_plugin(Aws::Plugins::GlobalConfiguration)
70
+ add_plugin(Aws::Plugins::RegionalEndpoint)
71
+ add_plugin(Aws::Plugins::EndpointDiscovery)
72
+ add_plugin(Aws::Plugins::EndpointPattern)
73
+ add_plugin(Aws::Plugins::ResponsePaging)
74
+ add_plugin(Aws::Plugins::StubResponses)
75
+ add_plugin(Aws::Plugins::IdempotencyToken)
76
+ add_plugin(Aws::Plugins::InvocationId)
77
+ add_plugin(Aws::Plugins::JsonvalueConverter)
78
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
79
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
80
+ add_plugin(Aws::Plugins::TransferEncoding)
81
+ add_plugin(Aws::Plugins::HttpChecksum)
82
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
83
+ add_plugin(Aws::Plugins::RequestCompression)
84
+ add_plugin(Aws::Plugins::DefaultsMode)
85
+ add_plugin(Aws::Plugins::RecursionDetection)
86
+ add_plugin(Aws::Plugins::Telemetry)
87
+ add_plugin(Aws::Plugins::Sign)
88
+ add_plugin(Aws::Plugins::Protocols::RestJson)
89
+ add_plugin(Aws::Plugins::EventStreamConfiguration)
90
+ add_plugin(Aws::BedrockAgentCore::Plugins::Endpoints)
91
+
92
+ # @overload initialize(options)
93
+ # @param [Hash] options
94
+ #
95
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
96
+ # A list of plugins to apply to the client. Each plugin is either a
97
+ # class name or an instance of a plugin class.
98
+ #
99
+ # @option options [required, Aws::CredentialProvider] :credentials
100
+ # Your AWS credentials. This can be an instance of any one of the
101
+ # following classes:
102
+ #
103
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
104
+ # credentials.
105
+ #
106
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
107
+ # shared file, such as `~/.aws/config`.
108
+ #
109
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
110
+ #
111
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
112
+ # assume a role after providing credentials via the web.
113
+ #
114
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
115
+ # access token generated from `aws login`.
116
+ #
117
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
118
+ # process that outputs to stdout.
119
+ #
120
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
121
+ # from an EC2 IMDS on an EC2 instance.
122
+ #
123
+ # * `Aws::ECSCredentials` - Used for loading credentials from
124
+ # instances running in ECS.
125
+ #
126
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
127
+ # from the Cognito Identity service.
128
+ #
129
+ # When `:credentials` are not configured directly, the following
130
+ # locations will be searched for credentials:
131
+ #
132
+ # * `Aws.config[:credentials]`
133
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
134
+ # `:account_id` options.
135
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
136
+ # ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
137
+ # * `~/.aws/credentials`
138
+ # * `~/.aws/config`
139
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
140
+ # are very aggressive. Construct and pass an instance of
141
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
142
+ # enable retries and extended timeouts. Instance profile credential
143
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
144
+ # to true.
145
+ #
146
+ # @option options [required, String] :region
147
+ # The AWS region to connect to. The configured `:region` is
148
+ # used to determine the service `:endpoint`. When not passed,
149
+ # a default `:region` is searched for in the following locations:
150
+ #
151
+ # * `Aws.config[:region]`
152
+ # * `ENV['AWS_REGION']`
153
+ # * `ENV['AMAZON_REGION']`
154
+ # * `ENV['AWS_DEFAULT_REGION']`
155
+ # * `~/.aws/credentials`
156
+ # * `~/.aws/config`
157
+ #
158
+ # @option options [String] :access_key_id
159
+ #
160
+ # @option options [String] :account_id
161
+ #
162
+ # @option options [Boolean] :active_endpoint_cache (false)
163
+ # When set to `true`, a thread polling for endpoints will be running in
164
+ # the background every 60 secs (default). Defaults to `false`.
165
+ #
166
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
167
+ # Used only in `adaptive` retry mode. When true, the request will sleep
168
+ # until there is sufficent client side capacity to retry the request.
169
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
170
+ # not retry instead of sleeping.
171
+ #
172
+ # @option options [Boolean] :client_side_monitoring (false)
173
+ # When `true`, client-side metrics will be collected for all API requests from
174
+ # this client.
175
+ #
176
+ # @option options [String] :client_side_monitoring_client_id ("")
177
+ # Allows you to provide an identifier for this client which will be attached to
178
+ # all generated client side metrics. Defaults to an empty string.
179
+ #
180
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
181
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
182
+ # side monitoring agent is running on, where client metrics will be published via UDP.
183
+ #
184
+ # @option options [Integer] :client_side_monitoring_port (31000)
185
+ # Required for publishing client metrics. The port that the client side monitoring
186
+ # agent is running on, where client metrics will be published via UDP.
187
+ #
188
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
189
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
190
+ # will use the Client Side Monitoring Agent Publisher.
191
+ #
192
+ # @option options [Boolean] :convert_params (true)
193
+ # When `true`, an attempt is made to coerce request parameters into
194
+ # the required types.
195
+ #
196
+ # @option options [Boolean] :correct_clock_skew (true)
197
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
198
+ # a clock skew correction and retry requests with skewed client clocks.
199
+ #
200
+ # @option options [String] :defaults_mode ("legacy")
201
+ # See {Aws::DefaultsModeConfiguration} for a list of the
202
+ # accepted modes and the configuration defaults that are included.
203
+ #
204
+ # @option options [Boolean] :disable_host_prefix_injection (false)
205
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
206
+ #
207
+ # @option options [Boolean] :disable_request_compression (false)
208
+ # When set to 'true' the request body will not be compressed
209
+ # for supported operations.
210
+ #
211
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
212
+ # Normally you should not configure the `:endpoint` option
213
+ # directly. This is normally constructed from the `:region`
214
+ # option. Configuring `:endpoint` is normally reserved for
215
+ # connecting to test or custom endpoints. The endpoint should
216
+ # be a URI formatted like:
217
+ #
218
+ # 'http://example.com'
219
+ # 'https://example.com'
220
+ # 'http://example.com:123'
221
+ #
222
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
223
+ # Used for the maximum size limit of the LRU cache storing endpoints data
224
+ # for endpoint discovery enabled operations. Defaults to 1000.
225
+ #
226
+ # @option options [Integer] :endpoint_cache_max_threads (10)
227
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
228
+ #
229
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
230
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
231
+ # Use this option to config the time interval in seconds for making
232
+ # requests fetching endpoints information. Defaults to 60 sec.
233
+ #
234
+ # @option options [Boolean] :endpoint_discovery (false)
235
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
236
+ #
237
+ # @option options [Proc] :event_stream_handler
238
+ # When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
239
+ #
240
+ # @option options [Boolean] :ignore_configured_endpoint_urls
241
+ # Setting to true disables use of endpoint URLs provided via environment
242
+ # variables and the shared configuration file.
243
+ #
244
+ # @option options [Proc] :input_event_stream_handler
245
+ # When an EventStream or Proc object is provided, it can be used for sending events for the event stream.
246
+ #
247
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
248
+ # The log formatter.
249
+ #
250
+ # @option options [Symbol] :log_level (:info)
251
+ # The log level to send messages to the `:logger` at.
252
+ #
253
+ # @option options [Logger] :logger
254
+ # The Logger instance to send log messages to. If this option
255
+ # is not set, logging will be disabled.
256
+ #
257
+ # @option options [Integer] :max_attempts (3)
258
+ # An integer representing the maximum number attempts that will be made for
259
+ # a single request, including the initial attempt. For example,
260
+ # setting this value to 5 will result in a request being retried up to
261
+ # 4 times. Used in `standard` and `adaptive` retry modes.
262
+ #
263
+ # @option options [Proc] :output_event_stream_handler
264
+ # When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
265
+ #
266
+ # @option options [String] :profile ("default")
267
+ # Used when loading credentials from the shared credentials file
268
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
269
+ #
270
+ # @option options [String] :request_checksum_calculation ("when_supported")
271
+ # Determines when a checksum will be calculated for request payloads. Values are:
272
+ #
273
+ # * `when_supported` - (default) When set, a checksum will be
274
+ # calculated for all request payloads of operations modeled with the
275
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
276
+ # `requestAlgorithmMember` is modeled.
277
+ # * `when_required` - When set, a checksum will only be calculated for
278
+ # request payloads of operations modeled with the `httpChecksum` trait where
279
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
280
+ # is modeled and supplied.
281
+ #
282
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
283
+ # The minimum size in bytes that triggers compression for request
284
+ # bodies. The value must be non-negative integer value between 0
285
+ # and 10485780 bytes inclusive.
286
+ #
287
+ # @option options [String] :response_checksum_validation ("when_supported")
288
+ # Determines when checksum validation will be performed on response payloads. Values are:
289
+ #
290
+ # * `when_supported` - (default) When set, checksum validation is performed on all
291
+ # response payloads of operations modeled with the `httpChecksum` trait where
292
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
293
+ # are supported.
294
+ # * `when_required` - When set, checksum validation is not performed on
295
+ # response payloads of operations unless the checksum algorithm is supported and
296
+ # the `requestValidationModeMember` member is set to `ENABLED`.
297
+ #
298
+ # @option options [Proc] :retry_backoff
299
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
300
+ # This option is only used in the `legacy` retry mode.
301
+ #
302
+ # @option options [Float] :retry_base_delay (0.3)
303
+ # The base delay in seconds used by the default backoff function. This option
304
+ # is only used in the `legacy` retry mode.
305
+ #
306
+ # @option options [Symbol] :retry_jitter (:none)
307
+ # A delay randomiser function used by the default backoff function.
308
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
309
+ # otherwise a Proc that takes and returns a number. This option is only used
310
+ # in the `legacy` retry mode.
311
+ #
312
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
313
+ #
314
+ # @option options [Integer] :retry_limit (3)
315
+ # The maximum number of times to retry failed requests. Only
316
+ # ~ 500 level server errors and certain ~ 400 level client errors
317
+ # are retried. Generally, these are throttling errors, data
318
+ # checksum errors, networking errors, timeout errors, auth errors,
319
+ # endpoint discovery, and errors from expired credentials.
320
+ # This option is only used in the `legacy` retry mode.
321
+ #
322
+ # @option options [Integer] :retry_max_delay (0)
323
+ # The maximum number of seconds to delay between retries (0 for no limit)
324
+ # used by the default backoff function. This option is only used in the
325
+ # `legacy` retry mode.
326
+ #
327
+ # @option options [String] :retry_mode ("legacy")
328
+ # Specifies which retry algorithm to use. Values are:
329
+ #
330
+ # * `legacy` - The pre-existing retry behavior. This is default value if
331
+ # no retry mode is provided.
332
+ #
333
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
334
+ # This includes support for retry quotas, which limit the number of
335
+ # unsuccessful retries a client can make.
336
+ #
337
+ # * `adaptive` - An experimental retry mode that includes all the
338
+ # functionality of `standard` mode along with automatic client side
339
+ # throttling. This is a provisional mode that may change behavior
340
+ # in the future.
341
+ #
342
+ # @option options [String] :sdk_ua_app_id
343
+ # A unique and opaque application ID that is appended to the
344
+ # User-Agent header as app/sdk_ua_app_id. It should have a
345
+ # maximum length of 50. This variable is sourced from environment
346
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
347
+ #
348
+ # @option options [String] :secret_access_key
349
+ #
350
+ # @option options [String] :session_token
351
+ #
352
+ # @option options [Array] :sigv4a_signing_region_set
353
+ # A list of regions that should be signed with SigV4a signing. When
354
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
355
+ # in the following locations:
356
+ #
357
+ # * `Aws.config[:sigv4a_signing_region_set]`
358
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
359
+ # * `~/.aws/config`
360
+ #
361
+ # @option options [Boolean] :stub_responses (false)
362
+ # Causes the client to return stubbed responses. By default
363
+ # fake responses are generated and returned. You can specify
364
+ # the response data to return or errors to raise by calling
365
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
366
+ #
367
+ # ** Please note ** When response stubbing is enabled, no HTTP
368
+ # requests are made, and retries are disabled.
369
+ #
370
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
371
+ # Allows you to provide a telemetry provider, which is used to
372
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
373
+ # will not record or emit any telemetry data. The SDK supports the
374
+ # following telemetry providers:
375
+ #
376
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
377
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
378
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
379
+ #
380
+ # @option options [Aws::TokenProvider] :token_provider
381
+ # A Bearer Token Provider. This can be an instance of any one of the
382
+ # following classes:
383
+ #
384
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
385
+ # tokens.
386
+ #
387
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
388
+ # access token generated from `aws login`.
389
+ #
390
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
391
+ # will be used to search for tokens configured for your profile in shared configuration files.
392
+ #
393
+ # @option options [Boolean] :use_dualstack_endpoint
394
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
395
+ # will be used if available.
396
+ #
397
+ # @option options [Boolean] :use_fips_endpoint
398
+ # When set to `true`, fips compatible endpoints will be used if available.
399
+ # When a `fips` region is used, the region is normalized and this config
400
+ # is set to `true`.
401
+ #
402
+ # @option options [Boolean] :validate_params (true)
403
+ # When `true`, request parameters are validated before
404
+ # sending the request.
405
+ #
406
+ # @option options [Aws::BedrockAgentCore::EndpointProvider] :endpoint_provider
407
+ # The endpoint provider used to resolve endpoints. Any object that responds to
408
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
409
+ # `Aws::BedrockAgentCore::EndpointParameters`.
410
+ #
411
+ # @option options [Float] :http_continue_timeout (1)
412
+ # The number of seconds to wait for a 100-continue response before sending the
413
+ # request body. This option has no effect unless the request has "Expect"
414
+ # header set to "100-continue". Defaults to `nil` which disables this
415
+ # behaviour. This value can safely be set per request on the session.
416
+ #
417
+ # @option options [Float] :http_idle_timeout (5)
418
+ # The number of seconds a connection is allowed to sit idle before it
419
+ # is considered stale. Stale connections are closed and removed from the
420
+ # pool before making a request.
421
+ #
422
+ # @option options [Float] :http_open_timeout (15)
423
+ # The default number of seconds to wait for response data.
424
+ # This value can safely be set per-request on the session.
425
+ #
426
+ # @option options [URI::HTTP,String] :http_proxy
427
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
428
+ #
429
+ # @option options [Float] :http_read_timeout (60)
430
+ # The default number of seconds to wait for response data.
431
+ # This value can safely be set per-request on the session.
432
+ #
433
+ # @option options [Boolean] :http_wire_trace (false)
434
+ # When `true`, HTTP debug output will be sent to the `:logger`.
435
+ #
436
+ # @option options [Proc] :on_chunk_received
437
+ # When a Proc object is provided, it will be used as callback when each chunk
438
+ # of the response body is received. It provides three arguments: the chunk,
439
+ # the number of bytes received, and the total number of
440
+ # bytes in the response (or nil if the server did not send a `content-length`).
441
+ #
442
+ # @option options [Proc] :on_chunk_sent
443
+ # When a Proc object is provided, it will be used as callback when each chunk
444
+ # of the request body is sent. It provides three arguments: the chunk,
445
+ # the number of bytes read from the body, and the total number of
446
+ # bytes in the body.
447
+ #
448
+ # @option options [Boolean] :raise_response_errors (true)
449
+ # When `true`, response errors are raised.
450
+ #
451
+ # @option options [String] :ssl_ca_bundle
452
+ # Full path to the SSL certificate authority bundle file that should be used when
453
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
454
+ # `:ssl_ca_directory` the the system default will be used if available.
455
+ #
456
+ # @option options [String] :ssl_ca_directory
457
+ # Full path of the directory that contains the unbundled SSL certificate
458
+ # authority files for verifying peer certificates. If you do
459
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
460
+ # default will be used if available.
461
+ #
462
+ # @option options [String] :ssl_ca_store
463
+ # Sets the X509::Store to verify peer certificate.
464
+ #
465
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
466
+ # Sets a client certificate when creating http connections.
467
+ #
468
+ # @option options [OpenSSL::PKey] :ssl_key
469
+ # Sets a client key when creating http connections.
470
+ #
471
+ # @option options [Float] :ssl_timeout
472
+ # Sets the SSL timeout in seconds
473
+ #
474
+ # @option options [Boolean] :ssl_verify_peer (true)
475
+ # When `true`, SSL peer certificates are verified when establishing a connection.
476
+ #
477
+ def initialize(*args)
478
+ super
479
+ end
480
+
481
+ # @!group API Operations
482
+
483
+ # Creates an event in a memory store. Events represent interactions or
484
+ # activities that occur within a session and are associated with
485
+ # specific actors.
486
+ #
487
+ # To use this operation, you must have the `genesismemory:CreateEvent`
488
+ # permission.
489
+ #
490
+ # This operation is subject to request rate limiting.
491
+ #
492
+ # @option params [required, String] :memory_id
493
+ # The identifier of the memory store in which to create the event.
494
+ #
495
+ # @option params [required, String] :actor_id
496
+ # The identifier of the actor associated with this event. An actor
497
+ # represents an entity that participates in sessions and generates
498
+ # events.
499
+ #
500
+ # @option params [String] :session_id
501
+ # The identifier of the session in which this event occurs. A session
502
+ # represents a sequence of related events.
503
+ #
504
+ # @option params [required, Time,DateTime,Date,Integer,String] :event_timestamp
505
+ # The timestamp when the event occurred. If not specified, the current
506
+ # time is used.
507
+ #
508
+ # @option params [required, Array<Types::PayloadType>] :payload
509
+ # The content payload of the event. This can include conversational data
510
+ # or binary content.
511
+ #
512
+ # @option params [Types::Branch] :branch
513
+ # The branch information for this event. Branches allow for organizing
514
+ # events into different conversation threads or paths.
515
+ #
516
+ # @option params [String] :client_token
517
+ # A unique, case-sensitive identifier to ensure that the operation
518
+ # completes no more than one time. If this token matches a previous
519
+ # request, AgentCore ignores the request, but does not return an error.
520
+ #
521
+ # **A suitable default value is auto-generated.** You should normally
522
+ # not need to pass this option.**
523
+ #
524
+ # @return [Types::CreateEventOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
525
+ #
526
+ # * {Types::CreateEventOutput#event #event} => Types::Event
527
+ #
528
+ # @example Request syntax with placeholder values
529
+ #
530
+ # resp = client.create_event({
531
+ # memory_id: "MemoryId", # required
532
+ # actor_id: "ActorId", # required
533
+ # session_id: "SessionId",
534
+ # event_timestamp: Time.now, # required
535
+ # payload: [ # required
536
+ # {
537
+ # conversational: {
538
+ # content: { # required
539
+ # text: "ContentTextString",
540
+ # },
541
+ # role: "ASSISTANT", # required, accepts ASSISTANT, USER, TOOL, OTHER
542
+ # },
543
+ # blob: {
544
+ # },
545
+ # },
546
+ # ],
547
+ # branch: {
548
+ # root_event_id: "EventId",
549
+ # name: "BranchName", # required
550
+ # },
551
+ # client_token: "String",
552
+ # })
553
+ #
554
+ # @example Response structure
555
+ #
556
+ # resp.event.memory_id #=> String
557
+ # resp.event.actor_id #=> String
558
+ # resp.event.session_id #=> String
559
+ # resp.event.event_id #=> String
560
+ # resp.event.event_timestamp #=> Time
561
+ # resp.event.payload #=> Array
562
+ # resp.event.payload[0].conversational.content.text #=> String
563
+ # resp.event.payload[0].conversational.role #=> String, one of "ASSISTANT", "USER", "TOOL", "OTHER"
564
+ # resp.event.branch.root_event_id #=> String
565
+ # resp.event.branch.name #=> String
566
+ #
567
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/CreateEvent AWS API Documentation
568
+ #
569
+ # @overload create_event(params = {})
570
+ # @param [Hash] params ({})
571
+ def create_event(params = {}, options = {})
572
+ req = build_request(:create_event, params)
573
+ req.send_request(options)
574
+ end
575
+
576
+ # Deletes an event from a memory store. When you delete an event, it is
577
+ # permanently removed.
578
+ #
579
+ # To use this operation, you must have the `genesismemory:DeleteEvent`
580
+ # permission.
581
+ #
582
+ # @option params [required, String] :memory_id
583
+ # The identifier of the memory store from which to delete the event.
584
+ #
585
+ # @option params [required, String] :session_id
586
+ # The identifier of the session containing the event to delete.
587
+ #
588
+ # @option params [required, String] :event_id
589
+ # The identifier of the event to delete.
590
+ #
591
+ # @option params [required, String] :actor_id
592
+ # The identifier of the actor associated with the event to delete.
593
+ #
594
+ # @return [Types::DeleteEventOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
595
+ #
596
+ # * {Types::DeleteEventOutput#event_id #event_id} => String
597
+ #
598
+ # @example Request syntax with placeholder values
599
+ #
600
+ # resp = client.delete_event({
601
+ # memory_id: "MemoryId", # required
602
+ # session_id: "SessionId", # required
603
+ # event_id: "EventId", # required
604
+ # actor_id: "ActorId", # required
605
+ # })
606
+ #
607
+ # @example Response structure
608
+ #
609
+ # resp.event_id #=> String
610
+ #
611
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/DeleteEvent AWS API Documentation
612
+ #
613
+ # @overload delete_event(params = {})
614
+ # @param [Hash] params ({})
615
+ def delete_event(params = {}, options = {})
616
+ req = build_request(:delete_event, params)
617
+ req.send_request(options)
618
+ end
619
+
620
+ # Deletes a memory record from a memory store. When you delete a memory
621
+ # record, it is permanently removed.
622
+ #
623
+ # To use this operation, you must have the
624
+ # `genesismemory:DeleteMemoryRecord` permission.
625
+ #
626
+ # @option params [required, String] :memory_id
627
+ # The identifier of the memory store from which to delete the memory
628
+ # record.
629
+ #
630
+ # @option params [required, String] :memory_record_id
631
+ # The identifier of the memory record to delete.
632
+ #
633
+ # @return [Types::DeleteMemoryRecordOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
634
+ #
635
+ # * {Types::DeleteMemoryRecordOutput#memory_record_id #memory_record_id} => String
636
+ #
637
+ # @example Request syntax with placeholder values
638
+ #
639
+ # resp = client.delete_memory_record({
640
+ # memory_id: "MemoryId", # required
641
+ # memory_record_id: "String", # required
642
+ # })
643
+ #
644
+ # @example Response structure
645
+ #
646
+ # resp.memory_record_id #=> String
647
+ #
648
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/DeleteMemoryRecord AWS API Documentation
649
+ #
650
+ # @overload delete_memory_record(params = {})
651
+ # @param [Hash] params ({})
652
+ def delete_memory_record(params = {}, options = {})
653
+ req = build_request(:delete_memory_record, params)
654
+ req.send_request(options)
655
+ end
656
+
657
+ # Retrieves detailed information about a specific browser session in
658
+ # Amazon Bedrock. This operation returns the session's configuration,
659
+ # current status, associated streams, and metadata.
660
+ #
661
+ # To get a browser session, you must specify both the browser identifier
662
+ # and the session ID. The response includes information about the
663
+ # session's viewport configuration, timeout settings, and stream
664
+ # endpoints.
665
+ #
666
+ # The following operations are related to `GetBrowserSession`:
667
+ #
668
+ # * [StartBrowserSession][1]
669
+ #
670
+ # * [ListBrowserSessions][2]
671
+ #
672
+ # * [StopBrowserSession][3]
673
+ #
674
+ #
675
+ #
676
+ # [1]: https://docs.aws.amazon.com/API_StartBrowserSession.html
677
+ # [2]: https://docs.aws.amazon.com/API_ListBrowserSessions.html
678
+ # [3]: https://docs.aws.amazon.com/API_StopBrowserSession.html
679
+ #
680
+ # @option params [required, String] :browser_identifier
681
+ # The unique identifier of the browser associated with the session.
682
+ #
683
+ # @option params [required, String] :session_id
684
+ # The unique identifier of the browser session to retrieve.
685
+ #
686
+ # @return [Types::GetBrowserSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
687
+ #
688
+ # * {Types::GetBrowserSessionResponse#browser_identifier #browser_identifier} => String
689
+ # * {Types::GetBrowserSessionResponse#session_id #session_id} => String
690
+ # * {Types::GetBrowserSessionResponse#name #name} => String
691
+ # * {Types::GetBrowserSessionResponse#created_at #created_at} => Time
692
+ # * {Types::GetBrowserSessionResponse#view_port #view_port} => Types::ViewPort
693
+ # * {Types::GetBrowserSessionResponse#session_timeout_seconds #session_timeout_seconds} => Integer
694
+ # * {Types::GetBrowserSessionResponse#status #status} => String
695
+ # * {Types::GetBrowserSessionResponse#streams #streams} => Types::BrowserSessionStream
696
+ # * {Types::GetBrowserSessionResponse#session_replay_artifact #session_replay_artifact} => String
697
+ # * {Types::GetBrowserSessionResponse#last_updated_at #last_updated_at} => Time
698
+ #
699
+ # @example Request syntax with placeholder values
700
+ #
701
+ # resp = client.get_browser_session({
702
+ # browser_identifier: "String", # required
703
+ # session_id: "BrowserSessionId", # required
704
+ # })
705
+ #
706
+ # @example Response structure
707
+ #
708
+ # resp.browser_identifier #=> String
709
+ # resp.session_id #=> String
710
+ # resp.name #=> String
711
+ # resp.created_at #=> Time
712
+ # resp.view_port.width #=> Integer
713
+ # resp.view_port.height #=> Integer
714
+ # resp.session_timeout_seconds #=> Integer
715
+ # resp.status #=> String, one of "READY", "TERMINATED"
716
+ # resp.streams.automation_stream.stream_endpoint #=> String
717
+ # resp.streams.automation_stream.stream_status #=> String, one of "ENABLED", "DISABLED"
718
+ # resp.streams.live_view_stream.stream_endpoint #=> String
719
+ # resp.session_replay_artifact #=> String
720
+ # resp.last_updated_at #=> Time
721
+ #
722
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetBrowserSession AWS API Documentation
723
+ #
724
+ # @overload get_browser_session(params = {})
725
+ # @param [Hash] params ({})
726
+ def get_browser_session(params = {}, options = {})
727
+ req = build_request(:get_browser_session, params)
728
+ req.send_request(options)
729
+ end
730
+
731
+ # Retrieves detailed information about a specific code interpreter
732
+ # session in Amazon Bedrock. This operation returns the session's
733
+ # configuration, current status, and metadata.
734
+ #
735
+ # To get a code interpreter session, you must specify both the code
736
+ # interpreter identifier and the session ID. The response includes
737
+ # information about the session's timeout settings and current status.
738
+ #
739
+ # The following operations are related to `GetCodeInterpreterSession`:
740
+ #
741
+ # * [StartCodeInterpreterSession][1]
742
+ #
743
+ # * [ListCodeInterpreterSessions][2]
744
+ #
745
+ # * [StopCodeInterpreterSession][3]
746
+ #
747
+ #
748
+ #
749
+ # [1]: https://docs.aws.amazon.com/API_StartCodeInterpreterSession.html
750
+ # [2]: https://docs.aws.amazon.com/API_ListCodeInterpreterSessions.html
751
+ # [3]: https://docs.aws.amazon.com/API_StopCodeInterpreterSession.html
752
+ #
753
+ # @option params [required, String] :code_interpreter_identifier
754
+ # The unique identifier of the code interpreter associated with the
755
+ # session.
756
+ #
757
+ # @option params [required, String] :session_id
758
+ # The unique identifier of the code interpreter session to retrieve.
759
+ #
760
+ # @return [Types::GetCodeInterpreterSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
761
+ #
762
+ # * {Types::GetCodeInterpreterSessionResponse#code_interpreter_identifier #code_interpreter_identifier} => String
763
+ # * {Types::GetCodeInterpreterSessionResponse#session_id #session_id} => String
764
+ # * {Types::GetCodeInterpreterSessionResponse#name #name} => String
765
+ # * {Types::GetCodeInterpreterSessionResponse#created_at #created_at} => Time
766
+ # * {Types::GetCodeInterpreterSessionResponse#session_timeout_seconds #session_timeout_seconds} => Integer
767
+ # * {Types::GetCodeInterpreterSessionResponse#status #status} => String
768
+ #
769
+ # @example Request syntax with placeholder values
770
+ #
771
+ # resp = client.get_code_interpreter_session({
772
+ # code_interpreter_identifier: "String", # required
773
+ # session_id: "CodeInterpreterSessionId", # required
774
+ # })
775
+ #
776
+ # @example Response structure
777
+ #
778
+ # resp.code_interpreter_identifier #=> String
779
+ # resp.session_id #=> String
780
+ # resp.name #=> String
781
+ # resp.created_at #=> Time
782
+ # resp.session_timeout_seconds #=> Integer
783
+ # resp.status #=> String, one of "READY", "TERMINATED"
784
+ #
785
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetCodeInterpreterSession AWS API Documentation
786
+ #
787
+ # @overload get_code_interpreter_session(params = {})
788
+ # @param [Hash] params ({})
789
+ def get_code_interpreter_session(params = {}, options = {})
790
+ req = build_request(:get_code_interpreter_session, params)
791
+ req.send_request(options)
792
+ end
793
+
794
+ # Retrieves information about a specific event in a memory store.
795
+ #
796
+ # To use this operation, you must have the `genesismemory:GetEvent`
797
+ # permission.
798
+ #
799
+ # @option params [required, String] :memory_id
800
+ # The identifier of the memory store containing the event.
801
+ #
802
+ # @option params [required, String] :session_id
803
+ # The identifier of the session containing the event.
804
+ #
805
+ # @option params [required, String] :actor_id
806
+ # The identifier of the actor associated with the event.
807
+ #
808
+ # @option params [required, String] :event_id
809
+ # The identifier of the event to retrieve.
810
+ #
811
+ # @return [Types::GetEventOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
812
+ #
813
+ # * {Types::GetEventOutput#event #event} => Types::Event
814
+ #
815
+ # @example Request syntax with placeholder values
816
+ #
817
+ # resp = client.get_event({
818
+ # memory_id: "MemoryId", # required
819
+ # session_id: "SessionId", # required
820
+ # actor_id: "ActorId", # required
821
+ # event_id: "EventId", # required
822
+ # })
823
+ #
824
+ # @example Response structure
825
+ #
826
+ # resp.event.memory_id #=> String
827
+ # resp.event.actor_id #=> String
828
+ # resp.event.session_id #=> String
829
+ # resp.event.event_id #=> String
830
+ # resp.event.event_timestamp #=> Time
831
+ # resp.event.payload #=> Array
832
+ # resp.event.payload[0].conversational.content.text #=> String
833
+ # resp.event.payload[0].conversational.role #=> String, one of "ASSISTANT", "USER", "TOOL", "OTHER"
834
+ # resp.event.branch.root_event_id #=> String
835
+ # resp.event.branch.name #=> String
836
+ #
837
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetEvent AWS API Documentation
838
+ #
839
+ # @overload get_event(params = {})
840
+ # @param [Hash] params ({})
841
+ def get_event(params = {}, options = {})
842
+ req = build_request(:get_event, params)
843
+ req.send_request(options)
844
+ end
845
+
846
+ # Retrieves a specific memory record from a memory store.
847
+ #
848
+ # To use this operation, you must have the
849
+ # `genesismemory:GetMemoryRecord` permission.
850
+ #
851
+ # @option params [required, String] :memory_id
852
+ # The identifier of the memory store containing the memory record.
853
+ #
854
+ # @option params [required, String] :memory_record_id
855
+ # The identifier of the memory record to retrieve.
856
+ #
857
+ # @return [Types::GetMemoryRecordOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
858
+ #
859
+ # * {Types::GetMemoryRecordOutput#memory_record #memory_record} => Types::MemoryRecord
860
+ #
861
+ # @example Request syntax with placeholder values
862
+ #
863
+ # resp = client.get_memory_record({
864
+ # memory_id: "MemoryId", # required
865
+ # memory_record_id: "String", # required
866
+ # })
867
+ #
868
+ # @example Response structure
869
+ #
870
+ # resp.memory_record.memory_record_id #=> String
871
+ # resp.memory_record.content.text #=> String
872
+ # resp.memory_record.memory_strategy_id #=> String
873
+ # resp.memory_record.namespaces #=> Array
874
+ # resp.memory_record.namespaces[0] #=> String
875
+ # resp.memory_record.created_at #=> Time
876
+ #
877
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetMemoryRecord AWS API Documentation
878
+ #
879
+ # @overload get_memory_record(params = {})
880
+ # @param [Hash] params ({})
881
+ def get_memory_record(params = {}, options = {})
882
+ req = build_request(:get_memory_record, params)
883
+ req.send_request(options)
884
+ end
885
+
886
+ # Retrieves an API Key associated with an API Key Credential Provider
887
+ #
888
+ # @option params [required, String] :workload_identity_token
889
+ # The identity token of the workload you want to get the API Key of.
890
+ #
891
+ # @option params [required, String] :resource_credential_provider_name
892
+ # The credential provider name of the resource you are retrieving the
893
+ # API Key of.
894
+ #
895
+ # @return [Types::GetResourceApiKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
896
+ #
897
+ # * {Types::GetResourceApiKeyResponse#api_key #api_key} => String
898
+ #
899
+ # @example Request syntax with placeholder values
900
+ #
901
+ # resp = client.get_resource_api_key({
902
+ # workload_identity_token: "WorkloadIdentityTokenType", # required
903
+ # resource_credential_provider_name: "CredentialProviderName", # required
904
+ # })
905
+ #
906
+ # @example Response structure
907
+ #
908
+ # resp.api_key #=> String
909
+ #
910
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetResourceApiKey AWS API Documentation
911
+ #
912
+ # @overload get_resource_api_key(params = {})
913
+ # @param [Hash] params ({})
914
+ def get_resource_api_key(params = {}, options = {})
915
+ req = build_request(:get_resource_api_key, params)
916
+ req.send_request(options)
917
+ end
918
+
919
+ # Reaturns the Oauth2Token of the provided resource
920
+ #
921
+ # @option params [required, String] :workload_identity_token
922
+ # The identity token of the workload you want to retrive the Oauth2
923
+ # Token of.
924
+ #
925
+ # @option params [String] :user_id
926
+ # The user ID of the user you're retrieving the token on behalf of.
927
+ #
928
+ # @option params [required, String] :resource_credential_provider_name
929
+ # Reference to the credential provider
930
+ #
931
+ # @option params [required, Array<String>] :scopes
932
+ # The OAuth scopes requested
933
+ #
934
+ # @option params [required, String] :oauth2_flow
935
+ # The type of flow to be performed
936
+ #
937
+ # @option params [String] :resource_oauth_2_return_url
938
+ # Callback url to redirect after token retrieval completes. Should be
939
+ # one of the provideded urls during WorkloadIdentity creation
940
+ #
941
+ # @option params [Boolean] :force_authentication
942
+ # If true, always initiate a new 3LO flow
943
+ #
944
+ # @option params [Hash<String,String>] :custom_parameters
945
+ # Gives the ability to send extra/custom parameters to the resource
946
+ # credentials provider during the authorization process. Standard OAuth2
947
+ # flow parameters will not be overriden.
948
+ #
949
+ # @return [Types::GetResourceOauth2TokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
950
+ #
951
+ # * {Types::GetResourceOauth2TokenResponse#authorization_url #authorization_url} => String
952
+ # * {Types::GetResourceOauth2TokenResponse#access_token #access_token} => String
953
+ #
954
+ # @example Request syntax with placeholder values
955
+ #
956
+ # resp = client.get_resource_oauth_2_token({
957
+ # workload_identity_token: "WorkloadIdentityTokenType", # required
958
+ # user_id: "UserIdType",
959
+ # resource_credential_provider_name: "CredentialProviderName", # required
960
+ # scopes: ["ScopeType"], # required
961
+ # oauth2_flow: "USER_FEDERATION", # required, accepts USER_FEDERATION, M2M
962
+ # resource_oauth_2_return_url: "ResourceOauth2ReturnUrlType",
963
+ # force_authentication: false,
964
+ # custom_parameters: {
965
+ # "CustomRequestKeyType" => "CustomRequestValueType",
966
+ # },
967
+ # })
968
+ #
969
+ # @example Response structure
970
+ #
971
+ # resp.authorization_url #=> String
972
+ # resp.access_token #=> String
973
+ #
974
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetResourceOauth2Token AWS API Documentation
975
+ #
976
+ # @overload get_resource_oauth_2_token(params = {})
977
+ # @param [Hash] params ({})
978
+ def get_resource_oauth_2_token(params = {}, options = {})
979
+ req = build_request(:get_resource_oauth_2_token, params)
980
+ req.send_request(options)
981
+ end
982
+
983
+ # Obtains an Workload access token for agentic workloads not acting on
984
+ # behalf of user.
985
+ #
986
+ # @option params [required, String] :workload_name
987
+ # Unique identifier for the registered agent
988
+ #
989
+ # @return [Types::GetWorkloadAccessTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
990
+ #
991
+ # * {Types::GetWorkloadAccessTokenResponse#workload_access_token #workload_access_token} => String
992
+ #
993
+ # @example Request syntax with placeholder values
994
+ #
995
+ # resp = client.get_workload_access_token({
996
+ # workload_name: "WorkloadIdentityNameType", # required
997
+ # })
998
+ #
999
+ # @example Response structure
1000
+ #
1001
+ # resp.workload_access_token #=> String
1002
+ #
1003
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetWorkloadAccessToken AWS API Documentation
1004
+ #
1005
+ # @overload get_workload_access_token(params = {})
1006
+ # @param [Hash] params ({})
1007
+ def get_workload_access_token(params = {}, options = {})
1008
+ req = build_request(:get_workload_access_token, params)
1009
+ req.send_request(options)
1010
+ end
1011
+
1012
+ # Obtains an Workload access token for agentic workloads acting on
1013
+ # behalf of user with JWT token
1014
+ #
1015
+ # @option params [required, String] :workload_name
1016
+ # Unique identifier for the registered agent
1017
+ #
1018
+ # @option params [required, String] :user_token
1019
+ # OAuth2 token issued by the user's identity provider
1020
+ #
1021
+ # @return [Types::GetWorkloadAccessTokenForJWTResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1022
+ #
1023
+ # * {Types::GetWorkloadAccessTokenForJWTResponse#workload_access_token #workload_access_token} => String
1024
+ #
1025
+ # @example Request syntax with placeholder values
1026
+ #
1027
+ # resp = client.get_workload_access_token_for_jwt({
1028
+ # workload_name: "WorkloadIdentityNameType", # required
1029
+ # user_token: "UserTokenType", # required
1030
+ # })
1031
+ #
1032
+ # @example Response structure
1033
+ #
1034
+ # resp.workload_access_token #=> String
1035
+ #
1036
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetWorkloadAccessTokenForJWT AWS API Documentation
1037
+ #
1038
+ # @overload get_workload_access_token_for_jwt(params = {})
1039
+ # @param [Hash] params ({})
1040
+ def get_workload_access_token_for_jwt(params = {}, options = {})
1041
+ req = build_request(:get_workload_access_token_for_jwt, params)
1042
+ req.send_request(options)
1043
+ end
1044
+
1045
+ # Obtains an Workload access token for agentic workloads acting on
1046
+ # behalf of user with User Id.
1047
+ #
1048
+ # @option params [required, String] :workload_name
1049
+ # The name of the worklaod you want to get the access token of.
1050
+ #
1051
+ # @option params [required, String] :user_id
1052
+ # The user id of the user you are retrieving the access token for.
1053
+ #
1054
+ # @return [Types::GetWorkloadAccessTokenForUserIdResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1055
+ #
1056
+ # * {Types::GetWorkloadAccessTokenForUserIdResponse#workload_access_token #workload_access_token} => String
1057
+ #
1058
+ # @example Request syntax with placeholder values
1059
+ #
1060
+ # resp = client.get_workload_access_token_for_user_id({
1061
+ # workload_name: "WorkloadIdentityNameType", # required
1062
+ # user_id: "UserIdType", # required
1063
+ # })
1064
+ #
1065
+ # @example Response structure
1066
+ #
1067
+ # resp.workload_access_token #=> String
1068
+ #
1069
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetWorkloadAccessTokenForUserId AWS API Documentation
1070
+ #
1071
+ # @overload get_workload_access_token_for_user_id(params = {})
1072
+ # @param [Hash] params ({})
1073
+ def get_workload_access_token_for_user_id(params = {}, options = {})
1074
+ req = build_request(:get_workload_access_token_for_user_id, params)
1075
+ req.send_request(options)
1076
+ end
1077
+
1078
+ # Sends a request to an agent runtime in Amazon Bedrock and receives
1079
+ # responses in real-time. The agent processes the request using the
1080
+ # configured foundation model and any associated knowledge bases or
1081
+ # action groups.
1082
+ #
1083
+ # To invoke an agent runtime, you must specify the agent runtime ARN and
1084
+ # provide a payload containing your request. You can optionally specify
1085
+ # a qualifier to target a specific version or alias of the agent.
1086
+ #
1087
+ # This operation supports streaming responses, allowing you to receive
1088
+ # partial responses as they become available. We recommend using
1089
+ # pagination to ensure that the operation returns quickly and
1090
+ # successfully when processing large responses.
1091
+ #
1092
+ # @option params [String] :content_type
1093
+ # The MIME type of the input data in the payload. This tells the agent
1094
+ # runtime how to interpret the payload data. Common values include
1095
+ # application/json for JSON data.
1096
+ #
1097
+ # @option params [String] :accept
1098
+ # The desired MIME type for the response from the agent runtime. This
1099
+ # tells the agent runtime what format to use for the response data.
1100
+ # Common values include application/json for JSON data.
1101
+ #
1102
+ # @option params [String] :mcp_session_id
1103
+ # The identifier of the MCP session.
1104
+ #
1105
+ # @option params [String] :runtime_session_id
1106
+ # The identifier of the runtime session.
1107
+ #
1108
+ # **A suitable default value is auto-generated.** You should normally
1109
+ # not need to pass this option.**
1110
+ #
1111
+ # @option params [String] :mcp_protocol_version
1112
+ # The version of the MCP protocol being used.
1113
+ #
1114
+ # @option params [String] :runtime_user_id
1115
+ # The identifier of the runtime user.
1116
+ #
1117
+ # @option params [String] :trace_id
1118
+ # The trace identifier for request tracking.
1119
+ #
1120
+ # @option params [String] :trace_parent
1121
+ # The parent trace information for distributed tracing.
1122
+ #
1123
+ # @option params [String] :trace_state
1124
+ # The trace state information for distributed tracing.
1125
+ #
1126
+ # @option params [String] :baggage
1127
+ # Additional context information for distributed tracing.
1128
+ #
1129
+ # @option params [required, String] :agent_runtime_arn
1130
+ # The Amazon Web Services Resource Name (ARN) of the agent runtime to
1131
+ # invoke. The ARN uniquely identifies the agent runtime resource in
1132
+ # Amazon Bedrock.
1133
+ #
1134
+ # @option params [String] :qualifier
1135
+ # The qualifier to use for the agent runtime. This can be a version
1136
+ # number or an alias name that points to a specific version. If not
1137
+ # specified, Amazon Bedrock uses the default version of the agent
1138
+ # runtime.
1139
+ #
1140
+ # @option params [required, String, StringIO, File] :payload
1141
+ # The input data to send to the agent runtime. The format of this data
1142
+ # depends on the specific agent configuration and must match the
1143
+ # specified content type. For most agents, this is a JSON object
1144
+ # containing the user's request.
1145
+ #
1146
+ # @return [Types::InvokeAgentRuntimeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1147
+ #
1148
+ # * {Types::InvokeAgentRuntimeResponse#runtime_session_id #runtime_session_id} => String
1149
+ # * {Types::InvokeAgentRuntimeResponse#mcp_session_id #mcp_session_id} => String
1150
+ # * {Types::InvokeAgentRuntimeResponse#mcp_protocol_version #mcp_protocol_version} => String
1151
+ # * {Types::InvokeAgentRuntimeResponse#trace_id #trace_id} => String
1152
+ # * {Types::InvokeAgentRuntimeResponse#trace_parent #trace_parent} => String
1153
+ # * {Types::InvokeAgentRuntimeResponse#trace_state #trace_state} => String
1154
+ # * {Types::InvokeAgentRuntimeResponse#baggage #baggage} => String
1155
+ # * {Types::InvokeAgentRuntimeResponse#content_type #content_type} => String
1156
+ # * {Types::InvokeAgentRuntimeResponse#response #response} => IO
1157
+ # * {Types::InvokeAgentRuntimeResponse#status_code #status_code} => Integer
1158
+ #
1159
+ # @example Request syntax with placeholder values
1160
+ #
1161
+ # resp = client.invoke_agent_runtime({
1162
+ # content_type: "MimeType",
1163
+ # accept: "MimeType",
1164
+ # mcp_session_id: "StringType",
1165
+ # runtime_session_id: "SessionType",
1166
+ # mcp_protocol_version: "StringType",
1167
+ # runtime_user_id: "StringType",
1168
+ # trace_id: "InvokeAgentRuntimeRequestTraceIdString",
1169
+ # trace_parent: "InvokeAgentRuntimeRequestTraceParentString",
1170
+ # trace_state: "InvokeAgentRuntimeRequestTraceStateString",
1171
+ # baggage: "InvokeAgentRuntimeRequestBaggageString",
1172
+ # agent_runtime_arn: "String", # required
1173
+ # qualifier: "String",
1174
+ # payload: "data", # required
1175
+ # })
1176
+ #
1177
+ # @example Response structure
1178
+ #
1179
+ # resp.runtime_session_id #=> String
1180
+ # resp.mcp_session_id #=> String
1181
+ # resp.mcp_protocol_version #=> String
1182
+ # resp.trace_id #=> String
1183
+ # resp.trace_parent #=> String
1184
+ # resp.trace_state #=> String
1185
+ # resp.baggage #=> String
1186
+ # resp.content_type #=> String
1187
+ # resp.response #=> IO
1188
+ # resp.status_code #=> Integer
1189
+ #
1190
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeAgentRuntime AWS API Documentation
1191
+ #
1192
+ # @overload invoke_agent_runtime(params = {})
1193
+ # @param [Hash] params ({})
1194
+ def invoke_agent_runtime(params = {}, options = {}, &block)
1195
+ req = build_request(:invoke_agent_runtime, params)
1196
+ req.send_request(options, &block)
1197
+ end
1198
+
1199
+ # Executes code within an active code interpreter session in Amazon
1200
+ # Bedrock. This operation processes the provided code, runs it in a
1201
+ # secure environment, and returns the execution results including
1202
+ # output, errors, and generated visualizations.
1203
+ #
1204
+ # To execute code, you must specify the code interpreter identifier,
1205
+ # session ID, and the code to run in the arguments parameter. The
1206
+ # operation returns a stream containing the execution results, which can
1207
+ # include text output, error messages, and data visualizations.
1208
+ #
1209
+ # This operation is subject to request rate limiting based on your
1210
+ # account's service quotas.
1211
+ #
1212
+ # The following operations are related to `InvokeCodeInterpreter`:
1213
+ #
1214
+ # * [StartCodeInterpreterSession][1]
1215
+ #
1216
+ # * [GetCodeInterpreterSession][2]
1217
+ #
1218
+ #
1219
+ #
1220
+ # [1]: https://docs.aws.amazon.com/API_StartCodeInterpreterSession.html
1221
+ # [2]: https://docs.aws.amazon.com/API_GetCodeInterpreterSession.html
1222
+ #
1223
+ # @option params [required, String] :code_interpreter_identifier
1224
+ # The unique identifier of the code interpreter associated with the
1225
+ # session. This must match the identifier used when creating the session
1226
+ # with `StartCodeInterpreterSession`.
1227
+ #
1228
+ # @option params [String] :session_id
1229
+ # The unique identifier of the code interpreter session to use. This
1230
+ # must be an active session created with `StartCodeInterpreterSession`.
1231
+ # If the session has expired or been stopped, the request will fail.
1232
+ #
1233
+ # @option params [required, String] :name
1234
+ # The name of the code interpreter to invoke.
1235
+ #
1236
+ # @option params [Types::ToolArguments] :arguments
1237
+ # The arguments for the code interpreter. This includes the code to
1238
+ # execute and any additional parameters such as the programming
1239
+ # language, whether to clear the execution context, and other execution
1240
+ # options. The structure of this parameter depends on the specific code
1241
+ # interpreter being used.
1242
+ #
1243
+ # @return [Types::InvokeCodeInterpreterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1244
+ #
1245
+ # * {Types::InvokeCodeInterpreterResponse#session_id #session_id} => String
1246
+ # * {Types::InvokeCodeInterpreterResponse#stream #stream} => Types::CodeInterpreterStreamOutput
1247
+ #
1248
+ # @example EventStream Operation Example
1249
+ #
1250
+ # # You can process the event once it arrives immediately, or wait until the
1251
+ # # full response is complete and iterate through the eventstream enumerator.
1252
+ #
1253
+ # # To interact with event immediately, you need to register invoke_code_interpreter
1254
+ # # with callbacks. Callbacks can be registered for specific events or for all
1255
+ # # events, including error events.
1256
+ #
1257
+ # # Callbacks can be passed into the `:event_stream_handler` option or within a
1258
+ # # block statement attached to the #invoke_code_interpreter call directly. Hybrid
1259
+ # # pattern of both is also supported.
1260
+ #
1261
+ # # `:event_stream_handler` option takes in either a Proc object or
1262
+ # # Aws::BedrockAgentCore::EventStreams::CodeInterpreterStreamOutput object.
1263
+ #
1264
+ # # Usage pattern a): Callbacks with a block attached to #invoke_code_interpreter
1265
+ # # Example for registering callbacks for all event types and an error event
1266
+ # client.invoke_code_interpreter(
1267
+ # # params input
1268
+ # ) do |stream|
1269
+ # stream.on_error_event do |event|
1270
+ # # catch unmodeled error event in the stream
1271
+ # raise event
1272
+ # # => Aws::Errors::EventError
1273
+ # # event.event_type => :error
1274
+ # # event.error_code => String
1275
+ # # event.error_message => String
1276
+ # end
1277
+ #
1278
+ # stream.on_event do |event|
1279
+ # # process all events arrive
1280
+ # puts event.event_type
1281
+ # # ...
1282
+ # end
1283
+ # end
1284
+ #
1285
+ # # Usage pattern b): Pass in `:event_stream_handler` for #invoke_code_interpreter
1286
+ # # 1) Create a Aws::BedrockAgentCore::EventStreams::CodeInterpreterStreamOutput object
1287
+ # # Example for registering callbacks with specific events
1288
+ #
1289
+ # handler = Aws::BedrockAgentCore::EventStreams::CodeInterpreterStreamOutput.new
1290
+ # handler.on_result_event do |event|
1291
+ # event # => Aws::BedrockAgentCore::Types::result
1292
+ # end
1293
+ # handler.on_access_denied_exception_event do |event|
1294
+ # event # => Aws::BedrockAgentCore::Types::accessDeniedException
1295
+ # end
1296
+ # handler.on_conflict_exception_event do |event|
1297
+ # event # => Aws::BedrockAgentCore::Types::conflictException
1298
+ # end
1299
+ # handler.on_internal_server_exception_event do |event|
1300
+ # event # => Aws::BedrockAgentCore::Types::internalServerException
1301
+ # end
1302
+ # handler.on_resource_not_found_exception_event do |event|
1303
+ # event # => Aws::BedrockAgentCore::Types::resourceNotFoundException
1304
+ # end
1305
+ # handler.on_service_quota_exceeded_exception_event do |event|
1306
+ # event # => Aws::BedrockAgentCore::Types::serviceQuotaExceededException
1307
+ # end
1308
+ # handler.on_throttling_exception_event do |event|
1309
+ # event # => Aws::BedrockAgentCore::Types::throttlingException
1310
+ # end
1311
+ # handler.on_validation_exception_event do |event|
1312
+ # event # => Aws::BedrockAgentCore::Types::validationException
1313
+ # end
1314
+ #
1315
+ # client.invoke_code_interpreter(
1316
+ # # params inputs
1317
+ # event_stream_handler: handler
1318
+ # )
1319
+ #
1320
+ # # 2) Use a Ruby Proc object
1321
+ # # Example for registering callbacks with specific events
1322
+ # handler = Proc.new do |stream|
1323
+ # stream.on_result_event do |event|
1324
+ # event # => Aws::BedrockAgentCore::Types::result
1325
+ # end
1326
+ # stream.on_access_denied_exception_event do |event|
1327
+ # event # => Aws::BedrockAgentCore::Types::accessDeniedException
1328
+ # end
1329
+ # stream.on_conflict_exception_event do |event|
1330
+ # event # => Aws::BedrockAgentCore::Types::conflictException
1331
+ # end
1332
+ # stream.on_internal_server_exception_event do |event|
1333
+ # event # => Aws::BedrockAgentCore::Types::internalServerException
1334
+ # end
1335
+ # stream.on_resource_not_found_exception_event do |event|
1336
+ # event # => Aws::BedrockAgentCore::Types::resourceNotFoundException
1337
+ # end
1338
+ # stream.on_service_quota_exceeded_exception_event do |event|
1339
+ # event # => Aws::BedrockAgentCore::Types::serviceQuotaExceededException
1340
+ # end
1341
+ # stream.on_throttling_exception_event do |event|
1342
+ # event # => Aws::BedrockAgentCore::Types::throttlingException
1343
+ # end
1344
+ # stream.on_validation_exception_event do |event|
1345
+ # event # => Aws::BedrockAgentCore::Types::validationException
1346
+ # end
1347
+ # end
1348
+ #
1349
+ # client.invoke_code_interpreter(
1350
+ # # params inputs
1351
+ # event_stream_handler: handler
1352
+ # )
1353
+ #
1354
+ # # Usage pattern c): Hybrid pattern of a) and b)
1355
+ # handler = Aws::BedrockAgentCore::EventStreams::CodeInterpreterStreamOutput.new
1356
+ # handler.on_result_event do |event|
1357
+ # event # => Aws::BedrockAgentCore::Types::result
1358
+ # end
1359
+ # handler.on_access_denied_exception_event do |event|
1360
+ # event # => Aws::BedrockAgentCore::Types::accessDeniedException
1361
+ # end
1362
+ # handler.on_conflict_exception_event do |event|
1363
+ # event # => Aws::BedrockAgentCore::Types::conflictException
1364
+ # end
1365
+ # handler.on_internal_server_exception_event do |event|
1366
+ # event # => Aws::BedrockAgentCore::Types::internalServerException
1367
+ # end
1368
+ # handler.on_resource_not_found_exception_event do |event|
1369
+ # event # => Aws::BedrockAgentCore::Types::resourceNotFoundException
1370
+ # end
1371
+ # handler.on_service_quota_exceeded_exception_event do |event|
1372
+ # event # => Aws::BedrockAgentCore::Types::serviceQuotaExceededException
1373
+ # end
1374
+ # handler.on_throttling_exception_event do |event|
1375
+ # event # => Aws::BedrockAgentCore::Types::throttlingException
1376
+ # end
1377
+ # handler.on_validation_exception_event do |event|
1378
+ # event # => Aws::BedrockAgentCore::Types::validationException
1379
+ # end
1380
+ #
1381
+ # client.invoke_code_interpreter(
1382
+ # # params input
1383
+ # event_stream_handler: handler
1384
+ # ) do |stream|
1385
+ # stream.on_error_event do |event|
1386
+ # # catch unmodeled error event in the stream
1387
+ # raise event
1388
+ # # => Aws::Errors::EventError
1389
+ # # event.event_type => :error
1390
+ # # event.error_code => String
1391
+ # # event.error_message => String
1392
+ # end
1393
+ # end
1394
+ #
1395
+ # # You can also iterate through events after the response complete.
1396
+ # # Events are available at
1397
+ # resp.stream # => Enumerator
1398
+ # # For parameter input example, please refer to following request syntax.
1399
+ #
1400
+ # @example Request syntax with placeholder values
1401
+ #
1402
+ # resp = client.invoke_code_interpreter({
1403
+ # code_interpreter_identifier: "String", # required
1404
+ # session_id: "CodeInterpreterSessionId",
1405
+ # name: "executeCode", # required, accepts executeCode, executeCommand, readFiles, listFiles, removeFiles, writeFiles, startCommandExecution, getTask, stopTask
1406
+ # arguments: {
1407
+ # code: "MaxLenString",
1408
+ # language: "python", # accepts python, javascript, typescript
1409
+ # clear_context: false,
1410
+ # command: "MaxLenString",
1411
+ # path: "MaxLenString",
1412
+ # paths: ["MaxLenString"],
1413
+ # content: [
1414
+ # {
1415
+ # path: "MaxLenString", # required
1416
+ # text: "MaxLenString",
1417
+ # blob: "data",
1418
+ # },
1419
+ # ],
1420
+ # directory_path: "MaxLenString",
1421
+ # task_id: "MaxLenString",
1422
+ # },
1423
+ # })
1424
+ #
1425
+ # @example Response structure
1426
+ #
1427
+ # resp.session_id #=> String
1428
+ # # All events are available at resp.stream:
1429
+ # resp.stream #=> Enumerator
1430
+ # resp.stream.event_types #=> [:result, :access_denied_exception, :conflict_exception, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception]
1431
+ #
1432
+ # # For :result event available at #on_result_event callback and response eventstream enumerator:
1433
+ # event.content #=> Array
1434
+ # event.content[0].type #=> String, one of "text", "image", "resource", "resource_link"
1435
+ # event.content[0].text #=> String
1436
+ # event.content[0].data #=> String
1437
+ # event.content[0].mime_type #=> String
1438
+ # event.content[0].uri #=> String
1439
+ # event.content[0].name #=> String
1440
+ # event.content[0].description #=> String
1441
+ # event.content[0].size #=> Integer
1442
+ # event.content[0].resource.type #=> String, one of "text", "blob"
1443
+ # event.content[0].resource.uri #=> String
1444
+ # event.content[0].resource.mime_type #=> String
1445
+ # event.content[0].resource.text #=> String
1446
+ # event.content[0].resource.blob #=> String
1447
+ # event.structured_content.task_id #=> String
1448
+ # event.structured_content.task_status #=> String, one of "submitted", "working", "completed", "canceled", "failed"
1449
+ # event.structured_content.stdout #=> String
1450
+ # event.structured_content.stderr #=> String
1451
+ # event.structured_content.exit_code #=> Integer
1452
+ # event.structured_content.execution_time #=> Float
1453
+ # event.is_error #=> Boolean
1454
+ #
1455
+ # # For :access_denied_exception event available at #on_access_denied_exception_event callback and response eventstream enumerator:
1456
+ # event.message #=> String
1457
+ #
1458
+ # # For :conflict_exception event available at #on_conflict_exception_event callback and response eventstream enumerator:
1459
+ # event.message #=> String
1460
+ #
1461
+ # # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
1462
+ # event.message #=> String
1463
+ #
1464
+ # # For :resource_not_found_exception event available at #on_resource_not_found_exception_event callback and response eventstream enumerator:
1465
+ # event.message #=> String
1466
+ #
1467
+ # # For :service_quota_exceeded_exception event available at #on_service_quota_exceeded_exception_event callback and response eventstream enumerator:
1468
+ # event.message #=> String
1469
+ #
1470
+ # # For :throttling_exception event available at #on_throttling_exception_event callback and response eventstream enumerator:
1471
+ # event.message #=> String
1472
+ #
1473
+ # # For :validation_exception event available at #on_validation_exception_event callback and response eventstream enumerator:
1474
+ # event.message #=> String
1475
+ # event.reason #=> String, one of "CannotParse", "FieldValidationFailed", "IdempotentParameterMismatchException", "EventInOtherSession", "ResourceConflict"
1476
+ # event.field_list #=> Array
1477
+ # event.field_list[0].name #=> String
1478
+ # event.field_list[0].message #=> String
1479
+ #
1480
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeCodeInterpreter AWS API Documentation
1481
+ #
1482
+ # @overload invoke_code_interpreter(params = {})
1483
+ # @param [Hash] params ({})
1484
+ def invoke_code_interpreter(params = {}, options = {}, &block)
1485
+ params = params.dup
1486
+ event_stream_handler = case handler = params.delete(:event_stream_handler)
1487
+ when EventStreams::CodeInterpreterStreamOutput then handler
1488
+ when Proc then EventStreams::CodeInterpreterStreamOutput.new.tap(&handler)
1489
+ when nil then EventStreams::CodeInterpreterStreamOutput.new
1490
+ else
1491
+ msg = "expected :event_stream_handler to be a block or "\
1492
+ "instance of Aws::BedrockAgentCore::EventStreams::CodeInterpreterStreamOutput"\
1493
+ ", got `#{handler.inspect}` instead"
1494
+ raise ArgumentError, msg
1495
+ end
1496
+
1497
+ yield(event_stream_handler) if block_given?
1498
+
1499
+ req = build_request(:invoke_code_interpreter, params)
1500
+
1501
+ req.context[:event_stream_handler] = event_stream_handler
1502
+ req.handlers.add(Aws::Binary::DecodeHandler, priority: 95)
1503
+
1504
+ req.send_request(options, &block)
1505
+ end
1506
+
1507
+ # Lists all actors in a memory store. We recommend using pagination to
1508
+ # ensure that the operation returns quickly and successfully.
1509
+ #
1510
+ # To use this operation, you must have the `genesismemory:ListActors`
1511
+ # permission.
1512
+ #
1513
+ # @option params [required, String] :memory_id
1514
+ # The identifier of the memory store for which to list actors.
1515
+ #
1516
+ # @option params [Integer] :max_results
1517
+ # The maximum number of results to return in a single call. Minimum
1518
+ # value of 1, maximum value of 100. Default is 20.
1519
+ #
1520
+ # @option params [String] :next_token
1521
+ # The token for the next set of results. Use the value returned in the
1522
+ # previous response in the next request to retrieve the next set of
1523
+ # results.
1524
+ #
1525
+ # @return [Types::ListActorsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1526
+ #
1527
+ # * {Types::ListActorsOutput#actor_summaries #actor_summaries} => Array&lt;Types::ActorSummary&gt;
1528
+ # * {Types::ListActorsOutput#next_token #next_token} => String
1529
+ #
1530
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1531
+ #
1532
+ # @example Request syntax with placeholder values
1533
+ #
1534
+ # resp = client.list_actors({
1535
+ # memory_id: "MemoryId", # required
1536
+ # max_results: 1,
1537
+ # next_token: "PaginationToken",
1538
+ # })
1539
+ #
1540
+ # @example Response structure
1541
+ #
1542
+ # resp.actor_summaries #=> Array
1543
+ # resp.actor_summaries[0].actor_id #=> String
1544
+ # resp.next_token #=> String
1545
+ #
1546
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListActors AWS API Documentation
1547
+ #
1548
+ # @overload list_actors(params = {})
1549
+ # @param [Hash] params ({})
1550
+ def list_actors(params = {}, options = {})
1551
+ req = build_request(:list_actors, params)
1552
+ req.send_request(options)
1553
+ end
1554
+
1555
+ # Retrieves a list of browser sessions in Amazon Bedrock that match the
1556
+ # specified criteria. This operation returns summary information about
1557
+ # each session, including identifiers, status, and timestamps.
1558
+ #
1559
+ # You can filter the results by browser identifier and session status.
1560
+ # The operation supports pagination to handle large result sets
1561
+ # efficiently.
1562
+ #
1563
+ # We recommend using pagination to ensure that the operation returns
1564
+ # quickly and successfully when retrieving large numbers of sessions.
1565
+ #
1566
+ # The following operations are related to `ListBrowserSessions`:
1567
+ #
1568
+ # * [StartBrowserSession][1]
1569
+ #
1570
+ # * [GetBrowserSession][2]
1571
+ #
1572
+ #
1573
+ #
1574
+ # [1]: https://docs.aws.amazon.com/API_StartBrowserSession.html
1575
+ # [2]: https://docs.aws.amazon.com/API_GetBrowserSession.html
1576
+ #
1577
+ # @option params [required, String] :browser_identifier
1578
+ # The unique identifier of the browser to list sessions for. If
1579
+ # specified, only sessions for this browser are returned. If not
1580
+ # specified, sessions for all browsers are returned.
1581
+ #
1582
+ # @option params [Integer] :max_results
1583
+ # The maximum number of results to return in a single call. The default
1584
+ # value is 10. Valid values range from 1 to 100. To retrieve the
1585
+ # remaining results, make another call with the returned `nextToken`
1586
+ # value.
1587
+ #
1588
+ # @option params [String] :next_token
1589
+ # The token for the next set of results. Use the value returned in the
1590
+ # previous response in the next request to retrieve the next set of
1591
+ # results. If not specified, Amazon Bedrock returns the first page of
1592
+ # results.
1593
+ #
1594
+ # @option params [String] :status
1595
+ # The status of the browser sessions to list. Valid values include
1596
+ # ACTIVE, STOPPING, and STOPPED. If not specified, sessions with any
1597
+ # status are returned.
1598
+ #
1599
+ # @return [Types::ListBrowserSessionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1600
+ #
1601
+ # * {Types::ListBrowserSessionsResponse#items #items} => Array&lt;Types::BrowserSessionSummary&gt;
1602
+ # * {Types::ListBrowserSessionsResponse#next_token #next_token} => String
1603
+ #
1604
+ # @example Request syntax with placeholder values
1605
+ #
1606
+ # resp = client.list_browser_sessions({
1607
+ # browser_identifier: "String", # required
1608
+ # max_results: 1,
1609
+ # next_token: "NextToken",
1610
+ # status: "READY", # accepts READY, TERMINATED
1611
+ # })
1612
+ #
1613
+ # @example Response structure
1614
+ #
1615
+ # resp.items #=> Array
1616
+ # resp.items[0].browser_identifier #=> String
1617
+ # resp.items[0].session_id #=> String
1618
+ # resp.items[0].name #=> String
1619
+ # resp.items[0].status #=> String, one of "READY", "TERMINATED"
1620
+ # resp.items[0].created_at #=> Time
1621
+ # resp.items[0].last_updated_at #=> Time
1622
+ # resp.next_token #=> String
1623
+ #
1624
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListBrowserSessions AWS API Documentation
1625
+ #
1626
+ # @overload list_browser_sessions(params = {})
1627
+ # @param [Hash] params ({})
1628
+ def list_browser_sessions(params = {}, options = {})
1629
+ req = build_request(:list_browser_sessions, params)
1630
+ req.send_request(options)
1631
+ end
1632
+
1633
+ # Retrieves a list of code interpreter sessions in Amazon Bedrock that
1634
+ # match the specified criteria. This operation returns summary
1635
+ # information about each session, including identifiers, status, and
1636
+ # timestamps.
1637
+ #
1638
+ # You can filter the results by code interpreter identifier and session
1639
+ # status. The operation supports pagination to handle large result sets
1640
+ # efficiently.
1641
+ #
1642
+ # We recommend using pagination to ensure that the operation returns
1643
+ # quickly and successfully when retrieving large numbers of sessions.
1644
+ #
1645
+ # The following operations are related to `ListCodeInterpreterSessions`:
1646
+ #
1647
+ # * [StartCodeInterpreterSession][1]
1648
+ #
1649
+ # * [GetCodeInterpreterSession][2]
1650
+ #
1651
+ #
1652
+ #
1653
+ # [1]: https://docs.aws.amazon.com/API_StartCodeInterpreterSession.html
1654
+ # [2]: https://docs.aws.amazon.com/API_GetCodeInterpreterSession.html
1655
+ #
1656
+ # @option params [required, String] :code_interpreter_identifier
1657
+ # The unique identifier of the code interpreter to list sessions for. If
1658
+ # specified, only sessions for this code interpreter are returned. If
1659
+ # not specified, sessions for all code interpreters are returned.
1660
+ #
1661
+ # @option params [Integer] :max_results
1662
+ # The maximum number of results to return in a single call. The default
1663
+ # value is 10. Valid values range from 1 to 100. To retrieve the
1664
+ # remaining results, make another call with the returned `nextToken`
1665
+ # value.
1666
+ #
1667
+ # @option params [String] :next_token
1668
+ # The token for the next set of results. Use the value returned in the
1669
+ # previous response in the next request to retrieve the next set of
1670
+ # results. If not specified, Amazon Bedrock returns the first page of
1671
+ # results.
1672
+ #
1673
+ # @option params [String] :status
1674
+ # The status of the code interpreter sessions to list. Valid values
1675
+ # include ACTIVE, STOPPING, and STOPPED. If not specified, sessions with
1676
+ # any status are returned.
1677
+ #
1678
+ # @return [Types::ListCodeInterpreterSessionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1679
+ #
1680
+ # * {Types::ListCodeInterpreterSessionsResponse#items #items} => Array&lt;Types::CodeInterpreterSessionSummary&gt;
1681
+ # * {Types::ListCodeInterpreterSessionsResponse#next_token #next_token} => String
1682
+ #
1683
+ # @example Request syntax with placeholder values
1684
+ #
1685
+ # resp = client.list_code_interpreter_sessions({
1686
+ # code_interpreter_identifier: "String", # required
1687
+ # max_results: 1,
1688
+ # next_token: "NextToken",
1689
+ # status: "READY", # accepts READY, TERMINATED
1690
+ # })
1691
+ #
1692
+ # @example Response structure
1693
+ #
1694
+ # resp.items #=> Array
1695
+ # resp.items[0].code_interpreter_identifier #=> String
1696
+ # resp.items[0].session_id #=> String
1697
+ # resp.items[0].name #=> String
1698
+ # resp.items[0].status #=> String, one of "READY", "TERMINATED"
1699
+ # resp.items[0].created_at #=> Time
1700
+ # resp.items[0].last_updated_at #=> Time
1701
+ # resp.next_token #=> String
1702
+ #
1703
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListCodeInterpreterSessions AWS API Documentation
1704
+ #
1705
+ # @overload list_code_interpreter_sessions(params = {})
1706
+ # @param [Hash] params ({})
1707
+ def list_code_interpreter_sessions(params = {}, options = {})
1708
+ req = build_request(:list_code_interpreter_sessions, params)
1709
+ req.send_request(options)
1710
+ end
1711
+
1712
+ # Lists events in a memory store based on specified criteria. We
1713
+ # recommend using pagination to ensure that the operation returns
1714
+ # quickly and successfully.
1715
+ #
1716
+ # To use this operation, you must have the `genesismemory:ListEvents`
1717
+ # permission.
1718
+ #
1719
+ # @option params [required, String] :memory_id
1720
+ # The identifier of the memory store for which to list events.
1721
+ #
1722
+ # @option params [required, String] :session_id
1723
+ # The identifier of the session for which to list events. If specified,
1724
+ # only events from this session are returned.
1725
+ #
1726
+ # @option params [required, String] :actor_id
1727
+ # The identifier of the actor for which to list events. If specified,
1728
+ # only events from this actor are returned.
1729
+ #
1730
+ # @option params [Boolean] :include_payloads
1731
+ # Specifies whether to include event payloads in the response. Set to
1732
+ # true to include payloads, or false to exclude them.
1733
+ #
1734
+ # @option params [Types::FilterInput] :filter
1735
+ # Filter criteria to apply when listing events.
1736
+ #
1737
+ # @option params [Integer] :max_results
1738
+ # The maximum number of results to return in a single call. Minimum
1739
+ # value of 1, maximum value of 100. Default is 20.
1740
+ #
1741
+ # @option params [String] :next_token
1742
+ # The token for the next set of results. Use the value returned in the
1743
+ # previous response in the next request to retrieve the next set of
1744
+ # results.
1745
+ #
1746
+ # @return [Types::ListEventsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1747
+ #
1748
+ # * {Types::ListEventsOutput#events #events} => Array&lt;Types::Event&gt;
1749
+ # * {Types::ListEventsOutput#next_token #next_token} => String
1750
+ #
1751
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1752
+ #
1753
+ # @example Request syntax with placeholder values
1754
+ #
1755
+ # resp = client.list_events({
1756
+ # memory_id: "MemoryId", # required
1757
+ # session_id: "SessionId", # required
1758
+ # actor_id: "ActorId", # required
1759
+ # include_payloads: false,
1760
+ # filter: {
1761
+ # branch: {
1762
+ # name: "BranchName", # required
1763
+ # include_parent_branches: false,
1764
+ # },
1765
+ # },
1766
+ # max_results: 1,
1767
+ # next_token: "PaginationToken",
1768
+ # })
1769
+ #
1770
+ # @example Response structure
1771
+ #
1772
+ # resp.events #=> Array
1773
+ # resp.events[0].memory_id #=> String
1774
+ # resp.events[0].actor_id #=> String
1775
+ # resp.events[0].session_id #=> String
1776
+ # resp.events[0].event_id #=> String
1777
+ # resp.events[0].event_timestamp #=> Time
1778
+ # resp.events[0].payload #=> Array
1779
+ # resp.events[0].payload[0].conversational.content.text #=> String
1780
+ # resp.events[0].payload[0].conversational.role #=> String, one of "ASSISTANT", "USER", "TOOL", "OTHER"
1781
+ # resp.events[0].branch.root_event_id #=> String
1782
+ # resp.events[0].branch.name #=> String
1783
+ # resp.next_token #=> String
1784
+ #
1785
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListEvents AWS API Documentation
1786
+ #
1787
+ # @overload list_events(params = {})
1788
+ # @param [Hash] params ({})
1789
+ def list_events(params = {}, options = {})
1790
+ req = build_request(:list_events, params)
1791
+ req.send_request(options)
1792
+ end
1793
+
1794
+ # Lists memory records in a memory store based on specified criteria. We
1795
+ # recommend using pagination to ensure that the operation returns
1796
+ # quickly and successfully.
1797
+ #
1798
+ # To use this operation, you must have the
1799
+ # `genesismemory:ListMemoryRecords` permission.
1800
+ #
1801
+ # @option params [required, String] :memory_id
1802
+ # The identifier of the memory store for which to list memory records.
1803
+ #
1804
+ # @option params [required, String] :namespace
1805
+ # The namespace to filter memory records by. If specified, only memory
1806
+ # records in this namespace are returned.
1807
+ #
1808
+ # @option params [String] :memory_strategy_id
1809
+ # The memory strategy identifier to filter memory records by. If
1810
+ # specified, only memory records with this strategy ID are returned.
1811
+ #
1812
+ # @option params [Integer] :max_results
1813
+ # The maximum number of results to return in a single call. Minimum
1814
+ # value of 1, maximum value of 100. Default is 20.
1815
+ #
1816
+ # @option params [String] :next_token
1817
+ # The token for the next set of results. Use the value returned in the
1818
+ # previous response in the next request to retrieve the next set of
1819
+ # results.
1820
+ #
1821
+ # @return [Types::ListMemoryRecordsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1822
+ #
1823
+ # * {Types::ListMemoryRecordsOutput#memory_record_summaries #memory_record_summaries} => Array&lt;Types::MemoryRecordSummary&gt;
1824
+ # * {Types::ListMemoryRecordsOutput#next_token #next_token} => String
1825
+ #
1826
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1827
+ #
1828
+ # @example Request syntax with placeholder values
1829
+ #
1830
+ # resp = client.list_memory_records({
1831
+ # memory_id: "MemoryId", # required
1832
+ # namespace: "Namespace", # required
1833
+ # memory_strategy_id: "MemoryStrategyId",
1834
+ # max_results: 1,
1835
+ # next_token: "PaginationToken",
1836
+ # })
1837
+ #
1838
+ # @example Response structure
1839
+ #
1840
+ # resp.memory_record_summaries #=> Array
1841
+ # resp.memory_record_summaries[0].memory_record_id #=> String
1842
+ # resp.memory_record_summaries[0].content.text #=> String
1843
+ # resp.memory_record_summaries[0].memory_strategy_id #=> String
1844
+ # resp.memory_record_summaries[0].namespaces #=> Array
1845
+ # resp.memory_record_summaries[0].namespaces[0] #=> String
1846
+ # resp.memory_record_summaries[0].created_at #=> Time
1847
+ # resp.memory_record_summaries[0].score #=> Float
1848
+ # resp.next_token #=> String
1849
+ #
1850
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListMemoryRecords AWS API Documentation
1851
+ #
1852
+ # @overload list_memory_records(params = {})
1853
+ # @param [Hash] params ({})
1854
+ def list_memory_records(params = {}, options = {})
1855
+ req = build_request(:list_memory_records, params)
1856
+ req.send_request(options)
1857
+ end
1858
+
1859
+ # Lists sessions in a memory store based on specified criteria. We
1860
+ # recommend using pagination to ensure that the operation returns
1861
+ # quickly and successfully.
1862
+ #
1863
+ # To use this operation, you must have the `genesismemory:ListSessions`
1864
+ # permission.
1865
+ #
1866
+ # @option params [required, String] :memory_id
1867
+ # The identifier of the memory store for which to list sessions.
1868
+ #
1869
+ # @option params [required, String] :actor_id
1870
+ # The identifier of the actor for which to list sessions. If specified,
1871
+ # only sessions involving this actor are returned.
1872
+ #
1873
+ # @option params [Integer] :max_results
1874
+ # The maximum number of results to return in a single call. Minimum
1875
+ # value of 1, maximum value of 100. Default is 20.
1876
+ #
1877
+ # @option params [String] :next_token
1878
+ # The token for the next set of results. Use the value returned in the
1879
+ # previous response in the next request to retrieve the next set of
1880
+ # results.
1881
+ #
1882
+ # @return [Types::ListSessionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1883
+ #
1884
+ # * {Types::ListSessionsOutput#session_summaries #session_summaries} => Array&lt;Types::SessionSummary&gt;
1885
+ # * {Types::ListSessionsOutput#next_token #next_token} => String
1886
+ #
1887
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1888
+ #
1889
+ # @example Request syntax with placeholder values
1890
+ #
1891
+ # resp = client.list_sessions({
1892
+ # memory_id: "MemoryId", # required
1893
+ # actor_id: "ActorId", # required
1894
+ # max_results: 1,
1895
+ # next_token: "PaginationToken",
1896
+ # })
1897
+ #
1898
+ # @example Response structure
1899
+ #
1900
+ # resp.session_summaries #=> Array
1901
+ # resp.session_summaries[0].session_id #=> String
1902
+ # resp.session_summaries[0].actor_id #=> String
1903
+ # resp.session_summaries[0].created_at #=> Time
1904
+ # resp.next_token #=> String
1905
+ #
1906
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ListSessions AWS API Documentation
1907
+ #
1908
+ # @overload list_sessions(params = {})
1909
+ # @param [Hash] params ({})
1910
+ def list_sessions(params = {}, options = {})
1911
+ req = build_request(:list_sessions, params)
1912
+ req.send_request(options)
1913
+ end
1914
+
1915
+ # Searches for and retrieves memory records from a memory store based on
1916
+ # specified search criteria. We recommend using pagination to ensure
1917
+ # that the operation returns quickly and successfully.
1918
+ #
1919
+ # To use this operation, you must have the
1920
+ # `genesismemory:RetrieveMemoryRecords` permission.
1921
+ #
1922
+ # @option params [required, String] :memory_id
1923
+ # The identifier of the memory store from which to retrieve memory
1924
+ # records.
1925
+ #
1926
+ # @option params [required, String] :namespace
1927
+ # The namespace to filter memory records by. If specified, only memory
1928
+ # records in this namespace are searched.
1929
+ #
1930
+ # @option params [required, Types::SearchCriteria] :search_criteria
1931
+ # The search criteria to use for finding relevant memory records. This
1932
+ # includes the search query, memory strategy ID, and other search
1933
+ # parameters.
1934
+ #
1935
+ # @option params [String] :next_token
1936
+ # The token for the next set of results. Use the value returned in the
1937
+ # previous response in the next request to retrieve the next set of
1938
+ # results.
1939
+ #
1940
+ # @option params [Integer] :max_results
1941
+ # The maximum number of results to return in a single call. Minimum
1942
+ # value of 1, maximum value of 100. Default is 20.
1943
+ #
1944
+ # @return [Types::RetrieveMemoryRecordsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1945
+ #
1946
+ # * {Types::RetrieveMemoryRecordsOutput#memory_record_summaries #memory_record_summaries} => Array&lt;Types::MemoryRecordSummary&gt;
1947
+ # * {Types::RetrieveMemoryRecordsOutput#next_token #next_token} => String
1948
+ #
1949
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1950
+ #
1951
+ # @example Request syntax with placeholder values
1952
+ #
1953
+ # resp = client.retrieve_memory_records({
1954
+ # memory_id: "MemoryId", # required
1955
+ # namespace: "Namespace", # required
1956
+ # search_criteria: { # required
1957
+ # search_query: "SearchCriteriaSearchQueryString", # required
1958
+ # memory_strategy_id: "MemoryStrategyId",
1959
+ # top_k: 1,
1960
+ # },
1961
+ # next_token: "PaginationToken",
1962
+ # max_results: 1,
1963
+ # })
1964
+ #
1965
+ # @example Response structure
1966
+ #
1967
+ # resp.memory_record_summaries #=> Array
1968
+ # resp.memory_record_summaries[0].memory_record_id #=> String
1969
+ # resp.memory_record_summaries[0].content.text #=> String
1970
+ # resp.memory_record_summaries[0].memory_strategy_id #=> String
1971
+ # resp.memory_record_summaries[0].namespaces #=> Array
1972
+ # resp.memory_record_summaries[0].namespaces[0] #=> String
1973
+ # resp.memory_record_summaries[0].created_at #=> Time
1974
+ # resp.memory_record_summaries[0].score #=> Float
1975
+ # resp.next_token #=> String
1976
+ #
1977
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/RetrieveMemoryRecords AWS API Documentation
1978
+ #
1979
+ # @overload retrieve_memory_records(params = {})
1980
+ # @param [Hash] params ({})
1981
+ def retrieve_memory_records(params = {}, options = {})
1982
+ req = build_request(:retrieve_memory_records, params)
1983
+ req.send_request(options)
1984
+ end
1985
+
1986
+ # Creates and initializes a browser session in Amazon Bedrock. The
1987
+ # session enables agents to navigate and interact with web content,
1988
+ # extract information from websites, and perform web-based tasks as part
1989
+ # of their response generation.
1990
+ #
1991
+ # To create a session, you must specify a browser identifier and a name.
1992
+ # You can also configure the viewport dimensions to control the visible
1993
+ # area of web content. The session remains active until it times out or
1994
+ # you explicitly stop it using the `StopBrowserSession` operation.
1995
+ #
1996
+ # The following operations are related to `StartBrowserSession`:
1997
+ #
1998
+ # * [GetBrowserSession][1]
1999
+ #
2000
+ # * [UpdateBrowserStream][2]
2001
+ #
2002
+ # * [StopBrowserSession][3]
2003
+ #
2004
+ #
2005
+ #
2006
+ # [1]: https://docs.aws.amazon.com/API_GetBrowserSession.html
2007
+ # [2]: https://docs.aws.amazon.com/API_UpdateBrowserStream.html
2008
+ # [3]: https://docs.aws.amazon.com/API_StopBrowserSession.html
2009
+ #
2010
+ # @option params [required, String] :browser_identifier
2011
+ # The unique identifier of the browser to use for this session. This
2012
+ # identifier specifies which browser environment to initialize for the
2013
+ # session.
2014
+ #
2015
+ # @option params [String] :name
2016
+ # The name of the browser session. This name helps you identify and
2017
+ # manage the session. The name does not need to be unique.
2018
+ #
2019
+ # @option params [Integer] :session_timeout_seconds
2020
+ # The time in seconds after which the session automatically terminates
2021
+ # if there is no activity. The default value is 3600 seconds (1 hour).
2022
+ # The minimum allowed value is 60 seconds, and the maximum allowed value
2023
+ # is 28800 seconds (8 hours).
2024
+ #
2025
+ # @option params [Types::ViewPort] :view_port
2026
+ # The dimensions of the browser viewport for this session. This
2027
+ # determines the visible area of the web content and affects how web
2028
+ # pages are rendered. If not specified, Amazon Bedrock uses a default
2029
+ # viewport size.
2030
+ #
2031
+ # @option params [String] :client_token
2032
+ # A unique, case-sensitive identifier to ensure that the API request
2033
+ # completes no more than one time. If this token matches a previous
2034
+ # request, Amazon Bedrock ignores the request, but does not return an
2035
+ # error. This parameter helps prevent the creation of duplicate sessions
2036
+ # if there are temporary network issues.
2037
+ #
2038
+ # **A suitable default value is auto-generated.** You should normally
2039
+ # not need to pass this option.**
2040
+ #
2041
+ # @return [Types::StartBrowserSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2042
+ #
2043
+ # * {Types::StartBrowserSessionResponse#browser_identifier #browser_identifier} => String
2044
+ # * {Types::StartBrowserSessionResponse#session_id #session_id} => String
2045
+ # * {Types::StartBrowserSessionResponse#created_at #created_at} => Time
2046
+ # * {Types::StartBrowserSessionResponse#streams #streams} => Types::BrowserSessionStream
2047
+ #
2048
+ # @example Request syntax with placeholder values
2049
+ #
2050
+ # resp = client.start_browser_session({
2051
+ # browser_identifier: "String", # required
2052
+ # name: "Name",
2053
+ # session_timeout_seconds: 1,
2054
+ # view_port: {
2055
+ # width: 1, # required
2056
+ # height: 1, # required
2057
+ # },
2058
+ # client_token: "ClientToken",
2059
+ # })
2060
+ #
2061
+ # @example Response structure
2062
+ #
2063
+ # resp.browser_identifier #=> String
2064
+ # resp.session_id #=> String
2065
+ # resp.created_at #=> Time
2066
+ # resp.streams.automation_stream.stream_endpoint #=> String
2067
+ # resp.streams.automation_stream.stream_status #=> String, one of "ENABLED", "DISABLED"
2068
+ # resp.streams.live_view_stream.stream_endpoint #=> String
2069
+ #
2070
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/StartBrowserSession AWS API Documentation
2071
+ #
2072
+ # @overload start_browser_session(params = {})
2073
+ # @param [Hash] params ({})
2074
+ def start_browser_session(params = {}, options = {})
2075
+ req = build_request(:start_browser_session, params)
2076
+ req.send_request(options)
2077
+ end
2078
+
2079
+ # Creates and initializes a code interpreter session in Amazon Bedrock.
2080
+ # The session enables agents to execute code as part of their response
2081
+ # generation, supporting programming languages such as Python for data
2082
+ # analysis, visualization, and computation tasks.
2083
+ #
2084
+ # To create a session, you must specify a code interpreter identifier
2085
+ # and a name. The session remains active until it times out or you
2086
+ # explicitly stop it using the `StopCodeInterpreterSession` operation.
2087
+ #
2088
+ # The following operations are related to `StartCodeInterpreterSession`:
2089
+ #
2090
+ # * [InvokeCodeInterpreter][1]
2091
+ #
2092
+ # * [GetCodeInterpreterSession][2]
2093
+ #
2094
+ # * [StopCodeInterpreterSession][3]
2095
+ #
2096
+ #
2097
+ #
2098
+ # [1]: https://docs.aws.amazon.com/API_InvokeCodeInterpreter.html
2099
+ # [2]: https://docs.aws.amazon.com/API_GetCodeInterpreterSession.html
2100
+ # [3]: https://docs.aws.amazon.com/API_StopCodeInterpreterSession.html
2101
+ #
2102
+ # @option params [required, String] :code_interpreter_identifier
2103
+ # The unique identifier of the code interpreter to use for this session.
2104
+ # This identifier specifies which code interpreter environment to
2105
+ # initialize for the session.
2106
+ #
2107
+ # @option params [String] :name
2108
+ # The name of the code interpreter session. This name helps you identify
2109
+ # and manage the session. The name does not need to be unique.
2110
+ #
2111
+ # @option params [Integer] :session_timeout_seconds
2112
+ # The time in seconds after which the session automatically terminates
2113
+ # if there is no activity. The default value is 3600 seconds (1 hour).
2114
+ # The minimum allowed value is 60 seconds, and the maximum allowed value
2115
+ # is 28800 seconds (8 hours).
2116
+ #
2117
+ # @option params [String] :client_token
2118
+ # A unique, case-sensitive identifier to ensure that the API request
2119
+ # completes no more than one time. If this token matches a previous
2120
+ # request, Amazon Bedrock ignores the request, but does not return an
2121
+ # error. This parameter helps prevent the creation of duplicate sessions
2122
+ # if there are temporary network issues.
2123
+ #
2124
+ # **A suitable default value is auto-generated.** You should normally
2125
+ # not need to pass this option.**
2126
+ #
2127
+ # @return [Types::StartCodeInterpreterSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2128
+ #
2129
+ # * {Types::StartCodeInterpreterSessionResponse#code_interpreter_identifier #code_interpreter_identifier} => String
2130
+ # * {Types::StartCodeInterpreterSessionResponse#session_id #session_id} => String
2131
+ # * {Types::StartCodeInterpreterSessionResponse#created_at #created_at} => Time
2132
+ #
2133
+ # @example Request syntax with placeholder values
2134
+ #
2135
+ # resp = client.start_code_interpreter_session({
2136
+ # code_interpreter_identifier: "String", # required
2137
+ # name: "Name",
2138
+ # session_timeout_seconds: 1,
2139
+ # client_token: "ClientToken",
2140
+ # })
2141
+ #
2142
+ # @example Response structure
2143
+ #
2144
+ # resp.code_interpreter_identifier #=> String
2145
+ # resp.session_id #=> String
2146
+ # resp.created_at #=> Time
2147
+ #
2148
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/StartCodeInterpreterSession AWS API Documentation
2149
+ #
2150
+ # @overload start_code_interpreter_session(params = {})
2151
+ # @param [Hash] params ({})
2152
+ def start_code_interpreter_session(params = {}, options = {})
2153
+ req = build_request(:start_code_interpreter_session, params)
2154
+ req.send_request(options)
2155
+ end
2156
+
2157
+ # Terminates an active browser session in Amazon Bedrock. This operation
2158
+ # stops the session, releases associated resources, and makes the
2159
+ # session unavailable for further use.
2160
+ #
2161
+ # To stop a browser session, you must specify both the browser
2162
+ # identifier and the session ID. Once stopped, a session cannot be
2163
+ # restarted; you must create a new session using `StartBrowserSession`.
2164
+ #
2165
+ # The following operations are related to `StopBrowserSession`:
2166
+ #
2167
+ # * [StartBrowserSession][1]
2168
+ #
2169
+ # * [GetBrowserSession][2]
2170
+ #
2171
+ #
2172
+ #
2173
+ # [1]: https://docs.aws.amazon.com/API_StartBrowserSession.html
2174
+ # [2]: https://docs.aws.amazon.com/API_GetBrowserSession.html
2175
+ #
2176
+ # @option params [required, String] :browser_identifier
2177
+ # The unique identifier of the browser associated with the session.
2178
+ #
2179
+ # @option params [required, String] :session_id
2180
+ # The unique identifier of the browser session to stop.
2181
+ #
2182
+ # @option params [String] :client_token
2183
+ # A unique, case-sensitive identifier to ensure that the API request
2184
+ # completes no more than one time. If this token matches a previous
2185
+ # request, Amazon Bedrock ignores the request, but does not return an
2186
+ # error.
2187
+ #
2188
+ # **A suitable default value is auto-generated.** You should normally
2189
+ # not need to pass this option.**
2190
+ #
2191
+ # @return [Types::StopBrowserSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2192
+ #
2193
+ # * {Types::StopBrowserSessionResponse#browser_identifier #browser_identifier} => String
2194
+ # * {Types::StopBrowserSessionResponse#session_id #session_id} => String
2195
+ # * {Types::StopBrowserSessionResponse#last_updated_at #last_updated_at} => Time
2196
+ #
2197
+ # @example Request syntax with placeholder values
2198
+ #
2199
+ # resp = client.stop_browser_session({
2200
+ # browser_identifier: "String", # required
2201
+ # session_id: "BrowserSessionId", # required
2202
+ # client_token: "ClientToken",
2203
+ # })
2204
+ #
2205
+ # @example Response structure
2206
+ #
2207
+ # resp.browser_identifier #=> String
2208
+ # resp.session_id #=> String
2209
+ # resp.last_updated_at #=> Time
2210
+ #
2211
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/StopBrowserSession AWS API Documentation
2212
+ #
2213
+ # @overload stop_browser_session(params = {})
2214
+ # @param [Hash] params ({})
2215
+ def stop_browser_session(params = {}, options = {})
2216
+ req = build_request(:stop_browser_session, params)
2217
+ req.send_request(options)
2218
+ end
2219
+
2220
+ # Terminates an active code interpreter session in Amazon Bedrock. This
2221
+ # operation stops the session, releases associated resources, and makes
2222
+ # the session unavailable for further use.
2223
+ #
2224
+ # To stop a code interpreter session, you must specify both the code
2225
+ # interpreter identifier and the session ID. Once stopped, a session
2226
+ # cannot be restarted; you must create a new session using
2227
+ # `StartCodeInterpreterSession`.
2228
+ #
2229
+ # The following operations are related to `StopCodeInterpreterSession`:
2230
+ #
2231
+ # * [StartCodeInterpreterSession][1]
2232
+ #
2233
+ # * [GetCodeInterpreterSession][2]
2234
+ #
2235
+ #
2236
+ #
2237
+ # [1]: https://docs.aws.amazon.com/API_StartCodeInterpreterSession.html
2238
+ # [2]: https://docs.aws.amazon.com/API_GetCodeInterpreterSession.html
2239
+ #
2240
+ # @option params [required, String] :code_interpreter_identifier
2241
+ # The unique identifier of the code interpreter associated with the
2242
+ # session.
2243
+ #
2244
+ # @option params [required, String] :session_id
2245
+ # The unique identifier of the code interpreter session to stop.
2246
+ #
2247
+ # @option params [String] :client_token
2248
+ # A unique, case-sensitive identifier to ensure that the API request
2249
+ # completes no more than one time. If this token matches a previous
2250
+ # request, Amazon Bedrock ignores the request, but does not return an
2251
+ # error.
2252
+ #
2253
+ # **A suitable default value is auto-generated.** You should normally
2254
+ # not need to pass this option.**
2255
+ #
2256
+ # @return [Types::StopCodeInterpreterSessionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2257
+ #
2258
+ # * {Types::StopCodeInterpreterSessionResponse#code_interpreter_identifier #code_interpreter_identifier} => String
2259
+ # * {Types::StopCodeInterpreterSessionResponse#session_id #session_id} => String
2260
+ # * {Types::StopCodeInterpreterSessionResponse#last_updated_at #last_updated_at} => Time
2261
+ #
2262
+ # @example Request syntax with placeholder values
2263
+ #
2264
+ # resp = client.stop_code_interpreter_session({
2265
+ # code_interpreter_identifier: "String", # required
2266
+ # session_id: "CodeInterpreterSessionId", # required
2267
+ # client_token: "ClientToken",
2268
+ # })
2269
+ #
2270
+ # @example Response structure
2271
+ #
2272
+ # resp.code_interpreter_identifier #=> String
2273
+ # resp.session_id #=> String
2274
+ # resp.last_updated_at #=> Time
2275
+ #
2276
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/StopCodeInterpreterSession AWS API Documentation
2277
+ #
2278
+ # @overload stop_code_interpreter_session(params = {})
2279
+ # @param [Hash] params ({})
2280
+ def stop_code_interpreter_session(params = {}, options = {})
2281
+ req = build_request(:stop_code_interpreter_session, params)
2282
+ req.send_request(options)
2283
+ end
2284
+
2285
+ # Updates a browser stream. To use this operation, you must have
2286
+ # permissions to perform the bedrock:UpdateBrowserStream action.
2287
+ #
2288
+ # @option params [required, String] :browser_identifier
2289
+ # The identifier of the browser.
2290
+ #
2291
+ # @option params [required, String] :session_id
2292
+ # The identifier of the browser session.
2293
+ #
2294
+ # @option params [required, Types::StreamUpdate] :stream_update
2295
+ # The update to apply to the browser stream.
2296
+ #
2297
+ # @option params [String] :client_token
2298
+ # A unique, case-sensitive identifier to ensure that the operation
2299
+ # completes no more than one time. If this token matches a previous
2300
+ # request, Amazon Bedrock ignores the request, but does not return an
2301
+ # error.
2302
+ #
2303
+ # **A suitable default value is auto-generated.** You should normally
2304
+ # not need to pass this option.**
2305
+ #
2306
+ # @return [Types::UpdateBrowserStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2307
+ #
2308
+ # * {Types::UpdateBrowserStreamResponse#browser_identifier #browser_identifier} => String
2309
+ # * {Types::UpdateBrowserStreamResponse#session_id #session_id} => String
2310
+ # * {Types::UpdateBrowserStreamResponse#streams #streams} => Types::BrowserSessionStream
2311
+ # * {Types::UpdateBrowserStreamResponse#updated_at #updated_at} => Time
2312
+ #
2313
+ # @example Request syntax with placeholder values
2314
+ #
2315
+ # resp = client.update_browser_stream({
2316
+ # browser_identifier: "String", # required
2317
+ # session_id: "BrowserSessionId", # required
2318
+ # stream_update: { # required
2319
+ # automation_stream_update: {
2320
+ # stream_status: "ENABLED", # accepts ENABLED, DISABLED
2321
+ # },
2322
+ # },
2323
+ # client_token: "ClientToken",
2324
+ # })
2325
+ #
2326
+ # @example Response structure
2327
+ #
2328
+ # resp.browser_identifier #=> String
2329
+ # resp.session_id #=> String
2330
+ # resp.streams.automation_stream.stream_endpoint #=> String
2331
+ # resp.streams.automation_stream.stream_status #=> String, one of "ENABLED", "DISABLED"
2332
+ # resp.streams.live_view_stream.stream_endpoint #=> String
2333
+ # resp.updated_at #=> Time
2334
+ #
2335
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/UpdateBrowserStream AWS API Documentation
2336
+ #
2337
+ # @overload update_browser_stream(params = {})
2338
+ # @param [Hash] params ({})
2339
+ def update_browser_stream(params = {}, options = {})
2340
+ req = build_request(:update_browser_stream, params)
2341
+ req.send_request(options)
2342
+ end
2343
+
2344
+ # @!endgroup
2345
+
2346
+ # @param params ({})
2347
+ # @api private
2348
+ def build_request(operation_name, params = {})
2349
+ handlers = @handlers.for(operation_name)
2350
+ tracer = config.telemetry_provider.tracer_provider.tracer(
2351
+ Aws::Telemetry.module_to_tracer_name('Aws::BedrockAgentCore')
2352
+ )
2353
+ context = Seahorse::Client::RequestContext.new(
2354
+ operation_name: operation_name,
2355
+ operation: config.api.operation(operation_name),
2356
+ client: self,
2357
+ params: params,
2358
+ config: config,
2359
+ tracer: tracer
2360
+ )
2361
+ context[:gem_name] = 'aws-sdk-bedrockagentcore'
2362
+ context[:gem_version] = '1.0.0'
2363
+ Seahorse::Client::Request.new(handlers, context)
2364
+ end
2365
+
2366
+ # @api private
2367
+ # @deprecated
2368
+ def waiter_names
2369
+ []
2370
+ end
2371
+
2372
+ class << self
2373
+
2374
+ # @api private
2375
+ attr_reader :identifier
2376
+
2377
+ # @api private
2378
+ def errors_module
2379
+ Errors
2380
+ end
2381
+
2382
+ end
2383
+ end
2384
+ end