aws-sdk-bedrockruntime 1.18.0 → 1.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33cd36154146924d39255d028476c5025147790fc801dba1e46ec90da47a6fd7
4
- data.tar.gz: c8b86f4a6e8ea248f830a67506ffe77870f537ac4db7ae03122aede570c282d5
3
+ metadata.gz: d4790f60506805fe1a399b5f005c807f2eabe2eb056ec4cf4e265ab68b54a983
4
+ data.tar.gz: a5e9a408aa24c82654a66dcd2a207ba08fe3006480e9a8bcd32796b3ac1178b9
5
5
  SHA512:
6
- metadata.gz: dc1323ceb9970cc9335e29a0cd6ce06214bf958d6cbeb1b867309b9c28ff12be954ebfab38e472d469b445e753e19091efada9b3d81aba1882e5a00ea19c8919
7
- data.tar.gz: 063bc5599b39a4ff55a41f2d8bdb68c82e6de6d1a8faecfa17aac69c0e5cf63a333003f45e66c457504854c00416035ed960c71b3569f6a2c4cbe7c8f739a96f
6
+ metadata.gz: 6d6fe29a096d98743e3241b6469cb86f7c47ecfeca4754e2a0e6e365cca2ca3ea5612916dcc453a82d2b80d86ba203abb2b8cfcd1b9c6da8d256d19b190026fd
7
+ data.tar.gz: 7946cf943b0ff607ef7c2525b2632f4f884c33807efbe507a0dfcfc9fe7f1ed67556efa1c87f5a9bb5825f7d7372d061ab6de105295bb028ed948e932548cf34
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.20.0 (2024-09-03)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.19.0 (2024-08-29)
10
+ ------------------
11
+
12
+ * Feature - Add support for imported-model in invokeModel and InvokeModelWithResponseStream.
13
+
4
14
  1.18.0 (2024-08-27)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.18.0
1
+ 1.20.0
@@ -32,6 +32,7 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
32
32
  require 'aws-sdk-core/plugins/request_compression.rb'
33
33
  require 'aws-sdk-core/plugins/defaults_mode.rb'
34
34
  require 'aws-sdk-core/plugins/recursion_detection.rb'
35
+ require 'aws-sdk-core/plugins/telemetry.rb'
35
36
  require 'aws-sdk-core/plugins/sign.rb'
36
37
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
37
38
  require 'aws-sdk-core/plugins/event_stream_configuration.rb'
@@ -84,6 +85,7 @@ module Aws::BedrockRuntime
84
85
  add_plugin(Aws::Plugins::RequestCompression)
85
86
  add_plugin(Aws::Plugins::DefaultsMode)
86
87
  add_plugin(Aws::Plugins::RecursionDetection)
88
+ add_plugin(Aws::Plugins::Telemetry)
87
89
  add_plugin(Aws::Plugins::Sign)
88
90
  add_plugin(Aws::Plugins::Protocols::RestJson)
89
91
  add_plugin(Aws::Plugins::EventStreamConfiguration)
@@ -341,6 +343,16 @@ module Aws::BedrockRuntime
341
343
  # ** Please note ** When response stubbing is enabled, no HTTP
342
344
  # requests are made, and retries are disabled.
343
345
  #
346
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
347
+ # Allows you to provide a telemetry provider, which is used to
348
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
349
+ # will not record or emit any telemetry data. The SDK supports the
350
+ # following telemetry providers:
351
+ #
352
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
353
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
354
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
355
+ #
344
356
  # @option options [Aws::TokenProvider] :token_provider
345
357
  # A Bearer Token Provider. This can be an instance of any one of the
346
358
  # following classes:
@@ -548,26 +560,36 @@ module Aws::BedrockRuntime
548
560
  # @option params [required, String] :model_id
549
561
  # The identifier for the model that you want to call.
550
562
  #
551
- # The `modelId` to provide depends on the type of model that you use:
563
+ # The `modelId` to provide depends on the type of model or throughput
564
+ # that you use:
552
565
  #
553
566
  # * If you use a base model, specify the model ID or its ARN. For a list
554
567
  # of model IDs for base models, see [Amazon Bedrock base model IDs
555
568
  # (on-demand throughput)][1] in the Amazon Bedrock User Guide.
