aws-sdk-bedrock 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1189 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'seahorse/client/plugins/content_length.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
+ require 'aws-sdk-core/plugins/request_compression.rb'
32
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
33
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
34
+ require 'aws-sdk-core/plugins/sign.rb'
35
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
36
+
37
+ Aws::Plugins::GlobalConfiguration.add_identifier(:bedrock)
38
+
39
+ module Aws::Bedrock
40
+ # An API client for Bedrock. To construct a client, you need to configure a `:region` and `:credentials`.
41
+ #
42
+ # client = Aws::Bedrock::Client.new(
43
+ # region: region_name,
44
+ # credentials: credentials,
45
+ # # ...
46
+ # )
47
+ #
48
+ # For details on configuring region and credentials see
49
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
50
+ #
51
+ # See {#initialize} for a full list of supported configuration options.
52
+ class Client < Seahorse::Client::Base
53
+
54
+ include Aws::ClientStubs
55
+
56
+ @identifier = :bedrock
57
+
58
+ set_api(ClientApi::API)
59
+
60
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
61
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
62
+ add_plugin(Aws::Plugins::Logging)
63
+ add_plugin(Aws::Plugins::ParamConverter)
64
+ add_plugin(Aws::Plugins::ParamValidator)
65
+ add_plugin(Aws::Plugins::UserAgent)
66
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
67
+ add_plugin(Aws::Plugins::RetryErrors)
68
+ add_plugin(Aws::Plugins::GlobalConfiguration)
69
+ add_plugin(Aws::Plugins::RegionalEndpoint)
70
+ add_plugin(Aws::Plugins::EndpointDiscovery)
71
+ add_plugin(Aws::Plugins::EndpointPattern)
72
+ add_plugin(Aws::Plugins::ResponsePaging)
73
+ add_plugin(Aws::Plugins::StubResponses)
74
+ add_plugin(Aws::Plugins::IdempotencyToken)
75
+ add_plugin(Aws::Plugins::JsonvalueConverter)
76
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
77
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
78
+ add_plugin(Aws::Plugins::TransferEncoding)
79
+ add_plugin(Aws::Plugins::HttpChecksum)
80
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
81
+ add_plugin(Aws::Plugins::RequestCompression)
82
+ add_plugin(Aws::Plugins::DefaultsMode)
83
+ add_plugin(Aws::Plugins::RecursionDetection)
84
+ add_plugin(Aws::Plugins::Sign)
85
+ add_plugin(Aws::Plugins::Protocols::RestJson)
86
+ add_plugin(Aws::Bedrock::Plugins::Endpoints)
87
+
88
+ # @overload initialize(options)
89
+ # @param [Hash] options
90
+ # @option options [required, Aws::CredentialProvider] :credentials
91
+ # Your AWS credentials. This can be an instance of any one of the
92
+ # following classes:
93
+ #
94
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
95
+ # credentials.
96
+ #
97
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
98
+ # shared file, such as `~/.aws/config`.
99
+ #
100
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
101
+ #
102
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
103
+ # assume a role after providing credentials via the web.
104
+ #
105
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
106
+ # access token generated from `aws login`.
107
+ #
108
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
109
+ # process that outputs to stdout.
110
+ #
111
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
112
+ # from an EC2 IMDS on an EC2 instance.
113
+ #
114
+ # * `Aws::ECSCredentials` - Used for loading credentials from
115
+ # instances running in ECS.
116
+ #
117
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
118
+ # from the Cognito Identity service.
119
+ #
120
+ # When `:credentials` are not configured directly, the following
121
+ # locations will be searched for credentials:
122
+ #
123
+ # * `Aws.config[:credentials]`
124
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
125
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
126
+ # * `~/.aws/credentials`
127
+ # * `~/.aws/config`
128
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
129
+ # are very aggressive. Construct and pass an instance of
130
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
131
+ # enable retries and extended timeouts. Instance profile credential
132
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
133
+ # to true.
134
+ #
135
+ # @option options [required, String] :region
136
+ # The AWS region to connect to. The configured `:region` is
137
+ # used to determine the service `:endpoint`. When not passed,
138
+ # a default `:region` is searched for in the following locations:
139
+ #
140
+ # * `Aws.config[:region]`
141
+ # * `ENV['AWS_REGION']`
142
+ # * `ENV['AMAZON_REGION']`
143
+ # * `ENV['AWS_DEFAULT_REGION']`
144
+ # * `~/.aws/credentials`
145
+ # * `~/.aws/config`
146
+ #
147
+ # @option options [String] :access_key_id
148
+ #
149
+ # @option options [Boolean] :active_endpoint_cache (false)
150
+ # When set to `true`, a thread polling for endpoints will be running in
151
+ # the background every 60 secs (default). Defaults to `false`.
152
+ #
153
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
154
+ # Used only in `adaptive` retry mode. When true, the request will sleep
155
+ # until there is sufficent client side capacity to retry the request.
156
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
157
+ # not retry instead of sleeping.
158
+ #
159
+ # @option options [Boolean] :client_side_monitoring (false)
160
+ # When `true`, client-side metrics will be collected for all API requests from
161
+ # this client.
162
+ #
163
+ # @option options [String] :client_side_monitoring_client_id ("")
164
+ # Allows you to provide an identifier for this client which will be attached to
165
+ # all generated client side metrics. Defaults to an empty string.
166
+ #
167
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
168
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
169
+ # side monitoring agent is running on, where client metrics will be published via UDP.
170
+ #
171
+ # @option options [Integer] :client_side_monitoring_port (31000)
172
+ # Required for publishing client metrics. The port that the client side monitoring
173
+ # agent is running on, where client metrics will be published via UDP.
174
+ #
175
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
176
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
177
+ # will use the Client Side Monitoring Agent Publisher.
178
+ #
179
+ # @option options [Boolean] :convert_params (true)
180
+ # When `true`, an attempt is made to coerce request parameters into
181
+ # the required types.
182
+ #
183
+ # @option options [Boolean] :correct_clock_skew (true)
184
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
185
+ # a clock skew correction and retry requests with skewed client clocks.
186
+ #
187
+ # @option options [String] :defaults_mode ("legacy")
188
+ # See {Aws::DefaultsModeConfiguration} for a list of the
189
+ # accepted modes and the configuration defaults that are included.
190
+ #
191
+ # @option options [Boolean] :disable_host_prefix_injection (false)
192
+ # Set to true to disable SDK automatically adding host prefix
193
+ # to default service endpoint when available.
194
+ #
195
+ # @option options [Boolean] :disable_request_compression (false)
196
+ # When set to 'true' the request body will not be compressed
197
+ # for supported operations.
198
+ #
199
+ # @option options [String] :endpoint
200
+ # The client endpoint is normally constructed from the `:region`
201
+ # option. You should only configure an `:endpoint` when connecting
202
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
203
+ #
204
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
205
+ # Used for the maximum size limit of the LRU cache storing endpoints data
206
+ # for endpoint discovery enabled operations. Defaults to 1000.
207
+ #
208
+ # @option options [Integer] :endpoint_cache_max_threads (10)
209
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
210
+ #
211
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
212
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
213
+ # Use this option to config the time interval in seconds for making
214
+ # requests fetching endpoints information. Defaults to 60 sec.
215
+ #
216
+ # @option options [Boolean] :endpoint_discovery (false)
217
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
218
+ #
219
+ # @option options [Boolean] :ignore_configured_endpoint_urls
220
+ # Setting to true disables use of endpoint URLs provided via environment
221
+ # variables and the shared configuration file.
222
+ #
223
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
224
+ # The log formatter.
225
+ #
226
+ # @option options [Symbol] :log_level (:info)
227
+ # The log level to send messages to the `:logger` at.
228
+ #
229
+ # @option options [Logger] :logger
230
+ # The Logger instance to send log messages to. If this option
231
+ # is not set, logging will be disabled.
232
+ #
233
+ # @option options [Integer] :max_attempts (3)
234
+ # An integer representing the maximum number attempts that will be made for
235
+ # a single request, including the initial attempt. For example,
236
+ # setting this value to 5 will result in a request being retried up to
237
+ # 4 times. Used in `standard` and `adaptive` retry modes.
238
+ #
239
+ # @option options [String] :profile ("default")
240
+ # Used when loading credentials from the shared credentials file
241
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
242
+ #
243
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
244
+ # The minimum size in bytes that triggers compression for request
245
+ # bodies. The value must be non-negative integer value between 0
246
+ # and 10485780 bytes inclusive.
247
+ #
248
+ # @option options [Proc] :retry_backoff
249
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
250
+ # This option is only used in the `legacy` retry mode.
251
+ #
252
+ # @option options [Float] :retry_base_delay (0.3)
253
+ # The base delay in seconds used by the default backoff function. This option
254
+ # is only used in the `legacy` retry mode.
255
+ #
256
+ # @option options [Symbol] :retry_jitter (:none)
257
+ # A delay randomiser function used by the default backoff function.
258
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
259
+ # otherwise a Proc that takes and returns a number. This option is only used
260
+ # in the `legacy` retry mode.
261
+ #
262
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
263
+ #
264
+ # @option options [Integer] :retry_limit (3)
265
+ # The maximum number of times to retry failed requests. Only
266
+ # ~ 500 level server errors and certain ~ 400 level client errors
267
+ # are retried. Generally, these are throttling errors, data
268
+ # checksum errors, networking errors, timeout errors, auth errors,
269
+ # endpoint discovery, and errors from expired credentials.
270
+ # This option is only used in the `legacy` retry mode.
271
+ #
272
+ # @option options [Integer] :retry_max_delay (0)
273
+ # The maximum number of seconds to delay between retries (0 for no limit)
274
+ # used by the default backoff function. This option is only used in the
275
+ # `legacy` retry mode.
276
+ #
277
+ # @option options [String] :retry_mode ("legacy")
278
+ # Specifies which retry algorithm to use. Values are:
279
+ #
280
+ # * `legacy` - The pre-existing retry behavior. This is default value if
281
+ # no retry mode is provided.
282
+ #
283
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
284
+ # This includes support for retry quotas, which limit the number of
285
+ # unsuccessful retries a client can make.
286
+ #
287
+ # * `adaptive` - An experimental retry mode that includes all the
288
+ # functionality of `standard` mode along with automatic client side
289
+ # throttling. This is a provisional mode that may change behavior
290
+ # in the future.
291
+ #
292
+ #
293
+ # @option options [String] :sdk_ua_app_id
294
+ # A unique and opaque application ID that is appended to the
295
+ # User-Agent header as app/<sdk_ua_app_id>. It should have a
296
+ # maximum length of 50.
297
+ #
298
+ # @option options [String] :secret_access_key
299
+ #
300
+ # @option options [String] :session_token
301
+ #
302
+ # @option options [Boolean] :stub_responses (false)
303
+ # Causes the client to return stubbed responses. By default
304
+ # fake responses are generated and returned. You can specify
305
+ # the response data to return or errors to raise by calling
306
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
307
+ #
308
+ # ** Please note ** When response stubbing is enabled, no HTTP
309
+ # requests are made, and retries are disabled.
310
+ #
311
+ # @option options [Aws::TokenProvider] :token_provider
312
+ # A Bearer Token Provider. This can be an instance of any one of the
313
+ # following classes:
314
+ #
315
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
316
+ # tokens.
317
+ #
318
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
319
+ # access token generated from `aws login`.
320
+ #
321
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
322
+ # will be used to search for tokens configured for your profile in shared configuration files.
323
+ #
324
+ # @option options [Boolean] :use_dualstack_endpoint
325
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
326
+ # will be used if available.
327
+ #
328
+ # @option options [Boolean] :use_fips_endpoint
329
+ # When set to `true`, fips compatible endpoints will be used if available.
330
+ # When a `fips` region is used, the region is normalized and this config
331
+ # is set to `true`.
332
+ #
333
+ # @option options [Boolean] :validate_params (true)
334
+ # When `true`, request parameters are validated before
335
+ # sending the request.
336
+ #
337
+ # @option options [Aws::Bedrock::EndpointProvider] :endpoint_provider
338
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::Bedrock::EndpointParameters`
339
+ #
340
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
341
+ # requests through. Formatted like 'http://proxy.com:123'.
342
+ #
343
+ # @option options [Float] :http_open_timeout (15) The number of
344
+ # seconds to wait when opening a HTTP session before raising a
345
+ # `Timeout::Error`.
346
+ #
347
+ # @option options [Float] :http_read_timeout (60) The default
348
+ # number of seconds to wait for response data. This value can
349
+ # safely be set per-request on the session.
350
+ #
351
+ # @option options [Float] :http_idle_timeout (5) The number of
352
+ # seconds a connection is allowed to sit idle before it is
353
+ # considered stale. Stale connections are closed and removed
354
+ # from the pool before making a request.
355
+ #
356
+ # @option options [Float] :http_continue_timeout (1) The number of
357
+ # seconds to wait for a 100-continue response before sending the
358
+ # request body. This option has no effect unless the request has
359
+ # "Expect" header set to "100-continue". Defaults to `nil` which
360
+ # disables this behaviour. This value can safely be set per
361
+ # request on the session.
362
+ #
363
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
364
+ # in seconds.
365
+ #
366
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
367
+ # HTTP debug output will be sent to the `:logger`.
368
+ #
369
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
370
+ # SSL peer certificates are verified when establishing a
371
+ # connection.
372
+ #
373
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
374
+ # certificate authority bundle file that should be used when
375
+ # verifying peer certificates. If you do not pass
376
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
377
+ # will be used if available.
378
+ #
379
+ # @option options [String] :ssl_ca_directory Full path of the
380
+ # directory that contains the unbundled SSL certificate
381
+ # authority files for verifying peer certificates. If you do
382
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
383
+ # system default will be used if available.
384
+ #
385
+ def initialize(*args)
386
+ super
387
+ end
388
+
389
+ # @!group API Operations
390
+
391
+ # Creates a fine-tuning job to customize a base model.
392
+ #
393
+ # You specify the base foundation model and the location of the training
394
+ # data. After the model-customization job completes successfully, your
395
+ # custom model resource will be ready to use. Training data contains
396
+ # input and output text for each record in a JSONL format. Optionally,
397
+ # you can specify validation data in the same format as the training
398
+ # data. Bedrock returns validation loss metrics and output generations
399
+ # after the job completes.
400
+ #
401
+ # Model-customization jobs are asynchronous and the completion time
402
+ # depends on the base model and the training/validation data size. To
403
+ # monitor a job, use the `GetModelCustomizationJob` operation to
404
+ # retrieve the job status.
405
+ #
406
+ # For more information, see [Custom models][1] in the Bedrock User
407
+ # Guide.
408
+ #
409
+ #
410
+ #
411
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
412
+ #
413
+ # @option params [required, String] :base_model_identifier
414
+ # Name of the base model.
415
+ #
416
+ # @option params [String] :client_request_token
417
+ # Unique token value that you can provide. The GetModelCustomizationJob
418
+ # response includes the same token value.
419
+ #
420
+ # **A suitable default value is auto-generated.** You should normally
421
+ # not need to pass this option.**
422
+ #
423
+ # @option params [String] :custom_model_kms_key_id
424
+ # The custom model is encrypted at rest using this key.
425
+ #
426
+ # @option params [required, String] :custom_model_name
427
+ # Enter a name for the custom model.
428
+ #
429
+ # @option params [Array<Types::Tag>] :custom_model_tags
430
+ # Assign tags to the custom model.
431
+ #
432
+ # @option params [required, Hash<String,String>] :hyper_parameters
433
+ # Parameters related to tuning the model.
434
+ #
435
+ # @option params [required, String] :job_name
436
+ # Enter a unique name for the fine-tuning job.
437
+ #
438
+ # @option params [Array<Types::Tag>] :job_tags
439
+ # Assign tags to the job.
440
+ #
441
+ # @option params [required, Types::OutputDataConfig] :output_data_config
442
+ # S3 location for the output data.
443
+ #
444
+ # @option params [required, String] :role_arn
445
+ # The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume
446
+ # to perform tasks on your behalf. For example, during model training,
447
+ # Bedrock needs your permission to read input data from an S3 bucket,
448
+ # write model artifacts to an S3 bucket. To pass this role to Bedrock,
449
+ # the caller of this API must have the `iam:PassRole` permission.
450
+ #
451
+ # @option params [required, Types::TrainingDataConfig] :training_data_config
452
+ # Information about the training dataset.
453
+ #
454
+ # @option params [Types::ValidationDataConfig] :validation_data_config
455
+ # Information about the validation dataset.
456
+ #
457
+ # @option params [Types::VpcConfig] :vpc_config
458
+ # VPC configuration (optional). Configuration parameters for the private
459
+ # Virtual Private Cloud (VPC) that contains the resources you are using
460
+ # for this job.
461
+ #
462
+ # @return [Types::CreateModelCustomizationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
463
+ #
464
+ # * {Types::CreateModelCustomizationJobResponse#job_arn #job_arn} => String
465
+ #
466
+ # @example Request syntax with placeholder values
467
+ #
468
+ # resp = client.create_model_customization_job({
469
+ # base_model_identifier: "BaseModelIdentifier", # required
470
+ # client_request_token: "IdempotencyToken",
471
+ # custom_model_kms_key_id: "KmsKeyId",
472
+ # custom_model_name: "CustomModelName", # required
473
+ # custom_model_tags: [
474
+ # {
475
+ # key: "TagKey", # required
476
+ # value: "TagValue", # required
477
+ # },
478
+ # ],
479
+ # hyper_parameters: { # required
480
+ # "String" => "String",
481
+ # },
482
+ # job_name: "JobName", # required
483
+ # job_tags: [
484
+ # {
485
+ # key: "TagKey", # required
486
+ # value: "TagValue", # required
487
+ # },
488
+ # ],
489
+ # output_data_config: { # required
490
+ # s3_uri: "S3Uri", # required
491
+ # },
492
+ # role_arn: "RoleArn", # required
493
+ # training_data_config: { # required
494
+ # s3_uri: "S3Uri", # required
495
+ # },
496
+ # validation_data_config: {
497
+ # validators: [ # required
498
+ # {
499
+ # s3_uri: "S3Uri", # required
500
+ # },
501
+ # ],
502
+ # },
503
+ # vpc_config: {
504
+ # security_group_ids: ["SecurityGroupId"], # required
505
+ # subnet_ids: ["SubnetId"], # required
506
+ # },
507
+ # })
508
+ #
509
+ # @example Response structure
510
+ #
511
+ # resp.job_arn #=> String
512
+ #
513
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateModelCustomizationJob AWS API Documentation
514
+ #
515
+ # @overload create_model_customization_job(params = {})
516
+ # @param [Hash] params ({})
517
+ def create_model_customization_job(params = {}, options = {})
518
+ req = build_request(:create_model_customization_job, params)
519
+ req.send_request(options)
520
+ end
521
+
522
+ # Deletes a custom model that you created earlier. For more information,
523
+ # see [Custom models][1] in the Bedrock User Guide.
524
+ #
525
+ #
526
+ #
527
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
528
+ #
529
+ # @option params [required, String] :model_identifier
530
+ # Name of the model to delete.
531
+ #
532
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
533
+ #
534
+ # @example Request syntax with placeholder values
535
+ #
536
+ # resp = client.delete_custom_model({
537
+ # model_identifier: "ModelIdentifier", # required
538
+ # })
539
+ #
540
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/DeleteCustomModel AWS API Documentation
541
+ #
542
+ # @overload delete_custom_model(params = {})
543
+ # @param [Hash] params ({})
544
+ def delete_custom_model(params = {}, options = {})
545
+ req = build_request(:delete_custom_model, params)
546
+ req.send_request(options)
547
+ end
548
+
549
+ # Delete the invocation logging.
550
+ #
551
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
552
+ #
553
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/DeleteModelInvocationLoggingConfiguration AWS API Documentation
554
+ #
555
+ # @overload delete_model_invocation_logging_configuration(params = {})
556
+ # @param [Hash] params ({})
557
+ def delete_model_invocation_logging_configuration(params = {}, options = {})
558
+ req = build_request(:delete_model_invocation_logging_configuration, params)
559
+ req.send_request(options)
560
+ end
561
+
562
+ # Get the properties associated with a Bedrock custom model that you
563
+ # have created.For more information, see [Custom models][1] in the
564
+ # Bedrock User Guide.
565
+ #
566
+ #
567
+ #
568
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
569
+ #
570
+ # @option params [required, String] :model_identifier
571
+ # Name or ARN of the custom model.
572
+ #
573
+ # @return [Types::GetCustomModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
574
+ #
575
+ # * {Types::GetCustomModelResponse#base_model_arn #base_model_arn} => String
576
+ # * {Types::GetCustomModelResponse#creation_time #creation_time} => Time
577
+ # * {Types::GetCustomModelResponse#hyper_parameters #hyper_parameters} => Hash&lt;String,String&gt;
578
+ # * {Types::GetCustomModelResponse#job_arn #job_arn} => String
579
+ # * {Types::GetCustomModelResponse#job_name #job_name} => String
580
+ # * {Types::GetCustomModelResponse#model_arn #model_arn} => String
581
+ # * {Types::GetCustomModelResponse#model_kms_key_arn #model_kms_key_arn} => String
582
+ # * {Types::GetCustomModelResponse#model_name #model_name} => String
583
+ # * {Types::GetCustomModelResponse#output_data_config #output_data_config} => Types::OutputDataConfig
584
+ # * {Types::GetCustomModelResponse#training_data_config #training_data_config} => Types::TrainingDataConfig
585
+ # * {Types::GetCustomModelResponse#training_metrics #training_metrics} => Types::TrainingMetrics
586
+ # * {Types::GetCustomModelResponse#validation_data_config #validation_data_config} => Types::ValidationDataConfig
587
+ # * {Types::GetCustomModelResponse#validation_metrics #validation_metrics} => Array&lt;Types::ValidatorMetric&gt;
588
+ #
589
+ # @example Request syntax with placeholder values
590
+ #
591
+ # resp = client.get_custom_model({
592
+ # model_identifier: "ModelIdentifier", # required
593
+ # })
594
+ #
595
+ # @example Response structure
596
+ #
597
+ # resp.base_model_arn #=> String
598
+ # resp.creation_time #=> Time
599
+ # resp.hyper_parameters #=> Hash
600
+ # resp.hyper_parameters["String"] #=> String
601
+ # resp.job_arn #=> String
602
+ # resp.job_name #=> String
603
+ # resp.model_arn #=> String
604
+ # resp.model_kms_key_arn #=> String
605
+ # resp.model_name #=> String
606
+ # resp.output_data_config.s3_uri #=> String
607
+ # resp.training_data_config.s3_uri #=> String
608
+ # resp.training_metrics.training_loss #=> Float
609
+ # resp.validation_data_config.validators #=> Array
610
+ # resp.validation_data_config.validators[0].s3_uri #=> String
611
+ # resp.validation_metrics #=> Array
612
+ # resp.validation_metrics[0].validation_loss #=> Float
613
+ #
614
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetCustomModel AWS API Documentation
615
+ #
616
+ # @overload get_custom_model(params = {})
617
+ # @param [Hash] params ({})
618
+ def get_custom_model(params = {}, options = {})
619
+ req = build_request(:get_custom_model, params)
620
+ req.send_request(options)
621
+ end
622
+
623
+ # Get details about a Bedrock foundation model.
624
+ #
625
+ # @option params [required, String] :model_identifier
626
+ # The model identifier.
627
+ #
628
+ # @return [Types::GetFoundationModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
629
+ #
630
+ # * {Types::GetFoundationModelResponse#model_details #model_details} => Types::FoundationModelDetails
631
+ #
632
+ # @example Request syntax with placeholder values
633
+ #
634
+ # resp = client.get_foundation_model({
635
+ # model_identifier: "ModelIdentifier", # required
636
+ # })
637
+ #
638
+ # @example Response structure
639
+ #
640
+ # resp.model_details.customizations_supported #=> Array
641
+ # resp.model_details.customizations_supported[0] #=> String, one of "FINE_TUNING"
642
+ # resp.model_details.inference_types_supported #=> Array
643
+ # resp.model_details.inference_types_supported[0] #=> String, one of "ON_DEMAND", "PROVISIONED"
644
+ # resp.model_details.input_modalities #=> Array
645
+ # resp.model_details.input_modalities[0] #=> String, one of "TEXT", "IMAGE", "EMBEDDING"
646
+ # resp.model_details.model_arn #=> String
647
+ # resp.model_details.model_id #=> String
648
+ # resp.model_details.model_name #=> String
649
+ # resp.model_details.output_modalities #=> Array
650
+ # resp.model_details.output_modalities[0] #=> String, one of "TEXT", "IMAGE", "EMBEDDING"
651
+ # resp.model_details.provider_name #=> String
652
+ # resp.model_details.response_streaming_supported #=> Boolean
653
+ #
654
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetFoundationModel AWS API Documentation
655
+ #
656
+ # @overload get_foundation_model(params = {})
657
+ # @param [Hash] params ({})
658
+ def get_foundation_model(params = {}, options = {})
659
+ req = build_request(:get_foundation_model, params)
660
+ req.send_request(options)
661
+ end
662
+
663
+ # Retrieves the properties associated with a model-customization job,
664
+ # including the status of the job. For more information, see [Custom
665
+ # models][1] in the Bedrock User Guide.
666
+ #
667
+ #
668
+ #
669
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
670
+ #
671
+ # @option params [required, String] :job_identifier
672
+ # Identifier for the customization job.
673
+ #
674
+ # @return [Types::GetModelCustomizationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
675
+ #
676
+ # * {Types::GetModelCustomizationJobResponse#base_model_arn #base_model_arn} => String
677
+ # * {Types::GetModelCustomizationJobResponse#client_request_token #client_request_token} => String
678
+ # * {Types::GetModelCustomizationJobResponse#creation_time #creation_time} => Time
679
+ # * {Types::GetModelCustomizationJobResponse#end_time #end_time} => Time
680
+ # * {Types::GetModelCustomizationJobResponse#failure_message #failure_message} => String
681
+ # * {Types::GetModelCustomizationJobResponse#hyper_parameters #hyper_parameters} => Hash&lt;String,String&gt;
682
+ # * {Types::GetModelCustomizationJobResponse#job_arn #job_arn} => String
683
+ # * {Types::GetModelCustomizationJobResponse#job_name #job_name} => String
684
+ # * {Types::GetModelCustomizationJobResponse#last_modified_time #last_modified_time} => Time
685
+ # * {Types::GetModelCustomizationJobResponse#output_data_config #output_data_config} => Types::OutputDataConfig
686
+ # * {Types::GetModelCustomizationJobResponse#output_model_arn #output_model_arn} => String
687
+ # * {Types::GetModelCustomizationJobResponse#output_model_kms_key_arn #output_model_kms_key_arn} => String
688
+ # * {Types::GetModelCustomizationJobResponse#output_model_name #output_model_name} => String
689
+ # * {Types::GetModelCustomizationJobResponse#role_arn #role_arn} => String
690
+ # * {Types::GetModelCustomizationJobResponse#status #status} => String
691
+ # * {Types::GetModelCustomizationJobResponse#training_data_config #training_data_config} => Types::TrainingDataConfig
692
+ # * {Types::GetModelCustomizationJobResponse#training_metrics #training_metrics} => Types::TrainingMetrics
693
+ # * {Types::GetModelCustomizationJobResponse#validation_data_config #validation_data_config} => Types::ValidationDataConfig
694
+ # * {Types::GetModelCustomizationJobResponse#validation_metrics #validation_metrics} => Array&lt;Types::ValidatorMetric&gt;
695
+ # * {Types::GetModelCustomizationJobResponse#vpc_config #vpc_config} => Types::VpcConfig
696
+ #
697
+ # @example Request syntax with placeholder values
698
+ #
699
+ # resp = client.get_model_customization_job({
700
+ # job_identifier: "ModelCustomizationJobIdentifier", # required
701
+ # })
702
+ #
703
+ # @example Response structure
704
+ #
705
+ # resp.base_model_arn #=> String
706
+ # resp.client_request_token #=> String
707
+ # resp.creation_time #=> Time
708
+ # resp.end_time #=> Time
709
+ # resp.failure_message #=> String
710
+ # resp.hyper_parameters #=> Hash
711
+ # resp.hyper_parameters["String"] #=> String
712
+ # resp.job_arn #=> String
713
+ # resp.job_name #=> String
714
+ # resp.last_modified_time #=> Time
715
+ # resp.output_data_config.s3_uri #=> String
716
+ # resp.output_model_arn #=> String
717
+ # resp.output_model_kms_key_arn #=> String
718
+ # resp.output_model_name #=> String
719
+ # resp.role_arn #=> String
720
+ # resp.status #=> String, one of "InProgress", "Completed", "Failed", "Stopping", "Stopped"
721
+ # resp.training_data_config.s3_uri #=> String
722
+ # resp.training_metrics.training_loss #=> Float
723
+ # resp.validation_data_config.validators #=> Array
724
+ # resp.validation_data_config.validators[0].s3_uri #=> String
725
+ # resp.validation_metrics #=> Array
726
+ # resp.validation_metrics[0].validation_loss #=> Float
727
+ # resp.vpc_config.security_group_ids #=> Array
728
+ # resp.vpc_config.security_group_ids[0] #=> String
729
+ # resp.vpc_config.subnet_ids #=> Array
730
+ # resp.vpc_config.subnet_ids[0] #=> String
731
+ #
732
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetModelCustomizationJob AWS API Documentation
733
+ #
734
+ # @overload get_model_customization_job(params = {})
735
+ # @param [Hash] params ({})
736
+ def get_model_customization_job(params = {}, options = {})
737
+ req = build_request(:get_model_customization_job, params)
738
+ req.send_request(options)
739
+ end
740
+
741
+ # Get the current configuration values for model invocation logging.
742
+ #
743
+ # @return [Types::GetModelInvocationLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
744
+ #
745
+ # * {Types::GetModelInvocationLoggingConfigurationResponse#logging_config #logging_config} => Types::LoggingConfig
746
+ #
747
+ # @example Response structure
748
+ #
749
+ # resp.logging_config.cloud_watch_config.large_data_delivery_s3_config.bucket_name #=> String
750
+ # resp.logging_config.cloud_watch_config.large_data_delivery_s3_config.key_prefix #=> String
751
+ # resp.logging_config.cloud_watch_config.log_group_name #=> String
752
+ # resp.logging_config.cloud_watch_config.role_arn #=> String
753
+ # resp.logging_config.embedding_data_delivery_enabled #=> Boolean
754
+ # resp.logging_config.image_data_delivery_enabled #=> Boolean
755
+ # resp.logging_config.s3_config.bucket_name #=> String
756
+ # resp.logging_config.s3_config.key_prefix #=> String
757
+ # resp.logging_config.text_data_delivery_enabled #=> Boolean
758
+ #
759
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetModelInvocationLoggingConfiguration AWS API Documentation
760
+ #
761
+ # @overload get_model_invocation_logging_configuration(params = {})
762
+ # @param [Hash] params ({})
763
+ def get_model_invocation_logging_configuration(params = {}, options = {})
764
+ req = build_request(:get_model_invocation_logging_configuration, params)
765
+ req.send_request(options)
766
+ end
767
+
768
+ # Returns a list of the custom models that you have created with the
769
+ # `CreateModelCustomizationJob` operation.
770
+ #
771
+ # For more information, see [Custom models][1] in the Bedrock User
772
+ # Guide.
773
+ #
774
+ #
775
+ #
776
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
777
+ #
778
+ # @option params [String] :base_model_arn_equals
779
+ # Return custom models only if the base model ARN matches this
780
+ # parameter.
781
+ #
782
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_after
783
+ # Return custom models created after the specified time.
784
+ #
785
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_before
786
+ # Return custom models created before the specified time.
787
+ #
788
+ # @option params [String] :foundation_model_arn_equals
789
+ # Return custom models only if the foundation model ARN matches this
790
+ # parameter.
791
+ #
792
+ # @option params [Integer] :max_results
793
+ # Maximum number of results to return in the response.
794
+ #
795
+ # @option params [String] :name_contains
796
+ # Return custom models only if the job name contains these characters.
797
+ #
798
+ # @option params [String] :next_token
799
+ # Continuation token from the previous response, for Bedrock to list the
800
+ # next set of results.
801
+ #
802
+ # @option params [String] :sort_by
803
+ # The field to sort by in the returned list of models.
804
+ #
805
+ # @option params [String] :sort_order
806
+ # The sort order of the results.
807
+ #
808
+ # @return [Types::ListCustomModelsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
809
+ #
810
+ # * {Types::ListCustomModelsResponse#model_summaries #model_summaries} => Array&lt;Types::CustomModelSummary&gt;
811
+ # * {Types::ListCustomModelsResponse#next_token #next_token} => String
812
+ #
813
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
814
+ #
815
+ # @example Request syntax with placeholder values
816
+ #
817
+ # resp = client.list_custom_models({
818
+ # base_model_arn_equals: "ModelArn",
819
+ # creation_time_after: Time.now,
820
+ # creation_time_before: Time.now,
821
+ # foundation_model_arn_equals: "FoundationModelArn",
822
+ # max_results: 1,
823
+ # name_contains: "CustomModelName",
824
+ # next_token: "PaginationToken",
825
+ # sort_by: "CreationTime", # accepts CreationTime
826
+ # sort_order: "Ascending", # accepts Ascending, Descending
827
+ # })
828
+ #
829
+ # @example Response structure
830
+ #
831
+ # resp.model_summaries #=> Array
832
+ # resp.model_summaries[0].base_model_arn #=> String
833
+ # resp.model_summaries[0].base_model_name #=> String
834
+ # resp.model_summaries[0].creation_time #=> Time
835
+ # resp.model_summaries[0].model_arn #=> String
836
+ # resp.model_summaries[0].model_name #=> String
837
+ # resp.next_token #=> String
838
+ #
839
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListCustomModels AWS API Documentation
840
+ #
841
+ # @overload list_custom_models(params = {})
842
+ # @param [Hash] params ({})
843
+ def list_custom_models(params = {}, options = {})
844
+ req = build_request(:list_custom_models, params)
845
+ req.send_request(options)
846
+ end
847
+
848
+ # List of Bedrock foundation models that you can use. For more
849
+ # information, see [Foundation models][1] in the Bedrock User Guide.
850
+ #
851
+ #
852
+ #
853
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html
854
+ #
855
+ # @option params [String] :by_customization_type
856
+ # List by customization type.
857
+ #
858
+ # @option params [String] :by_inference_type
859
+ # List by inference type.
860
+ #
861
+ # @option params [String] :by_output_modality
862
+ # List by output modality type.
863
+ #
864
+ # @option params [String] :by_provider
865
+ # A Bedrock model provider.
866
+ #
867
+ # @return [Types::ListFoundationModelsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
868
+ #
869
+ # * {Types::ListFoundationModelsResponse#model_summaries #model_summaries} => Array&lt;Types::FoundationModelSummary&gt;
870
+ #
871
+ # @example Request syntax with placeholder values
872
+ #
873
+ # resp = client.list_foundation_models({
874
+ # by_customization_type: "FINE_TUNING", # accepts FINE_TUNING
875
+ # by_inference_type: "ON_DEMAND", # accepts ON_DEMAND, PROVISIONED
876
+ # by_output_modality: "TEXT", # accepts TEXT, IMAGE, EMBEDDING
877
+ # by_provider: "Provider",
878
+ # })
879
+ #
880
+ # @example Response structure
881
+ #
882
+ # resp.model_summaries #=> Array
883
+ # resp.model_summaries[0].customizations_supported #=> Array
884
+ # resp.model_summaries[0].customizations_supported[0] #=> String, one of "FINE_TUNING"
885
+ # resp.model_summaries[0].inference_types_supported #=> Array
886
+ # resp.model_summaries[0].inference_types_supported[0] #=> String, one of "ON_DEMAND", "PROVISIONED"
887
+ # resp.model_summaries[0].input_modalities #=> Array
888
+ # resp.model_summaries[0].input_modalities[0] #=> String, one of "TEXT", "IMAGE", "EMBEDDING"
889
+ # resp.model_summaries[0].model_arn #=> String
890
+ # resp.model_summaries[0].model_id #=> String
891
+ # resp.model_summaries[0].model_name #=> String
892
+ # resp.model_summaries[0].output_modalities #=> Array
893
+ # resp.model_summaries[0].output_modalities[0] #=> String, one of "TEXT", "IMAGE", "EMBEDDING"
894
+ # resp.model_summaries[0].provider_name #=> String
895
+ # resp.model_summaries[0].response_streaming_supported #=> Boolean
896
+ #
897
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListFoundationModels AWS API Documentation
898
+ #
899
+ # @overload list_foundation_models(params = {})
900
+ # @param [Hash] params ({})
901
+ def list_foundation_models(params = {}, options = {})
902
+ req = build_request(:list_foundation_models, params)
903
+ req.send_request(options)
904
+ end
905
+
906
+ # Returns a list of model customization jobs that you have submitted.
907
+ # You can filter the jobs to return based on one or more criteria.
908
+ #
909
+ # For more information, see [Custom models][1] in the Bedrock User
910
+ # Guide.
911
+ #
912
+ #
913
+ #
914
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
915
+ #
916
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_after
917
+ # Return customization jobs created after the specified time.
918
+ #
919
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_before
920
+ # Return customization jobs created before the specified time.
921
+ #
922
+ # @option params [Integer] :max_results
923
+ # Maximum number of results to return in the response.
924
+ #
925
+ # @option params [String] :name_contains
926
+ # Return customization jobs only if the job name contains these
927
+ # characters.
928
+ #
929
+ # @option params [String] :next_token
930
+ # Continuation token from the previous response, for Bedrock to list the
931
+ # next set of results.
932
+ #
933
+ # @option params [String] :sort_by
934
+ # The field to sort by in the returned list of jobs.
935
+ #
936
+ # @option params [String] :sort_order
937
+ # The sort order of the results.
938
+ #
939
+ # @option params [String] :status_equals
940
+ # Return customization jobs with the specified status.
941
+ #
942
+ # @return [Types::ListModelCustomizationJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
943
+ #
944
+ # * {Types::ListModelCustomizationJobsResponse#model_customization_job_summaries #model_customization_job_summaries} => Array&lt;Types::ModelCustomizationJobSummary&gt;
945
+ # * {Types::ListModelCustomizationJobsResponse#next_token #next_token} => String
946
+ #
947
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
948
+ #
949
+ # @example Request syntax with placeholder values
950
+ #
951
+ # resp = client.list_model_customization_jobs({
952
+ # creation_time_after: Time.now,
953
+ # creation_time_before: Time.now,
954
+ # max_results: 1,
955
+ # name_contains: "JobName",
956
+ # next_token: "PaginationToken",
957
+ # sort_by: "CreationTime", # accepts CreationTime
958
+ # sort_order: "Ascending", # accepts Ascending, Descending
959
+ # status_equals: "InProgress", # accepts InProgress, Completed, Failed, Stopping, Stopped
960
+ # })
961
+ #
962
+ # @example Response structure
963
+ #
964
+ # resp.model_customization_job_summaries #=> Array
965
+ # resp.model_customization_job_summaries[0].base_model_arn #=> String
966
+ # resp.model_customization_job_summaries[0].creation_time #=> Time
967
+ # resp.model_customization_job_summaries[0].custom_model_arn #=> String
968
+ # resp.model_customization_job_summaries[0].custom_model_name #=> String
969
+ # resp.model_customization_job_summaries[0].end_time #=> Time
970
+ # resp.model_customization_job_summaries[0].job_arn #=> String
971
+ # resp.model_customization_job_summaries[0].job_name #=> String
972
+ # resp.model_customization_job_summaries[0].last_modified_time #=> Time
973
+ # resp.model_customization_job_summaries[0].status #=> String, one of "InProgress", "Completed", "Failed", "Stopping", "Stopped"
974
+ # resp.next_token #=> String
975
+ #
976
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListModelCustomizationJobs AWS API Documentation
977
+ #
978
+ # @overload list_model_customization_jobs(params = {})
979
+ # @param [Hash] params ({})
980
+ def list_model_customization_jobs(params = {}, options = {})
981
+ req = build_request(:list_model_customization_jobs, params)
982
+ req.send_request(options)
983
+ end
984
+
985
+ # List the tags associated with the specified resource.
986
+ #
987
+ # For more information, see [Tagging resources][1] in the Bedrock User
988
+ # Guide.
989
+ #
990
+ #
991
+ #
992
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html
993
+ #
994
+ # @option params [required, String] :resource_arn
995
+ # The ARN of the resource.
996
+ #
997
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
998
+ #
999
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Array&lt;Types::Tag&gt;
1000
+ #
1001
+ # @example Request syntax with placeholder values
1002
+ #
1003
+ # resp = client.list_tags_for_resource({
1004
+ # resource_arn: "TaggableResourcesArn", # required
1005
+ # })
1006
+ #
1007
+ # @example Response structure
1008
+ #
1009
+ # resp.tags #=> Array
1010
+ # resp.tags[0].key #=> String
1011
+ # resp.tags[0].value #=> String
1012
+ #
1013
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListTagsForResource AWS API Documentation
1014
+ #
1015
+ # @overload list_tags_for_resource(params = {})
1016
+ # @param [Hash] params ({})
1017
+ def list_tags_for_resource(params = {}, options = {})
1018
+ req = build_request(:list_tags_for_resource, params)
1019
+ req.send_request(options)
1020
+ end
1021
+
1022
+ # Set the configuration values for model invocation logging.
1023
+ #
1024
+ # @option params [required, Types::LoggingConfig] :logging_config
1025
+ # The logging configuration values to set.
1026
+ #
1027
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1028
+ #
1029
+ # @example Request syntax with placeholder values
1030
+ #
1031
+ # resp = client.put_model_invocation_logging_configuration({
1032
+ # logging_config: { # required
1033
+ # cloud_watch_config: {
1034
+ # large_data_delivery_s3_config: {
1035
+ # bucket_name: "BucketName", # required
1036
+ # key_prefix: "KeyPrefix",
1037
+ # },
1038
+ # log_group_name: "LogGroupName", # required
1039
+ # role_arn: "RoleArn", # required
1040
+ # },
1041
+ # embedding_data_delivery_enabled: false,
1042
+ # image_data_delivery_enabled: false,
1043
+ # s3_config: {
1044
+ # bucket_name: "BucketName", # required
1045
+ # key_prefix: "KeyPrefix",
1046
+ # },
1047
+ # text_data_delivery_enabled: false,
1048
+ # },
1049
+ # })
1050
+ #
1051
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/PutModelInvocationLoggingConfiguration AWS API Documentation
1052
+ #
1053
+ # @overload put_model_invocation_logging_configuration(params = {})
1054
+ # @param [Hash] params ({})
1055
+ def put_model_invocation_logging_configuration(params = {}, options = {})
1056
+ req = build_request(:put_model_invocation_logging_configuration, params)
1057
+ req.send_request(options)
1058
+ end
1059
+
1060
+ # Stops an active model customization job. For more information, see
1061
+ # [Custom models][1] in the Bedrock User Guide.
1062
+ #
1063
+ #
1064
+ #
1065
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
1066
+ #
1067
+ # @option params [required, String] :job_identifier
1068
+ # Job identifier of the job to stop.
1069
+ #
1070
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1071
+ #
1072
+ # @example Request syntax with placeholder values
1073
+ #
1074
+ # resp = client.stop_model_customization_job({
1075
+ # job_identifier: "ModelCustomizationJobIdentifier", # required
1076
+ # })
1077
+ #
1078
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/StopModelCustomizationJob AWS API Documentation
1079
+ #
1080
+ # @overload stop_model_customization_job(params = {})
1081
+ # @param [Hash] params ({})
1082
+ def stop_model_customization_job(params = {}, options = {})
1083
+ req = build_request(:stop_model_customization_job, params)
1084
+ req.send_request(options)
1085
+ end
1086
+
1087
+ # Associate tags with a resource. For more information, see [Tagging
1088
+ # resources][1] in the Bedrock User Guide.
1089
+ #
1090
+ #
1091
+ #
1092
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html
1093
+ #
1094
+ # @option params [required, String] :resource_arn
1095
+ # The ARN of the resource to tag.
1096
+ #
1097
+ # @option params [required, Array<Types::Tag>] :tags
1098
+ # Tags to associate with the resource.
1099
+ #
1100
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1101
+ #
1102
+ # @example Request syntax with placeholder values
1103
+ #
1104
+ # resp = client.tag_resource({
1105
+ # resource_arn: "TaggableResourcesArn", # required
1106
+ # tags: [ # required
1107
+ # {
1108
+ # key: "TagKey", # required
1109
+ # value: "TagValue", # required
1110
+ # },
1111
+ # ],
1112
+ # })
1113
+ #
1114
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/TagResource AWS API Documentation
1115
+ #
1116
+ # @overload tag_resource(params = {})
1117
+ # @param [Hash] params ({})
1118
+ def tag_resource(params = {}, options = {})
1119
+ req = build_request(:tag_resource, params)
1120
+ req.send_request(options)
1121
+ end
1122
+
1123
+ # Remove one or more tags from a resource. For more information, see
1124
+ # [Tagging resources][1] in the Bedrock User Guide.
1125
+ #
1126
+ #
1127
+ #
1128
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html
1129
+ #
1130
+ # @option params [required, String] :resource_arn
1131
+ # The ARN of the resource to untag.
1132
+ #
1133
+ # @option params [required, Array<String>] :tag_keys
1134
+ # Tag keys of the tags to remove from the resource.
1135
+ #
1136
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1137
+ #
1138
+ # @example Request syntax with placeholder values
1139
+ #
1140
+ # resp = client.untag_resource({
1141
+ # resource_arn: "TaggableResourcesArn", # required
1142
+ # tag_keys: ["TagKey"], # required
1143
+ # })
1144
+ #
1145
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/UntagResource AWS API Documentation
1146
+ #
1147
+ # @overload untag_resource(params = {})
1148
+ # @param [Hash] params ({})
1149
+ def untag_resource(params = {}, options = {})
1150
+ req = build_request(:untag_resource, params)
1151
+ req.send_request(options)
1152
+ end
1153
+
1154
+ # @!endgroup
1155
+
1156
+ # @param params ({})
1157
+ # @api private
1158
+ def build_request(operation_name, params = {})
1159
+ handlers = @handlers.for(operation_name)
1160
+ context = Seahorse::Client::RequestContext.new(
1161
+ operation_name: operation_name,
1162
+ operation: config.api.operation(operation_name),
1163
+ client: self,
1164
+ params: params,
1165
+ config: config)
1166
+ context[:gem_name] = 'aws-sdk-bedrock'
1167
+ context[:gem_version] = '1.0.0'
1168
+ Seahorse::Client::Request.new(handlers, context)
1169
+ end
1170
+
1171
+ # @api private
1172
+ # @deprecated
1173
+ def waiter_names
1174
+ []
1175
+ end
1176
+
1177
+ class << self
1178
+
1179
+ # @api private
1180
+ attr_reader :identifier
1181
+
1182
+ # @api private
1183
+ def errors_module
1184
+ Errors
1185
+ end
1186
+
1187
+ end
1188
+ end
1189
+ end