aws-sdk-bedrockruntime 1.51.0 → 1.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockruntime/async_client.rb +21 -9
- data/lib/aws-sdk-bedrockruntime/client.rb +21 -9
- data/lib/aws-sdk-bedrockruntime/plugins/bearer_authorization.rb +27 -0
- data/lib/aws-sdk-bedrockruntime.rb +1 -1
- data/sig/async_client.rbs +1 -0
- data/sig/client.rbs +1 -0
- data/sig/resource.rbs +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 604556a1f1cf0828128fa289dfd3af94e67edaa1b66edb8102c7405695729870
|
4
|
+
data.tar.gz: 27271dcd5f8bdfb77a088ecb74079fc35f351c0ee4e045228b09b25298dc9ec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09ba8fe9fe2f8e36dd4b517ce0156f5f93f1f8dfca5c482dbcb9efbd13c68de2d3fd76ba34942fec7df1fa60972da8ad437c3b3890548b4bd6796d86236b93c7'
|
7
|
+
data.tar.gz: 0dca35baf3269fb0282a093cd937f40362ecf957529b7de8082fc7b94aa2ffff5b72529424bd978defaf84ba2c27d1e4cd64574d16086e22c87f4d81e0bfa9b4
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.52.0 (2025-07-21)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
* Feature - Support `ENV['AWS_BEARER_TOKEN_BEDROCK']` for authentication with Amazon Bedrock APIs.
|
10
|
+
|
4
11
|
1.51.0 (2025-07-16)
|
5
12
|
------------------
|
6
13
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.52.0
|
@@ -31,6 +31,7 @@ require 'aws-sdk-core/plugins/recursion_detection'
|
|
31
31
|
require 'aws-sdk-core/plugins/telemetry'
|
32
32
|
require 'aws-sdk-core/plugins/sign'
|
33
33
|
require 'aws-sdk-core/plugins/protocols/rest_json'
|
34
|
+
require 'aws-sdk-bedrockruntime/plugins/bearer_authorization'
|
34
35
|
require 'aws-sdk-core/plugins/event_stream_configuration'
|
35
36
|
|
36
37
|
Aws::Plugins::GlobalConfiguration.add_identifier(:bedrockruntime)
|
@@ -77,6 +78,7 @@ module Aws::BedrockRuntime
|
|
77
78
|
add_plugin(Aws::Plugins::Telemetry)
|
78
79
|
add_plugin(Aws::Plugins::Sign)
|
79
80
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
81
|
+
add_plugin(Aws::BedrockRuntime::Plugins::BearerAuthorization)
|
80
82
|
add_plugin(Aws::Plugins::EventStreamConfiguration)
|
81
83
|
add_plugin(Aws::BedrockRuntime::Plugins::Endpoints)
|
82
84
|
|
@@ -88,7 +90,7 @@ module Aws::BedrockRuntime
|
|
88
90
|
# class name or an instance of a plugin class.
|
89
91
|
#
|
90
92
|
# @option options [required, Aws::CredentialProvider] :credentials
|
91
|
-
# Your AWS credentials. This can be an instance of any one of the
|
93
|
+
# Your AWS credentials used for authentication. This can be an instance of any one of the
|
92
94
|
# following classes:
|
93
95
|
#
|
94
96
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
@@ -121,18 +123,23 @@ module Aws::BedrockRuntime
|
|
121
123
|
# locations will be searched for credentials:
|
122
124
|
#
|
123
125
|
# * `Aws.config[:credentials]`
|
126
|
+
#
|
124
127
|
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
125
128
|
# `:account_id` options.
|
126
|
-
#
|
127
|
-
#
|
129
|
+
#
|
130
|
+
# * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
|
131
|
+
# `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
|
132
|
+
#
|
128
133
|
# * `~/.aws/credentials`
|
134
|
+
#
|
129
135
|
# * `~/.aws/config`
|
136
|
+
#
|
130
137
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
131
138
|
# are very aggressive. Construct and pass an instance of
|
132
139
|
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
133
140
|
# enable retries and extended timeouts. Instance profile credential
|
134
|
-
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
135
|
-
# to true
|
141
|
+
# fetching can be disabled by setting `ENV['AWS_EC2_METADATA_DISABLED']`
|
142
|
+
# to `true`.
|
136
143
|
#
|
137
144
|
# @option options [required, String] :region
|
138
145
|
# The AWS region to connect to. The configured `:region` is
|
@@ -156,6 +163,11 @@ module Aws::BedrockRuntime
|
|
156
163
|
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
157
164
|
# not retry instead of sleeping.
|
158
165
|
#
|
166
|
+
# @option options [Array<String>] :auth_scheme_preference
|
167
|
+
# A list of preferred authentication schemes to use when making a request. Supported values are:
|
168
|
+
# `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
|
169
|
+
# shared config as `auth_scheme_preference`, the value should be a comma-separated list.
|
170
|
+
#
|
159
171
|
# @option options [Boolean] :convert_params (true)
|
160
172
|
# When `true`, an attempt is made to coerce request parameters into
|
161
173
|
# the required types.
|
@@ -213,8 +225,8 @@ module Aws::BedrockRuntime
|
|
213
225
|
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
214
226
|
#
|
215
227
|
# @option options [String] :profile ("default")
|
216
|
-
# Used when loading credentials from the shared credentials file
|
217
|
-
#
|
228
|
+
# Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
|
229
|
+
# When not specified, 'default' is used.
|
218
230
|
#
|
219
231
|
# @option options [String] :request_checksum_calculation ("when_supported")
|
220
232
|
# Determines when a checksum will be calculated for request payloads. Values are:
|
@@ -327,7 +339,7 @@ module Aws::BedrockRuntime
|
|
327
339
|
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
328
340
|
#
|
329
341
|
# @option options [Aws::TokenProvider] :token_provider
|
330
|
-
#
|
342
|
+
# Your Bearer token used for authentication. This can be an instance of any one of the
|
331
343
|
# following classes:
|
332
344
|
#
|
333
345
|
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
@@ -612,7 +624,7 @@ module Aws::BedrockRuntime
|
|
612
624
|
tracer: tracer
|
613
625
|
)
|
614
626
|
context[:gem_name] = 'aws-sdk-bedrockruntime'
|
615
|
-
context[:gem_version] = '1.
|
627
|
+
context[:gem_version] = '1.52.0'
|
616
628
|
Seahorse::Client::Request.new(handlers, context)
|
617
629
|
end
|
618
630
|
|
@@ -35,6 +35,7 @@ require 'aws-sdk-core/plugins/recursion_detection'
|
|
35
35
|
require 'aws-sdk-core/plugins/telemetry'
|
36
36
|
require 'aws-sdk-core/plugins/sign'
|
37
37
|
require 'aws-sdk-core/plugins/protocols/rest_json'
|
38
|
+
require 'aws-sdk-bedrockruntime/plugins/bearer_authorization'
|
38
39
|
require 'aws-sdk-core/plugins/event_stream_configuration'
|
39
40
|
|
40
41
|
module Aws::BedrockRuntime
|
@@ -86,6 +87,7 @@ module Aws::BedrockRuntime
|
|
86
87
|
add_plugin(Aws::Plugins::Telemetry)
|
87
88
|
add_plugin(Aws::Plugins::Sign)
|
88
89
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
90
|
+
add_plugin(Aws::BedrockRuntime::Plugins::BearerAuthorization)
|
89
91
|
add_plugin(Aws::Plugins::EventStreamConfiguration)
|
90
92
|
add_plugin(Aws::BedrockRuntime::Plugins::Endpoints)
|
91
93
|
|
@@ -97,7 +99,7 @@ module Aws::BedrockRuntime
|
|
97
99
|
# class name or an instance of a plugin class.
|
98
100
|
#
|
99
101
|
# @option options [required, Aws::CredentialProvider] :credentials
|
100
|
-
# Your AWS credentials. This can be an instance of any one of the
|
102
|
+
# Your AWS credentials used for authentication. This can be an instance of any one of the
|
101
103
|
# following classes:
|
102
104
|
#
|
103
105
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
@@ -130,18 +132,23 @@ module Aws::BedrockRuntime
|
|
130
132
|
# locations will be searched for credentials:
|
131
133
|
#
|
132
134
|
# * `Aws.config[:credentials]`
|
135
|
+
#
|
133
136
|
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
134
137
|
# `:account_id` options.
|
135
|
-
#
|
136
|
-
#
|
138
|
+
#
|
139
|
+
# * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
|
140
|
+
# `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
|
141
|
+
#
|
137
142
|
# * `~/.aws/credentials`
|
143
|
+
#
|
138
144
|
# * `~/.aws/config`
|
145
|
+
#
|
139
146
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
140
147
|
# are very aggressive. Construct and pass an instance of
|
141
148
|
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
142
149
|
# enable retries and extended timeouts. Instance profile credential
|
143
|
-
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
144
|
-
# to true
|
150
|
+
# fetching can be disabled by setting `ENV['AWS_EC2_METADATA_DISABLED']`
|
151
|
+
# to `true`.
|
145
152
|
#
|
146
153
|
# @option options [required, String] :region
|
147
154
|
# The AWS region to connect to. The configured `:region` is
|
@@ -169,6 +176,11 @@ module Aws::BedrockRuntime
|
|
169
176
|
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
170
177
|
# not retry instead of sleeping.
|
171
178
|
#
|
179
|
+
# @option options [Array<String>] :auth_scheme_preference
|
180
|
+
# A list of preferred authentication schemes to use when making a request. Supported values are:
|
181
|
+
# `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
|
182
|
+
# shared config as `auth_scheme_preference`, the value should be a comma-separated list.
|
183
|
+
#
|
172
184
|
# @option options [Boolean] :client_side_monitoring (false)
|
173
185
|
# When `true`, client-side metrics will be collected for all API requests from
|
174
186
|
# this client.
|
@@ -264,8 +276,8 @@ module Aws::BedrockRuntime
|
|
264
276
|
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
265
277
|
#
|
266
278
|
# @option options [String] :profile ("default")
|
267
|
-
# Used when loading credentials from the shared credentials file
|
268
|
-
#
|
279
|
+
# Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
|
280
|
+
# When not specified, 'default' is used.
|
269
281
|
#
|
270
282
|
# @option options [String] :request_checksum_calculation ("when_supported")
|
271
283
|
# Determines when a checksum will be calculated for request payloads. Values are:
|
@@ -378,7 +390,7 @@ module Aws::BedrockRuntime
|
|
378
390
|
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
379
391
|
#
|
380
392
|
# @option options [Aws::TokenProvider] :token_provider
|
381
|
-
#
|
393
|
+
# Your Bearer token used for authentication. This can be an instance of any one of the
|
382
394
|
# following classes:
|
383
395
|
#
|
384
396
|
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
@@ -2744,7 +2756,7 @@ module Aws::BedrockRuntime
|
|
2744
2756
|
tracer: tracer
|
2745
2757
|
)
|
2746
2758
|
context[:gem_name] = 'aws-sdk-bedrockruntime'
|
2747
|
-
context[:gem_version] = '1.
|
2759
|
+
context[:gem_version] = '1.52.0'
|
2748
2760
|
Seahorse::Client::Request.new(handlers, context)
|
2749
2761
|
end
|
2750
2762
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws::BedrockRuntime
|
4
|
+
module Plugins
|
5
|
+
# @api private
|
6
|
+
class BearerAuthorization < Seahorse::Client::Plugin
|
7
|
+
def after_initialize(client)
|
8
|
+
return unless (token = ENV['AWS_BEARER_TOKEN_BEDROCK'])
|
9
|
+
|
10
|
+
token_provider = Aws::StaticTokenProvider.new(token)
|
11
|
+
token_provider.metrics = ['BEARER_SERVICE_ENV_VARS']
|
12
|
+
client.config.token_provider ||= token_provider
|
13
|
+
end
|
14
|
+
|
15
|
+
class Handler < Seahorse::Client::Handler
|
16
|
+
def call(context)
|
17
|
+
# This also sets the preferred auth scheme even if the code token has precedence.
|
18
|
+
context[:auth_scheme] = { 'name' => 'bearer' } if ENV['AWS_BEARER_TOKEN_BEDROCK']
|
19
|
+
@handler.call(context)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# After endpoint/auth but before builders.
|
24
|
+
handle(Handler, priority: 60)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/sig/async_client.rbs
CHANGED
data/sig/client.rbs
CHANGED
@@ -18,6 +18,7 @@ module Aws
|
|
18
18
|
?account_id: String,
|
19
19
|
?active_endpoint_cache: bool,
|
20
20
|
?adaptive_retry_wait_to_fill: bool,
|
21
|
+
?auth_scheme_preference: Array[String],
|
21
22
|
?client_side_monitoring: bool,
|
22
23
|
?client_side_monitoring_client_id: String,
|
23
24
|
?client_side_monitoring_host: String,
|
data/sig/resource.rbs
CHANGED
@@ -18,6 +18,7 @@ module Aws
|
|
18
18
|
?account_id: String,
|
19
19
|
?active_endpoint_cache: bool,
|
20
20
|
?adaptive_retry_wait_to_fill: bool,
|
21
|
+
?auth_scheme_preference: Array[String],
|
21
22
|
?client_side_monitoring: bool,
|
22
23
|
?client_side_monitoring_client_id: String,
|
23
24
|
?client_side_monitoring_host: String,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-bedrockruntime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.52.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
version: '3'
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.
|
21
|
+
version: 3.227.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
version: '3'
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: 3.
|
31
|
+
version: 3.227.0
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: aws-sigv4
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/aws-sdk-bedrockruntime/endpoints.rb
|
65
65
|
- lib/aws-sdk-bedrockruntime/errors.rb
|
66
66
|
- lib/aws-sdk-bedrockruntime/event_streams.rb
|
67
|
+
- lib/aws-sdk-bedrockruntime/plugins/bearer_authorization.rb
|
67
68
|
- lib/aws-sdk-bedrockruntime/plugins/endpoints.rb
|
68
69
|
- lib/aws-sdk-bedrockruntime/resource.rb
|
69
70
|
- lib/aws-sdk-bedrockruntime/types.rb
|