556
569
  #
570
+ # * If you use an inference profile, specify the inference profile ID or
571
+ # its ARN. For a list of inference profile IDs, see [Supported Regions
572
+ # and models for cross-region inference][2] in the Amazon Bedrock User
573
+ # Guide.
574
+ #
557
575
  # * If you use a provisioned model, specify the ARN of the Provisioned
558
576
  # Throughput. For more information, see [Run inference using a
559
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
577
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
560
578
  #
561
579
  # * If you use a custom model, first purchase Provisioned Throughput for
562
580
  # it. Then specify the ARN of the resulting provisioned model. For
563
- # more information, see [Use a custom model in Amazon Bedrock][3] in
581
+ # more information, see [Use a custom model in Amazon Bedrock][4] in
564
582
  # the Amazon Bedrock User Guide.
565
583
  #
584
+ # The Converse API doesn't support [imported models][5].
585
+ #
566
586
  #
567
587
  #
568
588
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
569
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
570
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
589
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
590
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
591
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
592
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
571
593
  #
572
594
  # @option params [required, Array<Types::Message>] :messages
573
595
  # The messages that you want to send to the model.
@@ -891,26 +913,36 @@ module Aws::BedrockRuntime
891
913
  # @option params [required, String] :model_id
892
914
  # The ID for the model.
893
915
  #
894
- # The `modelId` to provide depends on the type of model that you use:
916
+ # The `modelId` to provide depends on the type of model or throughput
917
+ # that you use:
895
918
  #
896
919
  # * If you use a base model, specify the model ID or its ARN. For a list
897
920
  # of model IDs for base models, see [Amazon Bedrock base model IDs
898
921
  # (on-demand throughput)][1] in the Amazon Bedrock User Guide.
899
922
  #
923
+ # * If you use an inference profile, specify the inference profile ID or
924
+ # its ARN. For a list of inference profile IDs, see [Supported Regions
925
+ # and models for cross-region inference][2] in the Amazon Bedrock User
926
+ # Guide.
927
+ #
900
928
  # * If you use a provisioned model, specify the ARN of the Provisioned
901
929
  # Throughput. For more information, see [Run inference using a
902
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
930
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
903
931
  #
904
932
  # * If you use a custom model, first purchase Provisioned Throughput for
905
933
  # it. Then specify the ARN of the resulting provisioned model. For
906
- # more information, see [Use a custom model in Amazon Bedrock][3] in
934
+ # more information, see [Use a custom model in Amazon Bedrock][4] in
907
935
  # the Amazon Bedrock User Guide.
908
936
  #
937
+ # The Converse API doesn't support [imported models][5].
938
+ #
909
939
  #
910
940
  #
911
941
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
912
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
913
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
942
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
943
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
944
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
945
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
914
946
  #
915
947
  # @option params [required, Array<Types::Message>] :messages
916
948
  # The messages that you want to send to the model.
@@ -1443,11 +1475,18 @@ module Aws::BedrockRuntime
1443
1475
  # more information, see [Use a custom model in Amazon Bedrock][3] in
1444
1476
  # the Amazon Bedrock User Guide.
1445
1477
  #
1478
+ # * If you use an [imported model][4], specify the ARN of the imported
1479
+ # model. You can get the model ARN from a successful call to
1480
+ # [CreateModelImportJob][5] or from the Imported models page in the
1481
+ # Amazon Bedrock console.
1482
+ #
1446
1483
  #
1447
1484
  #
1448
1485
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1449
1486
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1450
1487
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1488
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1489
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1451
1490
  #
1452
1491
  # @option params [String] :trace
1453
1492
  # Specifies whether to enable or disable the Bedrock trace. If enabled,
@@ -1562,11 +1601,18 @@ module Aws::BedrockRuntime
1562
1601
  # more information, see [Use a custom model in Amazon Bedrock][3] in
1563
1602
  # the Amazon Bedrock User Guide.
1564
1603
  #
1604
+ # * If you use an [imported model][4], specify the ARN of the imported
1605
+ # model. You can get the model ARN from a successful call to
1606
+ # [CreateModelImportJob][5] or from the Imported models page in the
1607
+ # Amazon Bedrock console.
1608
+ #
1565
1609
  #
1566
1610
  #
