aws-sdk-bedrockruntime 1.3.0 → 1.5.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: d49ced42a5da35d69e9f0a982f166ab9cba9f175b0e6731f37783ae38f159c6b
4
- data.tar.gz: b4356247cfd82223c0c187b22fc633b427a12351939b9bc58e6fc849e9c30c05
3
+ metadata.gz: 3b2d8b2b15d0b645438082efa8cc021dacc23b1edaad27237f1bcb530a99703e
4
+ data.tar.gz: 1143c1e6b8065ab13d4155e03120b5717f87a5d791b6b9ba17507161867bb4b2
5
5
  SHA512:
6
- metadata.gz: 984b28605eee105ea685d58efe2923de14bffccd8fc68a6fb7facb10f538f1baabaaae971993e024162b8d47fc01824b5c2b518414c7fc5ca720d595e008184d
7
- data.tar.gz: 24cb690fa542c723720d57519f31352a1137ce5aadda46255205c04be6fd9d11a1f9e2b86531345f3e12c1e8ff2f21e47edc74f81793662d08227d5897649608
6
+ metadata.gz: e3a7125448b85f078ad163ff9c4b0ff571f895320dd1cb33af4a0942041fa9ec4c155a97a1d46788c666f0104f533f1872a01fc3c058213ffd0868e43e0d9483
7
+ data.tar.gz: eaf09e1d79b45fa084ccd8753b1e48bbf7b8e890ebdef33ae661274f160acd12423190963e2858988841945b4d5597f7a010ee0d9be1f0ee1b29aa15a66efdc4
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.5.0 (2024-01-26)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.4.0 (2023-11-28)
10
+ ------------------
11
+
12
+ * Feature - This release adds support for minor versions/aliases for invoke model identifier.
13
+
4
14
  1.3.0 (2023-11-22)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.5.0
@@ -412,10 +412,6 @@ module Aws::BedrockRuntime
412
412
  #
413
413
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
414
414
  #
415
- # @option params [String] :accept
416
- # The desired MIME type of the inference body in the response. The
417
- # default value is `application/json`.
418
- #
419
415
  # @option params [required, String, StringIO, File] :body
420
416
  # Input data in the format specified in the content-type request header.
421
417
  # To see the format and content of this field for different models,
@@ -429,6 +425,10 @@ module Aws::BedrockRuntime
429
425
  # The MIME type of the input data in the request. The default value is
430
426
  # `application/json`.
431
427
  #
428
+ # @option params [String] :accept
429
+ # The desired MIME type of the inference body in the response. The
430
+ # default value is `application/json`.
431
+ #
432
432
  # @option params [required, String] :model_id
433
433
  # Identifier of the model.
434
434
  #
@@ -440,9 +440,9 @@ module Aws::BedrockRuntime
440
440
  # @example Request syntax with placeholder values
441
441
  #
442
442
  # resp = client.invoke_model({
443
- # accept: "MimeType",
444
443
  # body: "data", # required
445
444
  # content_type: "MimeType",
445
+ # accept: "MimeType",
446
446
  # model_id: "InvokeModelIdentifier", # required
447
447
  # })
448
448
  #
@@ -473,10 +473,6 @@ module Aws::BedrockRuntime
473
473
  #
474
474
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
475
475
  #
476
- # @option params [String] :accept
477
- # The desired MIME type of the inference body in the response. The
478
- # default value is `application/json`.
479
- #
480
476
  # @option params [required, String, StringIO, File] :body
481
477
  # Inference input in the format specified by the content-type. To see
482
478
  # the format and content of this field for different models, refer to
@@ -490,6 +486,10 @@ module Aws::BedrockRuntime
490
486
  # The MIME type of the input data in the request. The default value is
491
487
  # `application/json`.
492
488
  #
489
+ # @option params [String] :accept
490
+ # The desired MIME type of the inference body in the response. The
491
+ # default value is `application/json`.
492
+ #
493
493
  # @option params [required, String] :model_id
494
494
  # Id of the model to invoke using the streaming request.
495
495
  #
@@ -550,14 +550,14 @@ module Aws::BedrockRuntime
550
550
  # handler.on_model_stream_error_exception_event do |event|
551
551
  # event # => Aws::BedrockRuntime::Types::modelStreamErrorException
552
552
  # end
553
- # handler.on_model_timeout_exception_event do |event|
554
- # event # => Aws::BedrockRuntime::Types::modelTimeoutException
553
+ # handler.on_validation_exception_event do |event|
554
+ # event # => Aws::BedrockRuntime::Types::validationException
555
555
  # end
556
556
  # handler.on_throttling_exception_event do |event|
