aws-sdk-bedrock 1.54.0 → 1.55.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-bedrock/client.rb +21 -9
- data/lib/aws-sdk-bedrock/plugins/bearer_authorization.rb +27 -0
- data/lib/aws-sdk-bedrock.rb +1 -1
- 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: 80ce78828c6fa954091fe546d14fc37a85f8526ef2fc129b5bba05da53962b0c
|
4
|
+
data.tar.gz: 30f053e7dfb0d294a59595885683bfc1e3e1b4dfd6d22318a7f74e15d49fe2e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec62f19bb69071e4c3813944dba6d61a3ee31658c9e1fba0124e9398ba4da149314c145b09084b7fcc2af4fa65a458c4506d12eab6041a66c37374d8f64beafc
|
7
|
+
data.tar.gz: c5611eeb71fce56e3c1b238fa10251570e3ec04133b13af5977718229c8a56c5461951fbba9120040e44082b79d5a7f4d49fb3fb6bbff422b461a175bcb6ac9a
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.55.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.54.0 (2025-07-16)
|
5
12
|
------------------
|
6
13
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.55.0
|
@@ -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-bedrock/plugins/bearer_authorization'
|
38
39
|
|
39
40
|
module Aws::Bedrock
|
40
41
|
# An API client for Bedrock. To construct a client, you need to configure a `:region` and `:credentials`.
|
@@ -85,6 +86,7 @@ module Aws::Bedrock
|
|
85
86
|
add_plugin(Aws::Plugins::Telemetry)
|
86
87
|
add_plugin(Aws::Plugins::Sign)
|
87
88
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
89
|
+
add_plugin(Aws::Bedrock::Plugins::BearerAuthorization)
|
88
90
|
add_plugin(Aws::Bedrock::Plugins::Endpoints)
|
89
91
|
|
90
92
|
# @overload initialize(options)
|
@@ -95,7 +97,7 @@ module Aws::Bedrock
|
|
95
97
|
# class name or an instance of a plugin class.
|
96
98
|
#
|
97
99
|
# @option options [required, Aws::CredentialProvider] :credentials
|
98
|
-
# Your AWS credentials. This can be an instance of any one of the
|
100
|
+
# Your AWS credentials used for authentication. This can be an instance of any one of the
|
99
101
|
# following classes:
|
100
102
|
#
|
101
103
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
@@ -128,18 +130,23 @@ module Aws::Bedrock
|
|
128
130
|
# locations will be searched for credentials:
|
129
131
|
#
|
130
132
|
# * `Aws.config[:credentials]`
|
133
|
+
#
|
131
134
|
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
132
135
|
# `:account_id` options.
|
133
|
-
#
|
134
|
-
#
|
136
|
+
#
|
137
|
+
# * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
|
138
|
+
# `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
|
139
|
+
#
|
135
140
|
# * `~/.aws/credentials`
|
141
|
+
#
|
136
142
|
# * `~/.aws/config`
|
143
|
+
#
|
137
144
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
138
145
|
# are very aggressive. Construct and pass an instance of
|
139
146
|
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
140
147
|
# enable retries and extended timeouts. Instance profile credential
|
141
|
-
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
142
|
-
# to true
|
148
|
+
# fetching can be disabled by setting `ENV['AWS_EC2_METADATA_DISABLED']`
|
149
|
+
# to `true`.
|
143
150
|
#
|
144
151
|
# @option options [required, String] :region
|
145
152
|
# The AWS region to connect to. The configured `:region` is
|
@@ -167,6 +174,11 @@ module Aws::Bedrock
|
|
167
174
|
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
168
175
|
# not retry instead of sleeping.
|
169
176
|
#
|
177
|
+
# @option options [Array<String>] :auth_scheme_preference
|
178
|
+
# A list of preferred authentication schemes to use when making a request. Supported values are:
|
179
|
+
# `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
|
180
|
+
# shared config as `auth_scheme_preference`, the value should be a comma-separated list.
|
181
|
+
#
|
170
182
|
# @option options [Boolean] :client_side_monitoring (false)
|
171
183
|
# When `true`, client-side metrics will be collected for all API requests from
|
172
184
|
# this client.
|
@@ -253,8 +265,8 @@ module Aws::Bedrock
|
|
253
265
|
# 4 times. Used in `standard` and `adaptive` retry modes.
|
254
266
|
#
|
255
267
|
# @option options [String] :profile ("default")
|
256
|
-
# Used when loading credentials from the shared credentials file
|
257
|
-
#
|
268
|
+
# Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
|
269
|
+
# When not specified, 'default' is used.
|
258
270
|
#
|
259
271
|
# @option options [String] :request_checksum_calculation ("when_supported")
|
260
272
|
# Determines when a checksum will be calculated for request payloads. Values are:
|
@@ -367,7 +379,7 @@ module Aws::Bedrock
|
|
367
379
|
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
368
380
|
#
|
369
381
|
# @option options [Aws::TokenProvider] :token_provider
|
370
|
-
#
|
382
|
+
# Your Bearer token used for authentication. This can be an instance of any one of the
|
371
383
|
# following classes:
|
372
384
|
#
|
373
385
|
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
@@ -5741,7 +5753,7 @@ module Aws::Bedrock
|
|
5741
5753
|
tracer: tracer
|
5742
5754
|
)
|
5743
5755
|
context[:gem_name] = 'aws-sdk-bedrock'
|
5744
|
-
context[:gem_version] = '1.
|
5756
|
+
context[:gem_version] = '1.55.0'
|
5745
5757
|
Seahorse::Client::Request.new(handlers, context)
|
5746
5758
|
end
|
5747
5759
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws::Bedrock
|
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/lib/aws-sdk-bedrock.rb
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-bedrock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.55.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
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- lib/aws-sdk-bedrock/endpoint_provider.rb
|
63
63
|
- lib/aws-sdk-bedrock/endpoints.rb
|
64
64
|
- lib/aws-sdk-bedrock/errors.rb
|
65
|
+
- lib/aws-sdk-bedrock/plugins/bearer_authorization.rb
|
65
66
|
- lib/aws-sdk-bedrock/plugins/endpoints.rb
|
66
67
|
- lib/aws-sdk-bedrock/resource.rb
|
67
68
|
- lib/aws-sdk-bedrock/types.rb
|