1567
1611
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1568
1612
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1569
1613
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1614
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1615
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1570
1616
  #
1571
1617
  # @option params [String] :trace
1572
1618
  # Specifies whether to enable or disable the Bedrock trace. If enabled,
@@ -1808,14 +1854,19 @@ module Aws::BedrockRuntime
1808
1854
  # @api private
1809
1855
  def build_request(operation_name, params = {})
1810
1856
  handlers = @handlers.for(operation_name)
1857
+ tracer = config.telemetry_provider.tracer_provider.tracer(
1858
+ Aws::Telemetry.module_to_tracer_name('Aws::BedrockRuntime')
1859
+ )
1811
1860
  context = Seahorse::Client::RequestContext.new(
1812
1861
  operation_name: operation_name,
1813
1862
  operation: config.api.operation(operation_name),
1814
1863
  client: self,
1815
1864
  params: params,
1816
- config: config)
1865
+ config: config,
1866
+ tracer: tracer
1867
+ )
1817
1868
  context[:gem_name] = 'aws-sdk-bedrockruntime'
1818
- context[:gem_version] = '1.18.0'
1869
+ context[:gem_version] = '1.20.0'
1819
1870
  Seahorse::Client::Request.new(handlers, context)
1820
1871
  end
1821
1872
 
@@ -113,6 +113,10 @@ module Aws::BedrockRuntime
113
113
  def message
114
114
  @message || @data[:message]
115
115
  end
116
+
117
+ def retryable?
118
+ true
119
+ end
116
120
  end
117
121
 
118
122
  class ModelStreamErrorException < ServiceError
@@ -312,26 +312,36 @@ module Aws::BedrockRuntime
312
312
  # @!attribute [rw] model_id
313
313
  # The identifier for the model that you want to call.
314
314
  #
315
- # The `modelId` to provide depends on the type of model that you use:
315
+ # The `modelId` to provide depends on the type of model or throughput
316
+ # that you use:
316
317
  #
317
318
  # * If you use a base model, specify the model ID or its ARN. For a
318
319
  # list of model IDs for base models, see [Amazon Bedrock base model
319
320
  # IDs (on-demand throughput)][1] in the Amazon Bedrock User Guide.
320
321
  #
322
+ # * If you use an inference profile, specify the inference profile ID
323
+ # or its ARN. For a list of inference profile IDs, see [Supported
324
+ # Regions and models for cross-region inference][2] in the Amazon
325
+ # Bedrock User Guide.
326
+ #
321
327
  # * If you use a provisioned model, specify the ARN of the Provisioned
322
328
  # Throughput. For more information, see [Run inference using a
323
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
329
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
324
330
  #
325
331
  # * If you use a custom model, first purchase Provisioned Throughput
326
332
  # for it. Then specify the ARN of the resulting provisioned model.
327
333
  # For more information, see [Use a custom model in Amazon
328
- # Bedrock][3] in the Amazon Bedrock User Guide.
334
+ # Bedrock][4] in the Amazon Bedrock User Guide.
335
+ #
336
+ # The Converse API doesn't support [imported models][5].
329
337
  #
330
338
  #
331
339
  #
332
340
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
333
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
334
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
341
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
342
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
343
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
344
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
335
345
  # @return [String]
336
346
  #
337
347
  # @!attribute [rw] messages
@@ -498,26 +508,36 @@ module Aws::BedrockRuntime
498
508
  # @!attribute [rw] model_id
499
509
  # The ID for the model.
500
510
  #
501
- # The `modelId` to provide depends on the type of model that you use:
511
+ # The `modelId` to provide depends on the type of model or throughput
512
+ # that you use:
502
513
  #
503
514
  # * If you use a base model, specify the model ID or its ARN. For a
504
515
  # list of model IDs for base models, see [Amazon Bedrock base model
505
516
  # IDs (on-demand throughput)][1] in the Amazon Bedrock User Guide.
506
517
  #
518
+ # * If you use an inference profile, specify the inference profile ID
519
+ # or its ARN. For a list of inference profile IDs, see [Supported
520
+ # Regions and models for cross-region inference][2] in the Amazon
521
+ # Bedrock User Guide.
522
+ #
507
523
  # * If you use a provisioned model, specify the ARN of the Provisioned