557
557
  # event # => Aws::BedrockRuntime::Types::throttlingException
558
558
  # end
559
- # handler.on_validation_exception_event do |event|
560
- # event # => Aws::BedrockRuntime::Types::validationException
559
+ # handler.on_model_timeout_exception_event do |event|
560
+ # event # => Aws::BedrockRuntime::Types::modelTimeoutException
561
561
  # end
562
562
  #
563
563
  # client.invoke_model_with_response_stream( # params input #, event_stream_handler: handler)
@@ -575,14 +575,14 @@ module Aws::BedrockRuntime
575
575
  # stream.on_model_stream_error_exception_event do |event|
576
576
  # event # => Aws::BedrockRuntime::Types::modelStreamErrorException
577
577
  # end
578
- # stream.on_model_timeout_exception_event do |event|
579
- # event # => Aws::BedrockRuntime::Types::modelTimeoutException
578
+ # stream.on_validation_exception_event do |event|
579
+ # event # => Aws::BedrockRuntime::Types::validationException
580
580
  # end
581
581
  # stream.on_throttling_exception_event do |event|
582
582
  # event # => Aws::BedrockRuntime::Types::throttlingException
583
583
  # end
584
- # stream.on_validation_exception_event do |event|
585
- # event # => Aws::BedrockRuntime::Types::validationException
584
+ # stream.on_model_timeout_exception_event do |event|
585
+ # event # => Aws::BedrockRuntime::Types::modelTimeoutException
586
586
  # end
587
587
  # end
588
588
  #
@@ -600,14 +600,14 @@ module Aws::BedrockRuntime
600
600
  # handler.on_model_stream_error_exception_event do |event|
601
601
  # event # => Aws::BedrockRuntime::Types::modelStreamErrorException
602
602
  # end
603
- # handler.on_model_timeout_exception_event do |event|
604
- # event # => Aws::BedrockRuntime::Types::modelTimeoutException
603
+ # handler.on_validation_exception_event do |event|
604
+ # event # => Aws::BedrockRuntime::Types::validationException
605
605
  # end
606
606
  # handler.on_throttling_exception_event do |event|
607
607
  # event # => Aws::BedrockRuntime::Types::throttlingException
608
608
  # end
609
- # handler.on_validation_exception_event do |event|
610
- # event # => Aws::BedrockRuntime::Types::validationException
609
+ # handler.on_model_timeout_exception_event do |event|
610
+ # event # => Aws::BedrockRuntime::Types::modelTimeoutException
611
611
  # end
612
612
  #
613
613
  # client.invoke_model_with_response_stream( # params input #, event_stream_handler: handler) do |stream|
@@ -630,9 +630,9 @@ module Aws::BedrockRuntime
630
630
  # @example Request syntax with placeholder values
631
631
  #
632
632
  # resp = client.invoke_model_with_response_stream({
633
- # accept: "MimeType",
634
633
  # body: "data", # required
635
634
  # content_type: "MimeType",
635
+ # accept: "MimeType",
636
636
  # model_id: "InvokeModelIdentifier", # required
637
637
  # })
638
638
  #
@@ -640,7 +640,7 @@ module Aws::BedrockRuntime
640
640
  #
641
641
  # All events are available at resp.body:
642
642
  # resp.body #=> Enumerator
643
- # resp.body.event_types #=> [:chunk, :internal_server_exception, :model_stream_error_exception, :model_timeout_exception, :throttling_exception, :validation_exception]
643
+ # resp.body.event_types #=> [:chunk, :internal_server_exception, :model_stream_error_exception, :validation_exception, :throttling_exception, :model_timeout_exception]
644
644
  #
645
645
  # For :chunk event available at #on_chunk_event callback and response eventstream enumerator:
646
646
  # event.bytes #=> String
@@ -650,16 +650,16 @@ module Aws::BedrockRuntime
650
650
  #
651
651
  # For :model_stream_error_exception event available at #on_model_stream_error_exception_event callback and response eventstream enumerator:
652
652
  # event.message #=> String
653
- # event.original_message #=> String
654
653
  # event.original_status_code #=> Integer
654
+ # event.original_message #=> String
655
655
  #
656
- # For :model_timeout_exception event available at #on_model_timeout_exception_event callback and response eventstream enumerator:
656
+ # For :validation_exception event available at #on_validation_exception_event callback and response eventstream enumerator:
657
657
  # event.message #=> String
658
658
  #
659
659
  # For :throttling_exception event available at #on_throttling_exception_event callback and response eventstream enumerator:
660
660
  # event.message #=> String
661
661
  #
662
- # For :validation_exception event available at #on_validation_exception_event callback and response eventstream enumerator:
662
+ # For :model_timeout_exception event available at #on_model_timeout_exception_event callback and response eventstream enumerator:
663
663
  # event.message #=> String
664
664
  #
665
665
  # resp.content_type #=> String
@@ -704,7 +704,7 @@ module Aws::BedrockRuntime
704
704
  params: params,
705
705
  config: config)
706
706
  context[:gem_name] = 'aws-sdk-bedrockruntime'
707
- context[:gem_version] = '1.3.0'
707
+ context[:gem_version] = '1.5.0'
708
708
  Seahorse::Client::Request.new(handlers, context)
709
709
  end
710
710
 
@@ -42,9 +42,9 @@ module Aws::BedrockRuntime
42
42
  InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
43
43
  InternalServerException.struct_class = Types::InternalServerException
44
44
 
45
- InvokeModelRequest.add_member(:accept, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "Accept"))
46
45
  InvokeModelRequest.add_member(:body, Shapes::ShapeRef.new(shape: Body, required: true, location_name: "body"))
47
46
  InvokeModelRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "Content-Type"))
47
+ InvokeModelRequest.add_member(:accept, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "Accept"))
48
48
  InvokeModelRequest.add_member(:model_id, Shapes::ShapeRef.new(shape: InvokeModelIdentifier, required: true, location: "uri", location_name: "modelId"))
49
49
  InvokeModelRequest.struct_class = Types::InvokeModelRequest
50
50
  InvokeModelRequest[:payload] = :body
@@ -56,9 +56,9 @@ module Aws::BedrockRuntime
56
56
  InvokeModelResponse[:payload] = :body
57
57
  InvokeModelResponse[:payload_member] = InvokeModelResponse.member(:body)
58
58
 
59
- InvokeModelWithResponseStreamRequest.add_member(:accept, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "X-Amzn-Bedrock-Accept"))
60
59
  InvokeModelWithResponseStreamRequest.add_member(:body, Shapes::ShapeRef.new(shape: Body, required: true, location_name: "body"))
61
60
  InvokeModelWithResponseStreamRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "Content-Type"))
61
+ InvokeModelWithResponseStreamRequest.add_member(:accept, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "X-Amzn-Bedrock-Accept"))
62
62
  InvokeModelWithResponseStreamRequest.add_member(:model_id, Shapes::ShapeRef.new(shape: InvokeModelIdentifier, required: true, location: "uri", location_name: "modelId"))
63
63
  InvokeModelWithResponseStreamRequest.struct_class = Types::InvokeModelWithResponseStreamRequest
64
64
  InvokeModelWithResponseStreamRequest[:payload] = :body
@@ -79,8 +79,8 @@ module Aws::BedrockRuntime
79
79
  ModelNotReadyException.struct_class = Types::ModelNotReadyException
80
80
 
81
81
  ModelStreamErrorException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
82
- ModelStreamErrorException.add_member(:original_message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "originalMessage"))
83
82
  ModelStreamErrorException.add_member(:original_status_code, Shapes::ShapeRef.new(shape: StatusCode, location_name: "originalStatusCode"))
83
+ ModelStreamErrorException.add_member(:original_message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "originalMessage"))
84
84
  ModelStreamErrorException.struct_class = Types::ModelStreamErrorException
85
85
 
86
86
  ModelTimeoutException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
@@ -95,9 +95,9 @@ module Aws::BedrockRuntime
95
95
  ResponseStream.add_member(:chunk, Shapes::ShapeRef.new(shape: PayloadPart, event: true, location_name: "chunk"))
96
96
  ResponseStream.add_member(:internal_server_exception, Shapes::ShapeRef.new(shape: InternalServerException, location_name: "internalServerException"))
97
97
  ResponseStream.add_member(:model_stream_error_exception, Shapes::ShapeRef.new(shape: ModelStreamErrorException, location_name: "modelStreamErrorException"))
98
- ResponseStream.add_member(:model_timeout_exception, Shapes::ShapeRef.new(shape: ModelTimeoutException, location_name: "modelTimeoutException"))
99
- ResponseStream.add_member(:throttling_exception, Shapes::ShapeRef.new(shape: ThrottlingException, location_name: "throttlingException"))
100
98
  ResponseStream.add_member(:validation_exception, Shapes::ShapeRef.new(shape: ValidationException, location_name: "validationException"))
99
+ ResponseStream.add_member(:throttling_exception, Shapes::ShapeRef.new(shape: ThrottlingException, location_name: "throttlingException"))
100
+ ResponseStream.add_member(:model_timeout_exception, Shapes::ShapeRef.new(shape: ModelTimeoutException, location_name: "modelTimeoutException"))
101
101
  ResponseStream.struct_class = Types::ResponseStream
102
102
 
103
103
  ServiceQuotaExceededException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
@@ -32,7 +32,7 @@ module Aws::BedrockRuntime
32
32
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
33
  end
34
34
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
35
+ if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
36
36
  return Aws::Endpoints::Endpoint.new(url: "https://bedrock-runtime-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
37
37
  end
38
38
  raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
@@ -129,13 +129,13 @@ module Aws::BedrockRuntime
129
129
  end
130
130
 
131
131
  # @return [String]
132
- def original_message
133
- @data[:original_message]
132
+ def original_status_code
133
+ @data[:original_status_code]
134
134
  end
135
135
 
136
136
  # @return [String]
137
- def original_status_code
138
- @data[:original_status_code]
137
+ def original_message
138
+ @data[:original_message]
139
139
  end
140
140
  end
141
141
 
@@ -27,16 +27,16 @@ module Aws::BedrockRuntime
27
27
  @event_emitter.on(:model_stream_error_exception, block) if block_given?
28
28
  end
29
29
 
30
- def on_model_timeout_exception_event(&block)
31
- @event_emitter.on(:model_timeout_exception, block) if block_given?
30
+ def on_validation_exception_event(&block)
31
+ @event_emitter.on(:validation_exception, block) if block_given?
32
32
  end
33
33
 
34
34
  def on_throttling_exception_event(&block)
35
35
  @event_emitter.on(:throttling_exception, block) if block_given?
36
36
  end
37
37
 
38
- def on_validation_exception_event(&block)
39
- @event_emitter.on(:validation_exception, block) if block_given?
38
+ def on_model_timeout_exception_event(&block)
39
+ @event_emitter.on(:model_timeout_exception, block) if block_given?
40
40
  end
41
41
 
42
42
  def on_error_event(&block)
@@ -55,9 +55,9 @@ module Aws::BedrockRuntime
55
55
  on_chunk_event(&block)
56
56
  on_internal_server_exception_event(&block)
57
57
  on_model_stream_error_exception_event(&block)
58
- on_model_timeout_exception_event(&block)
59
- on_throttling_exception_event(&block)
60
58
  on_validation_exception_event(&block)
59
+ on_throttling_exception_event(&block)
60
+ on_model_timeout_exception_event(&block)
61
61
  on_error_event(&block)
62
62
  on_initial_response_event(&block)
63
63
  on_unknown_event(&block)
@@ -14,6 +14,7 @@ module Aws::BedrockRuntime
14
14
  option(
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::BedrockRuntime::EndpointProvider',
17
+ rbs_type: 'untyped',
17
18
  docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
19
  'object that responds to `#resolve_endpoint(parameters)` '\
19
20
  'where `parameters` is a Struct similar to '\
@@ -25,16 +26,17 @@ module Aws::BedrockRuntime
25
26
  # @api private
26
27
  class Handler < Seahorse::Client::Handler
27
28
  def call(context)
28
- # If endpoint was discovered, do not resolve or apply the endpoint.
29
29
  unless context[:discovered_endpoint]
30
30
  params = parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
34
34
  apply_endpoint_headers(context, endpoint.headers)
35
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
35
38
  end
36
39
 
37
- context[:endpoint_params] = params
38
40
  context[:auth_scheme] =
39
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
42
 
@@ -37,11 +37,6 @@ module Aws::BedrockRuntime
37
37
  include Aws::Structure
38
38
  end
39
39
 
40
- # @!attribute [rw] accept
41
- # The desired MIME type of the inference body in the response. The
42
- # default value is `application/json`.
43
- # @return [String]
44
- #
45
40
  # @!attribute [rw] body
46
41
  # Input data in the format specified in the content-type request
47
42
  # header. To see the format and content of this field for different
@@ -57,6 +52,11 @@ module Aws::BedrockRuntime
57
52
  # `application/json`.
58
53
  # @return [String]
59
54
  #
55
+ # @!attribute [rw] accept
56
+ # The desired MIME type of the inference body in the response. The
57
+ # default value is `application/json`.
58
+ # @return [String]
59
+ #
60
60
  # @!attribute [rw] model_id
61
61
  # Identifier of the model.
62
62
  # @return [String]
@@ -64,9 +64,9 @@ module Aws::BedrockRuntime
64
64
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelRequest AWS API Documentation
65
65
  #
66
66
  class InvokeModelRequest < Struct.new(
67
- :accept,
68
67
  :body,
69
68
  :content_type,
69
+ :accept,
70
70
  :model_id)
71
71
  SENSITIVE = [:body]
72
72
  include Aws::Structure
@@ -95,11 +95,6 @@ module Aws::BedrockRuntime
95
95
  include Aws::Structure
96
96
  end
97
97
 
98
- # @!attribute [rw] accept
99
- # The desired MIME type of the inference body in the response. The
100
- # default value is `application/json`.
101
- # @return [String]
102
- #
103
98
  # @!attribute [rw] body
104
99
  # Inference input in the format specified by the content-type. To see
105
100
  # the format and content of this field for different models, refer to
@@ -115,6 +110,11 @@ module Aws::BedrockRuntime
115
110
  # `application/json`.
116
111
  # @return [String]
117
112
  #
113
+ # @!attribute [rw] accept
114
+ # The desired MIME type of the inference body in the response. The
115
+ # default value is `application/json`.
116
+ # @return [String]
117
+ #
118
118
  # @!attribute [rw] model_id
119
119
  # Id of the model to invoke using the streaming request.
120
120
  # @return [String]
@@ -122,9 +122,9 @@ module Aws::BedrockRuntime
122
122
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStreamRequest AWS API Documentation
123
123
  #
124
124
  class InvokeModelWithResponseStreamRequest < Struct.new(
125
- :accept,
126
125
  :body,
127
126
  :content_type,
127
+ :accept,
128
128
  :model_id)
129
129
  SENSITIVE = [:body]
130
130
  include Aws::Structure
@@ -195,20 +195,20 @@ module Aws::BedrockRuntime
195
195
  # @!attribute [rw] message
196
196
  # @return [String]
197
197
  #
198
- # @!attribute [rw] original_message
199
- # The original message.
200
- # @return [String]
201
- #
202
198
  # @!attribute [rw] original_status_code
203
199
  # The original status code.
204
200
  # @return [Integer]
205
201
  #
202
+ # @!attribute [rw] original_message
203
+ # The original message.
204
+ # @return [String]
205
+ #
206
206
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ModelStreamErrorException AWS API Documentation
207
207
  #
208
208
  class ModelStreamErrorException < Struct.new(
209
209
  :message,
210
- :original_message,
211
210
  :original_status_code,
211
+ :original_message,
212
212
  :event_type)
213
213
  SENSITIVE = []
214
214
  include Aws::Structure
@@ -315,9 +315,9 @@ module Aws::BedrockRuntime
315
315
  :chunk,
316
316
  :internal_server_exception,
317
317
  :model_stream_error_exception,
318
- :model_timeout_exception,
318
+ :validation_exception,
319
319
  :throttling_exception,
320
- :validation_exception
320
+ :model_timeout_exception
321
321
  ]
322
322
  end
323
323
 
@@ -0,0 +1,15 @@
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 'aws-sdk-core/waiters'
11
+
12
+ module Aws::BedrockRuntime
13
+ module Waiters
14
+ end
15
+ end
@@ -16,6 +16,7 @@ require_relative 'aws-sdk-bedrockruntime/client_api'
16
16
  require_relative 'aws-sdk-bedrockruntime/plugins/endpoints.rb'
17
17
  require_relative 'aws-sdk-bedrockruntime/client'
18
18
  require_relative 'aws-sdk-bedrockruntime/errors'
19
+ require_relative 'aws-sdk-bedrockruntime/waiters'
19
20
  require_relative 'aws-sdk-bedrockruntime/resource'
20
21
  require_relative 'aws-sdk-bedrockruntime/endpoint_parameters'
21
22
  require_relative 'aws-sdk-bedrockruntime/endpoint_provider'
@@ -53,6 +54,6 @@ require_relative 'aws-sdk-bedrockruntime/event_streams'
53
54
  # @!group service
54
55
  module Aws::BedrockRuntime
55
56
 
56
- GEM_VERSION = '1.3.0'
57
+ GEM_VERSION = '1.5.0'
57
58
 
58
59
  end
data/sig/client.rbs ADDED
@@ -0,0 +1,108 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module BedrockRuntime
10
+ class Client < ::Seahorse::Client::Base
11
+ include ::Aws::ClientStubs
12
+
13
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#initialize-instance_method
14
+ def self.new: (
15
+ ?credentials: untyped,
16
+ ?region: String,
17
+ ?access_key_id: String,
18
+ ?active_endpoint_cache: bool,
19
+ ?adaptive_retry_wait_to_fill: bool,
20
+ ?client_side_monitoring: bool,
21
+ ?client_side_monitoring_client_id: String,
22
+ ?client_side_monitoring_host: String,
23
+ ?client_side_monitoring_port: Integer,
24
+ ?client_side_monitoring_publisher: untyped,
25
+ ?convert_params: bool,
26
+ ?correct_clock_skew: bool,
27
+ ?defaults_mode: String,
28
+ ?disable_host_prefix_injection: bool,
29
+ ?disable_request_compression: bool,
30
+ ?endpoint: String,
31
+ ?endpoint_cache_max_entries: Integer,
32
+ ?endpoint_cache_max_threads: Integer,
33
+ ?endpoint_cache_poll_interval: Integer,
34
+ ?endpoint_discovery: bool,
35
+ ?event_stream_handler: Proc,
36
+ ?ignore_configured_endpoint_urls: bool,
37
+ ?input_event_stream_handler: Proc,
38
+ ?log_formatter: untyped,
39
+ ?log_level: Symbol,
40
+ ?logger: untyped,
41
+ ?max_attempts: Integer,
42
+ ?output_event_stream_handler: Proc,
43
+ ?profile: String,
44
+ ?request_min_compression_size_bytes: Integer,
45
+ ?retry_backoff: Proc,
46
+ ?retry_base_delay: Float,
47
+ ?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
48
+ ?retry_limit: Integer,
49
+ ?retry_max_delay: Integer,
50
+ ?retry_mode: ("legacy" | "standard" | "adaptive"),
51
+ ?sdk_ua_app_id: String,
52
+ ?secret_access_key: String,
53
+ ?session_token: String,
54
+ ?stub_responses: untyped,
55
+ ?token_provider: untyped,
56
+ ?use_dualstack_endpoint: bool,
57
+ ?use_fips_endpoint: bool,
58
+ ?validate_params: bool,
59
+ ?endpoint_provider: untyped,
60
+ ?http_proxy: String,
61
+ ?http_open_timeout: (Float | Integer),
62
+ ?http_read_timeout: (Float | Integer),
63
+ ?http_idle_timeout: (Float | Integer),
64
+ ?http_continue_timeout: (Float | Integer),
65
+ ?ssl_timeout: (Float | Integer | nil),
66
+ ?http_wire_trace: bool,
67
+ ?ssl_verify_peer: bool,
68
+ ?ssl_ca_bundle: String,
69
+ ?ssl_ca_directory: String,
70
+ ?ssl_ca_store: String,
71
+ ?on_chunk_received: Proc,
72
+ ?on_chunk_sent: Proc,
73
+ ?raise_response_errors: bool
74
+ ) -> instance
75
+ | (?Hash[Symbol, untyped]) -> instance
76
+
77
+
78
+ interface _InvokeModelResponseSuccess
79
+ include ::Seahorse::Client::_ResponseSuccess[Types::InvokeModelResponse]
80
+ def body: () -> ::String
81
+ def content_type: () -> ::String
82
+ end
83
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#invoke_model-instance_method
84
+ def invoke_model: (
85
+ body: ::String,
86
+ ?content_type: ::String,
87
+ ?accept: ::String,
88
+ model_id: ::String
89
+ ) -> _InvokeModelResponseSuccess
90
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _InvokeModelResponseSuccess
91
+
92
+ interface _InvokeModelWithResponseStreamResponseSuccess
93
+ include ::Seahorse::Client::_ResponseSuccess[Types::InvokeModelWithResponseStreamResponse]
94
+ def body: () -> Types::ResponseStream
95
+ def content_type: () -> ::String
96
+ end
97
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#invoke_model_with_response_stream-instance_method
98
+ def invoke_model_with_response_stream: (
99
+ body: ::String,
100
+ ?content_type: ::String,
101
+ ?accept: ::String,
102
+ model_id: ::String
103
+ ) ?{ (*untyped) -> void } -> _InvokeModelWithResponseStreamResponseSuccess
104
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeModelWithResponseStreamResponseSuccess
105
+ end
106
+ end
107
+ end
108
+
data/sig/errors.rbs ADDED
@@ -0,0 +1,50 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module BedrockRuntime
10
+ module Errors
11
+ class ServiceError < ::Aws::Errors::ServiceError
12
+ end
13
+
14
+ class AccessDeniedException < ::Aws::Errors::ServiceError
15
+ def message: () -> ::String
16
+ end
17
+ class InternalServerException < ::Aws::Errors::ServiceError
18
+ def message: () -> ::String
19
+ end
20
+ class ModelErrorException < ::Aws::Errors::ServiceError
21
+ def message: () -> ::String
22
+ def original_status_code: () -> ::String
23
+ def resource_name: () -> ::String
24
+ end
25
+ class ModelNotReadyException < ::Aws::Errors::ServiceError
26
+ def message: () -> ::String
27
+ end
28
+ class ModelStreamErrorException < ::Aws::Errors::ServiceError
29
+ def message: () -> ::String
30
+ def original_status_code: () -> ::String
31
+ def original_message: () -> ::String
32
+ end
33
+ class ModelTimeoutException < ::Aws::Errors::ServiceError
34
+ def message: () -> ::String
35
+ end
36
+ class ResourceNotFoundException < ::Aws::Errors::ServiceError
37
+ def message: () -> ::String
38
+ end
39
+ class ServiceQuotaExceededException < ::Aws::Errors::ServiceError
40
+ def message: () -> ::String
41
+ end
42
+ class ThrottlingException < ::Aws::Errors::ServiceError
43
+ def message: () -> ::String
44
+ end
45
+ class ValidationException < ::Aws::Errors::ServiceError
46
+ def message: () -> ::String
47
+ end
48
+ end
49
+ end
50
+ end
data/sig/resource.rbs ADDED
@@ -0,0 +1,82 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module BedrockRuntime
10
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Resource.html
11
+ class Resource
12
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Resource.html#initialize-instance_method
13
+ def initialize: (
14
+ ?client: Client,
15
+ ?credentials: untyped,
16
+ ?region: String,
17
+ ?access_key_id: String,
18
+ ?active_endpoint_cache: bool,
19
+ ?adaptive_retry_wait_to_fill: bool,
20
+ ?client_side_monitoring: bool,
21
+ ?client_side_monitoring_client_id: String,
22
+ ?client_side_monitoring_host: String,
23
+ ?client_side_monitoring_port: Integer,
24
+ ?client_side_monitoring_publisher: untyped,
25
+ ?convert_params: bool,
26
+ ?correct_clock_skew: bool,
27
+ ?defaults_mode: String,
28
+ ?disable_host_prefix_injection: bool,
29
+ ?disable_request_compression: bool,
30
+ ?endpoint: String,
31
+ ?endpoint_cache_max_entries: Integer,
32
+ ?endpoint_cache_max_threads: Integer,
33
+ ?endpoint_cache_poll_interval: Integer,
34
+ ?endpoint_discovery: bool,
35
+ ?event_stream_handler: Proc,
36
+ ?ignore_configured_endpoint_urls: bool,
37
+ ?input_event_stream_handler: Proc,
38
+ ?log_formatter: untyped,
39
+ ?log_level: Symbol,
40
+ ?logger: untyped,
41
+ ?max_attempts: Integer,
42
+ ?output_event_stream_handler: Proc,
43
+ ?profile: String,
44
+ ?request_min_compression_size_bytes: Integer,
45
+ ?retry_backoff: Proc,
46
+ ?retry_base_delay: Float,
47
+ ?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
48
+ ?retry_limit: Integer,
49
+ ?retry_max_delay: Integer,
50
+ ?retry_mode: ("legacy" | "standard" | "adaptive"),
51
+ ?sdk_ua_app_id: String,
52
+ ?secret_access_key: String,
53
+ ?session_token: String,
54
+ ?stub_responses: untyped,
55
+ ?token_provider: untyped,
56
+ ?use_dualstack_endpoint: bool,
57
+ ?use_fips_endpoint: bool,
58
+ ?validate_params: bool,
59
+ ?endpoint_provider: untyped,
60
+ ?http_proxy: String,
61
+ ?http_open_timeout: (Float | Integer),
62
+ ?http_read_timeout: (Float | Integer),
63
+ ?http_idle_timeout: (Float | Integer),
64
+ ?http_continue_timeout: (Float | Integer),
65
+ ?ssl_timeout: (Float | Integer | nil),
66
+ ?http_wire_trace: bool,
67
+ ?ssl_verify_peer: bool,
68
+ ?ssl_ca_bundle: String,
69
+ ?ssl_ca_directory: String,
70
+ ?ssl_ca_store: String,
71
+ ?on_chunk_received: Proc,
72
+ ?on_chunk_sent: Proc,
73
+ ?raise_response_errors: bool
74
+ ) -> void
75
+ | (?Hash[Symbol, untyped]) -> void
76
+
77
+ def client: () -> Client
78
+
79
+
80
+ end
81
+ end
82
+ end
data/sig/types.rbs ADDED
@@ -0,0 +1,108 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::BedrockRuntime
9
+ module Types
10
+
11
+ class AccessDeniedException
12
+ attr_accessor message: ::String
13
+ SENSITIVE: []
14
+ end
15
+
16
+ class InternalServerException
17
+ attr_accessor message: ::String
18
+ attr_accessor event_type: untyped
19
+ SENSITIVE: []
20
+ end
21
+
22
+ class InvokeModelRequest
23
+ attr_accessor body: ::String
24
+ attr_accessor content_type: ::String
25
+ attr_accessor accept: ::String
26
+ attr_accessor model_id: ::String
27
+ SENSITIVE: [:body]
28
+ end
29
+
30
+ class InvokeModelResponse
31
+ attr_accessor body: ::String
32
+ attr_accessor content_type: ::String
33
+ SENSITIVE: [:body]
34
+ end
35
+
36
+ class InvokeModelWithResponseStreamRequest
37
+ attr_accessor body: ::String
38
+ attr_accessor content_type: ::String
39
+ attr_accessor accept: ::String
40
+ attr_accessor model_id: ::String
41
+ SENSITIVE: [:body]
42
+ end
43
+
44
+ class InvokeModelWithResponseStreamResponse
45
+ attr_accessor body: Types::ResponseStream
46
+ attr_accessor content_type: ::String
47
+ SENSITIVE: []
48
+ end
49
+
50
+ class ModelErrorException
51
+ attr_accessor message: ::String
52
+ attr_accessor original_status_code: ::Integer
53
+ attr_accessor resource_name: ::String
54
+ SENSITIVE: []
55
+ end
56
+
57
+ class ModelNotReadyException
58
+ attr_accessor message: ::String
59
+ SENSITIVE: []
60
+ end
61
+
62
+ class ModelStreamErrorException
63
+ attr_accessor message: ::String
64
+ attr_accessor original_status_code: ::Integer
65
+ attr_accessor original_message: ::String
66
+ attr_accessor event_type: untyped
67
+ SENSITIVE: []
68
+ end
69
+
70
+ class ModelTimeoutException
71
+ attr_accessor message: ::String
72
+ attr_accessor event_type: untyped
73
+ SENSITIVE: []
74
+ end
75
+
76
+ class PayloadPart
77
+ attr_accessor bytes: ::String
78
+ attr_accessor event_type: untyped
79
+ SENSITIVE: [:bytes]
80
+ end
81
+
82
+ class ResourceNotFoundException
83
+ attr_accessor message: ::String
84
+ SENSITIVE: []
85
+ end
86
+
87
+ class ServiceQuotaExceededException
88
+ attr_accessor message: ::String
89
+ SENSITIVE: []
90
+ end
91
+
92
+ class ThrottlingException
93
+ attr_accessor message: ::String
94
+ attr_accessor event_type: untyped
95
+ SENSITIVE: []
96
+ end
97
+
98
+ class ValidationException
99
+ attr_accessor message: ::String
100
+ attr_accessor event_type: untyped
101
+ SENSITIVE: []
102
+ end
103
+
104
+ class ResponseStream < Enumerator[untyped, untyped]
105
+ def event_types: () -> [:chunk, :internal_server_exception, :model_stream_error_exception, :validation_exception, :throttling_exception, :model_timeout_exception]
106
+ end
107
+ end
108
+ end
data/sig/waiters.rbs ADDED
@@ -0,0 +1,13 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module BedrockRuntime
10
+ module Waiters
11
+ end
12
+ end
13
+ end
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.3.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-22 00:00:00.000000000 Z
11
+ date: 2024-01-26 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.188.0
22
+ version: 3.191.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.188.0
32
+ version: 3.191.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -67,13 +67,19 @@ files:
67
67
  - lib/aws-sdk-bedrockruntime/plugins/endpoints.rb
68
68
  - lib/aws-sdk-bedrockruntime/resource.rb
69
69
  - lib/aws-sdk-bedrockruntime/types.rb
70
+ - lib/aws-sdk-bedrockruntime/waiters.rb
71
+ - sig/client.rbs
72
+ - sig/errors.rbs
73
+ - sig/resource.rbs
74
+ - sig/types.rbs
75
+ - sig/waiters.rbs
70
76
  homepage: https://github.com/aws/aws-sdk-ruby
71
77
  licenses:
72
78
  - Apache-2.0
73
79
  metadata:
74
80
  source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-bedrockruntime
75
81
  changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-bedrockruntime/CHANGELOG.md
76
- post_install_message:
82
+ post_install_message:
77
83
  rdoc_options: []
78
84
  require_paths:
79
85
  - lib
@@ -88,8 +94,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
94
  - !ruby/object:Gem::Version
89
95
  version: '0'
90
96
  requirements: []
91
- rubygems_version: 3.1.6
92
- signing_key:
97
+ rubygems_version: 3.4.10
98
+ signing_key:
93
99
  specification_version: 4
94
100
  summary: AWS SDK for Ruby - Amazon Bedrock Runtime
95
101
  test_files: []