508
524
  # Throughput. For more information, see [Run inference using a
509
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
525
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
510
526
  #
511
527
  # * If you use a custom model, first purchase Provisioned Throughput
512
528
  # for it. Then specify the ARN of the resulting provisioned model.
513
529
  # For more information, see [Use a custom model in Amazon
514
- # Bedrock][3] in the Amazon Bedrock User Guide.
530
+ # Bedrock][4] in the Amazon Bedrock User Guide.
531
+ #
532
+ # The Converse API doesn't support [imported models][5].
515
533
  #
516
534
  #
517
535
  #
518
536
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
519
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
520
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
537
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
538
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
539
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
540
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
521
541
  # @return [String]
522
542
  #
523
543
  # @!attribute [rw] messages
@@ -1399,11 +1419,18 @@ module Aws::BedrockRuntime
1399
1419
  # For more information, see [Use a custom model in Amazon
1400
1420
  # Bedrock][3] in the Amazon Bedrock User Guide.
1401
1421
  #
1422
+ # * If you use an [imported model][4], specify the ARN of the imported
1423
+ # model. You can get the model ARN from a successful call to
1424
+ # [CreateModelImportJob][5] or from the Imported models page in the
1425
+ # Amazon Bedrock console.
1426
+ #
1402
1427
  #
1403
1428
  #
1404
1429
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1405
1430
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1406
1431
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1432
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1433
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1407
1434
  # @return [String]
1408
1435
  #
1409
1436
  # @!attribute [rw] trace
@@ -1510,11 +1537,18 @@ module Aws::BedrockRuntime
1510
1537
  # For more information, see [Use a custom model in Amazon
1511
1538
  # Bedrock][3] in the Amazon Bedrock User Guide.
1512
1539
  #
1540
+ # * If you use an [imported model][4], specify the ARN of the imported
1541
+ # model. You can get the model ARN from a successful call to
1542
+ # [CreateModelImportJob][5] or from the Imported models page in the
1543
+ # Amazon Bedrock console.
1544
+ #
1513
1545
  #
1514
1546
  #
1515
1547
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1516
1548
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1517
1549
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1550
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1551
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1518
1552
  # @return [String]
1519
1553
  #
1520
1554
  # @!attribute [rw] trace
@@ -1675,7 +1709,13 @@ module Aws::BedrockRuntime
1675
1709
  end
1676
1710
 
1677
1711
  # The model specified in the request is not ready to serve inference
1678
- # requests.
1712
+ # requests. The AWS SDK will automatically retry the operation up to 5
1713
+ # times. For information about configuring automatic retries, see [Retry
1714
+ # behavior][1] in the *AWS SDKs and Tools* reference guide.
1715
+ #
1716
+ #
1717
+ #
1718
+ # [1]: https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html
1679
1719
  #
1680
1720
  # @!attribute [rw] message
1681
1721
  # @return [String]
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-bedrockruntime/event_streams'
54
54
  # @!group service
55
55
  module Aws::BedrockRuntime
56
56
 
57
- GEM_VERSION = '1.18.0'
57
+ GEM_VERSION = '1.20.0'
58
58
 
59
59
  end
data/sig/client.rbs CHANGED
@@ -53,6 +53,7 @@ module Aws
53
53
  ?session_token: String,
54
54
  ?sigv4a_signing_region_set: Array[String],
55
55
  ?stub_responses: untyped,
56
+ ?telemetry_provider: Aws::Telemetry::TelemetryProviderBase,
56
57
  ?token_provider: untyped,
57
58
  ?use_dualstack_endpoint: bool,
58
59
  ?use_fips_endpoint: bool,
data/sig/resource.rbs CHANGED
@@ -53,6 +53,7 @@ module Aws
53
53
  ?session_token: String,
54
54
  ?sigv4a_signing_region_set: Array[String],
55
55
  ?stub_responses: untyped,
56
+ ?telemetry_provider: Aws::Telemetry::TelemetryProviderBase,
56
57
  ?token_provider: untyped,
57
58
  ?use_dualstack_endpoint: bool,
58
59
  ?use_fips_endpoint: bool,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-27 00:00:00.000000000 Z
11
+ date: 2024-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.201.0
22
+ version: 3.203.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.201.0
32
+ version: 3.203.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement