aws-sdk-core 3.265.0 → 3.267.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8516c7b01f0db8c447079f16dc6194cfb7946271b929d1d26d770de75f8149ab
4
- data.tar.gz: 96e33c08458de24eb3a480dfcebcc7dfc792554dd273ff95d401fe925ea27424
3
+ metadata.gz: 14d69a27c6e9ab4d821838bda1ea44d24fbfeef46e957a4f635da7f252308370
4
+ data.tar.gz: f94300ec6c2781db55bf7acc7f67307ff9f5a25935e659760fcfa6a00182e3f0
5
5
  SHA512:
6
- metadata.gz: 2f6055ceab696dc4e43df077da9229ddd68e6cc79765ca11766f31487e51932d39dcd2de2f0e9ca2f7dab9639519f54e74db8ba9ee2aab486a58e9fd9d99440d
7
- data.tar.gz: ab07f8326345fc599f281df1aa345b1feb67037f846ef847595cf0872288bb785aac22b6cefe2034beb3deca3433ec3149b3bbeca25885451598381e52d33957
6
+ metadata.gz: c982cee56307d55c6ff1b23692e7f63ffd4f6898a131c641e98aaab0a896ca712fc1b45380618eb8669cfae2a2b5a5d9c1fb878acfbc951efd7a663318d6ce0c
7
+ data.tar.gz: bf509f3108e92cfe72fd05851cb23dbdd0506cd1256eb7cc001b494debeaa0e1d892be44f41abcb3cc8eed05ca795ba4ae445ae021a50fd47282044e20a661d9
data/CHANGELOG.md CHANGED
@@ -1,6 +1,28 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.267.0 (2026-11-10)
5
+ ------------------
6
+
7
+ * Feature - Updated Aws::STS::Client with the latest API changes.
8
+
9
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
10
+
11
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
12
+
13
+ * Feature - Updated Aws::Signin::Client with the latest API changes.
14
+
15
+ * Feature - AWS SDK clients now use `standard` retry mode by default, providing consistent retry quotas and backoff behavior across AWS services. To continue using the previous behavior, set the client's `retry_mode` to `legacy` or set `AWS_RETRY_MODE=legacy`. The `AWS_NEW_RETRIES_2026` environment variable is no longer used.
16
+
17
+ 3.266.0 (2026-11-09)
18
+ ------------------
19
+
20
+ * Feature - Updated Aws::Signin::Client with the latest API changes.
21
+
22
+ * Feature - Adds the CreateBearerToken API, which exchanges your IAM credentials for a bearer token that can be used to access supported AWS services.
23
+
24
+ * Feature - Reduce memory allocations when streaming request bodies with checksum trailers while preserving compatibility with custom IO bodies.
25
+
4
26
  3.265.0 (2026-11-06)
5
27
  ------------------
6
28
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.265.0
1
+ 3.267.0
@@ -335,7 +335,8 @@ module Aws
335
335
  when 'header'
336
336
  apply_request_checksum(context, headers, checksum_properties)
337
337
  when 'trailer'
338
- apply_request_trailer_checksum(context, headers, checksum_properties)
338
+ buffer_enabled = context.http_request.buffer_supported?
339
+ apply_request_trailer_checksum(context, headers, checksum_properties, buffer_enabled)
339
340
  else
340
341
  # nothing
341
342
  end
@@ -385,7 +386,7 @@ module Aws
385
386
  io.rewind
386
387
  end
387
388
 
388
- def apply_request_trailer_checksum(context, headers, checksum_properties)
389
+ def apply_request_trailer_checksum(context, headers, checksum_properties, buffer_enabled)
389
390
  location_name = checksum_properties[:name]
390
391
 
391
392
  # set required headers
@@ -410,6 +411,7 @@ module Aws
410
411
  context.http_request.body =
411
412
  AwsChunkedTrailerDigestIO.new(
412
413
  io: context.http_request.body,
414
+ buffer_enabled: buffer_enabled,
413
415
  algorithm: checksum_properties[:algorithm],
414
416
  location_name: location_name
415
417
  )
@@ -484,6 +486,7 @@ module Aws
484
486
  HEX_BASE = 16
485
487
 
486
488
  def initialize(options = {})
489
+ buffer_enabled = options.delete(:buffer_enabled) || false
487
490
  @io = options.delete(:io)
488
491
  @io.rewind if @io.respond_to?(:rewind)
489
492
  @location_name = options.delete(:location_name)
@@ -492,6 +495,8 @@ module Aws
492
495
  @chunk_size = Thread.current[:net_http_override_body_stream_chunk] || DEFAULT_TRAILER_CHUNK_SIZE
493
496
  @overhead_bytes = calculate_overhead(@chunk_size)
494
497
  @base_chunk_size = @chunk_size - @overhead_bytes
498
+ @chunk = ''.b
499
+ @read_chunk = method(buffer_enabled ? :read_chunk_with_buffer : :read_chunk_without_buffer)
495
500
  @encoded_buffer = +''
496
501
  @eof = false
497
502
  end
@@ -527,8 +532,9 @@ module Aws
527
532
 
528
533
  fill_encoded_buffer(length)
529
534
 
530
- if length
531
- output_buffer << @encoded_buffer.slice!(0, length)
535
+ if length && length < @encoded_buffer.bytesize
536
+ output_buffer << @encoded_buffer.byteslice(0, length)
537
+ @encoded_buffer = @encoded_buffer.byteslice(length, @encoded_buffer.bytesize - length)
532
538
  else
533
539
  output_buffer << @encoded_buffer
534
540
  @encoded_buffer.clear
@@ -547,16 +553,24 @@ module Aws
547
553
  chunk_size.to_s(HEX_BASE).size + CHUNK_OVERHEAD
548
554
  end
549
555
 
556
+ def read_chunk_with_buffer
557
+ @io.read(@base_chunk_size, @chunk)
558
+ end
559
+
560
+ def read_chunk_without_buffer
561
+ @io.read(@base_chunk_size)
562
+ end
563
+
550
564
  def fill_encoded_buffer(required_length)
551
565
  return if required_length && @encoded_buffer.bytesize >= required_length
552
566
 
553
567
  while !@eof && fill_data?(required_length)
554
- chunk = @io.read(@base_chunk_size)
568
+ chunk = @read_chunk.call
555
569
  if chunk && !chunk.empty?
556
570
  @digest.update(chunk)
557
- @encoded_buffer << "#{chunk.bytesize.to_s(HEX_BASE)}\r\n#{chunk}\r\n"
571
+ @encoded_buffer << chunk.bytesize.to_s(HEX_BASE) << "\r\n" << chunk << "\r\n"
558
572
  else
559
- @encoded_buffer << "0\r\n#{trailer_string}\r\n\r\n"
573
+ @encoded_buffer << "0\r\n" << trailer_string << "\r\n\r\n"
560
574
  @eof = true
561
575
  end
562
576
  end
@@ -9,10 +9,8 @@ module Aws
9
9
  class RetryQuota
10
10
  INITIAL_RETRY_TOKENS = 500
11
11
  RETRY_COST = 14
12
- LEGACY_RETRY_COST = 5 # TODO: Remove when new retries become default
13
12
  NO_RETRY_INCREMENT = 1
14
13
  THROTTLING_RETRY_COST = 5
15
- TIMEOUT_RETRY_COST = 10 # TODO: Remove when new retries become default
16
14
 
17
15
  def initialize(opts = {})
18
16
  @mutex = Mutex.new
@@ -26,12 +24,8 @@ module Aws
26
24
  # @return [Integer] The amount of capacity checked out
27
25
  def checkout_capacity(error_inspector)
28
26
  @mutex.synchronize do
29
- # TODO: Remove gate and keep only the new_retries branch
30
- capacity_amount = if RetryErrors.new_retries?
31
- error_inspector.throttling_error? ? THROTTLING_RETRY_COST : RETRY_COST
32
- else
33
- error_inspector.networking? ? TIMEOUT_RETRY_COST : LEGACY_RETRY_COST
34
- end
27
+ capacity_amount =
28
+ error_inspector.throttling_error? ? THROTTLING_RETRY_COST : RETRY_COST
35
29
 
36
30
  # unable to acquire capacity
37
31
  return 0 if capacity_amount > @available_capacity
@@ -43,7 +37,7 @@ module Aws
43
37
 
44
38
  # capacity_amount refers to the amount of capacity requested from
45
39
  # the last retry. It can either be RETRY_COST,
46
- # THROTTLING_RETRY_COST/TIMEOUT_RETRY_COST, or unset.
40
+ # THROTTLING_RETRY_COST, or unset.
47
41
  def release(capacity_amount)
48
42
  # Implementation note: The release() method is called for
49
43
  # every API call. In the common case where the request is
@@ -96,18 +96,18 @@ module Aws
96
96
 
97
97
  option(
98
98
  :retry_mode,
99
- default: 'legacy', # TODO: Change to 'standard' when new retries become default
99
+ default: 'standard',
100
100
  doc_type: String,
101
101
  rbs_type: '("legacy" | "standard" | "adaptive")',
102
102
  docstring: <<~DOCS) do |cfg|
103
103
  Specifies which retry algorithm to use. Values are:
104
104
 
105
- * `legacy` - The pre-existing retry behavior. This is the default
106
- value if no retry mode is provided.
105
+ * `legacy` - The pre-existing retry behavior.
107
106
 
108
107
  * `standard` - A standardized set of retry rules across the AWS SDKs.
109
108
  This includes support for retry quotas, which limit the number of
110
- unsuccessful retries a client can make.
109
+ unsuccessful retries a client can make. This is the default value
110
+ if no retry mode is provided.
111
111
 
112
112
  * `adaptive` - A retry mode that includes all the functionality of
113
113
  `standard` mode along with automatic client side throttling.
@@ -123,7 +123,8 @@ module Aws
123
123
  An integer representing the maximum number attempts that will be made for
124
124
  a single request, including the initial attempt. For example,
125
125
  setting this value to 5 will result in a request being retried up to
126
- 4 times. Used in `standard` and `adaptive` retry modes.
126
+ 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
127
+ except for DynamoDB and DynamoDB Streams, which default to 4.
127
128
  DOCS
128
129
  resolve_max_attempts(cfg)
129
130
  end
@@ -187,17 +188,6 @@ module Aws
187
188
  end
188
189
  end
189
190
 
190
- # TODO: Remove this gate and hardcode new retry behavior once
191
- # AWS_NEW_RETRIES_2026 is enabled by default, which includes:
192
- # - Default retry_mode to 'standard'
193
- # - Default max_attempts to 4 for DynamoDB
194
- # - Remove the old retries branch in Handler#call
195
- # - Remove the old retries branch in #exponential_backoff
196
- # - Remove LEGACY_RETRY_COST and TIMEOUT_RETRY_COST from RetryQuota
197
- def new_retries?
198
- ENV.fetch('AWS_NEW_RETRIES_2026', 'false').downcase == 'true'
199
- end
200
-
201
191
  def resolve_retry_mode(cfg)
202
192
  default_mode_value =
203
193
  if cfg.respond_to?(:defaults_mode_config_resolver)
@@ -207,7 +197,7 @@ module Aws
207
197
  value = ENV['AWS_RETRY_MODE'] ||
208
198
  Aws.shared_config.retry_mode(profile: cfg.profile) ||
209
199
  default_mode_value ||
210
- (new_retries? ? 'standard' : 'legacy') # TODO: default to 'standard' when new retries become default
200
+ 'standard'
211
201
  # Raise if provided value is not one of the retry modes
212
202
  if value != 'legacy' && value != 'standard' && value != 'adaptive'
213
203
  raise ArgumentError,
@@ -235,9 +225,6 @@ module Aws
235
225
  end
236
226
 
237
227
  def default_max_attempts(cfg)
238
- # TODO: Remove gate and keep only the new retries branch
239
- return 3 unless new_retries?
240
-
241
228
  service_id = cfg.api.metadata['serviceId'] if cfg.respond_to?(:api)
242
229
  DYNAMODB_SERVICES.include?(service_id) ? 4 : 3
243
230
  end
@@ -338,31 +325,21 @@ module Aws
338
325
  capacity_amount = config.retry_quota.checkout_capacity(error_inspector)
339
326
  context.metadata[:retries][:capacity_amount] = capacity_amount
340
327
 
341
- # TODO: Remove gate and keep only the new retries branch
342
- if new_retries?
343
- return response if capacity_amount <= 0 && !long_polling_operation?(context)
328
+ # Long polling operations back off even once the retry quota is
329
+ # depleted, so the delay is applied before the capacity check.
330
+ return response if capacity_amount <= 0 && !long_polling_operation?(context)
344
331
 
345
- service_id = context.config.api.metadata['serviceId']
346
- delay = backoff(context, error_inspector, service_id)
347
- Kernel.sleep(delay)
332
+ service_id = context.config.api.metadata['serviceId']
333
+ delay = backoff(context, error_inspector, service_id)
334
+ Kernel.sleep(delay)
348
335
 
349
- return response if capacity_amount <= 0
350
- else
351
- return response unless capacity_amount > 0
352
-
353
- delay = exponential_backoff(context.retries)
354
- Kernel.sleep(delay)
355
- end
336
+ return response if capacity_amount <= 0
356
337
 
357
338
  retry_request(context, error_inspector)
358
339
  end
359
340
 
360
341
  private
361
342
 
362
- def new_retries?
363
- RetryErrors.new_retries?
364
- end
365
-
366
343
  # True when clock skew correction is turned off. The fallback
367
344
  # correct_clock_skew option is folded in by the option resolver.
368
345
  def clock_skew_correction_disabled?(config)
@@ -427,20 +404,15 @@ module Aws
427
404
  [backoff_duration, exp_backoff + 5].min
428
405
  end
429
406
 
430
- # TODO: Remove gate, remove default nil params, keep only new retries branch
431
- def exponential_backoff(retries, error_inspector = nil, service_id = nil)
432
- if new_retries?
433
- backoff_scalar = if error_inspector.throttling_error?
434
- 1
435
- elsif DYNAMODB_SERVICES.include?(service_id)
436
- 0.025
437
- else
438
- 0.05
439
- end
440
- Kernel.rand * [backoff_scalar * 2**retries, MAX_BACKOFF].min
441
- else
442
- [Kernel.rand * 2**retries, MAX_BACKOFF].min
443
- end
407
+ def exponential_backoff(retries, error_inspector, service_id)
408
+ backoff_scalar = if error_inspector.throttling_error?
409
+ 1
410
+ elsif DYNAMODB_SERVICES.include?(service_id)
411
+ 0.025
412
+ else
413
+ 0.05
414
+ end
415
+ Kernel.rand * [backoff_scalar * 2**retries, MAX_BACKOFF].min
444
416
  end
445
417
 
446
418
  def parse_retry_after(context)
@@ -264,7 +264,8 @@ module Aws::Signin
264
264
  # An integer representing the maximum number attempts that will be made for
265
265
  # a single request, including the initial attempt. For example,
266
266
  # setting this value to 5 will result in a request being retried up to
267
- # 4 times. Used in `standard` and `adaptive` retry modes.
267
+ # 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
268
+ # except for DynamoDB and DynamoDB Streams, which default to 4.
268
269
  #
269
270
  # @option options [String] :profile ("default")
270
271
  # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
@@ -327,15 +328,15 @@ module Aws::Signin
327
328
  # used by the default backoff function. This option is only used in the
328
329
  # `legacy` retry mode.
329
330
  #
330
- # @option options [String] :retry_mode ("legacy")
331
+ # @option options [String] :retry_mode ("standard")
331
332
  # Specifies which retry algorithm to use. Values are:
332
333
  #
333
- # * `legacy` - The pre-existing retry behavior. This is the default
334
- # value if no retry mode is provided.
334
+ # * `legacy` - The pre-existing retry behavior.
335
335
  #
336
336
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
337
337
  # This includes support for retry quotas, which limit the number of
338
- # unsuccessful retries a client can make.
338
+ # unsuccessful retries a client can make. This is the default value
339
+ # if no retry mode is provided.
339
340
  #
340
341
  # * `adaptive` - A retry mode that includes all the functionality of
341
342
  # `standard` mode along with automatic client side throttling.
@@ -481,6 +482,50 @@ module Aws::Signin
481
482
 
482
483
  # @!group API Operations
483
484
 
485
+ # Creates a bearer token that represents your IAM credentials and can be
486
+ # used to access a supported AWS service. By default, the token is valid
487
+ # for 12 hours.
488
+ #
489
+ # @option params [required, String] :grant_type
490
+ # The grant type. Must be "client\_credentials".
491
+ #
492
+ # @option params [required, String] :resource
493
+ # The AWS service the bearer token is for. Example: "ecr.amazonaws.com".
494
+ #
495
+ # @option params [Integer] :duration_seconds
496
+ # The requested token lifetime in seconds, from 300 (5 minutes) up to
497
+ # the maximum allowed for the service, currently 43200 (12 hours). If
498
+ # omitted, the token is valid for 12 hours.
499
+ #
500
+ # @return [Types::CreateBearerTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
501
+ #
502
+ # * {Types::CreateBearerTokenResponse#access_token #access_token} => String
503
+ # * {Types::CreateBearerTokenResponse#token_type #token_type} => String
504
+ # * {Types::CreateBearerTokenResponse#expires_in #expires_in} => Integer
505
+ #
506
+ # @example Request syntax with placeholder values
507
+ #
508
+ # resp = client.create_bearer_token({
509
+ # grant_type: "ClientCredentialsGrantType", # required
510
+ # resource: "Resource", # required
511
+ # duration_seconds: 1,
512
+ # })
513
+ #
514
+ # @example Response structure
515
+ #
516
+ # resp.access_token #=> String
517
+ # resp.token_type #=> String
518
+ # resp.expires_in #=> Integer
519
+ #
520
+ # @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateBearerToken AWS API Documentation
521
+ #
522
+ # @overload create_bearer_token(params = {})
523
+ # @param [Hash] params ({})
524
+ def create_bearer_token(params = {}, options = {})
525
+ req = build_request(:create_bearer_token, params)
526
+ req.send_request(options)
527
+ end
528
+
484
529
  # Exchanges an authorization code or refresh token for an OAuth 2.0
485
530
  # access token and refresh token.
486
531
  #
@@ -991,7 +1036,7 @@ module Aws::Signin
991
1036
  tracer: tracer
992
1037
  )
993
1038
  context[:gem_name] = 'aws-sdk-core'
994
- context[:gem_version] = '3.265.0'
1039
+ context[:gem_version] = '3.267.0'
995
1040
  Seahorse::Client::Request.new(handlers, context)
996
1041
  end
997
1042
 
@@ -18,6 +18,7 @@ module Aws::Signin
18
18
  AccessToken = Shapes::StructureShape.new(name: 'AccessToken')
19
19
  AccountId = Shapes::StringShape.new(name: 'AccountId')
20
20
  AuthorizationCode = Shapes::StringShape.new(name: 'AuthorizationCode')
21
+ BearerTokenExpiresIn = Shapes::IntegerShape.new(name: 'BearerTokenExpiresIn')
21
22
  BearerTokenType = Shapes::StringShape.new(name: 'BearerTokenType')
22
23
  Boolean = Shapes::BooleanShape.new(name: 'Boolean')
23
24
  ClientCredentialsGrantType = Shapes::StringShape.new(name: 'ClientCredentialsGrantType')
@@ -30,6 +31,8 @@ module Aws::Signin
30
31
  ConditionValues = Shapes::ListShape.new(name: 'ConditionValues')
31
32
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
32
33
  ConsolePermissionMaxResults = Shapes::IntegerShape.new(name: 'ConsolePermissionMaxResults')
34
+ CreateBearerTokenRequest = Shapes::StructureShape.new(name: 'CreateBearerTokenRequest')
35
+ CreateBearerTokenResponse = Shapes::StructureShape.new(name: 'CreateBearerTokenResponse')
33
36
  CreateOAuth2TokenRequest = Shapes::StructureShape.new(name: 'CreateOAuth2TokenRequest')
34
37
  CreateOAuth2TokenRequestBody = Shapes::StructureShape.new(name: 'CreateOAuth2TokenRequestBody')
35
38
  CreateOAuth2TokenResponse = Shapes::StructureShape.new(name: 'CreateOAuth2TokenResponse')
@@ -94,6 +97,7 @@ module Aws::Signin
94
97
  SubjectToken = Shapes::StringShape.new(name: 'SubjectToken')
95
98
  SubjectTokenType = Shapes::StringShape.new(name: 'SubjectTokenType')
96
99
  TargetId = Shapes::StringShape.new(name: 'TargetId')
100
+ TokenDuration = Shapes::IntegerShape.new(name: 'TokenDuration')
97
101
  TokenExchangeGrantType = Shapes::StringShape.new(name: 'TokenExchangeGrantType')
98
102
  TokenExpiresIn = Shapes::IntegerShape.new(name: 'TokenExpiresIn')
99
103
  TokenType = Shapes::StringShape.new(name: 'TokenType')
@@ -123,6 +127,16 @@ module Aws::Signin
123
127
  ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
124
128
  ConflictException.struct_class = Types::ConflictException
125
129
 
130
+ CreateBearerTokenRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: ClientCredentialsGrantType, required: true, location_name: "grant_type"))
131
+ CreateBearerTokenRequest.add_member(:resource, Shapes::ShapeRef.new(shape: Resource, required: true, location_name: "resource"))
132
+ CreateBearerTokenRequest.add_member(:duration_seconds, Shapes::ShapeRef.new(shape: TokenDuration, location_name: "duration"))
133
+ CreateBearerTokenRequest.struct_class = Types::CreateBearerTokenRequest
134
+
135
+ CreateBearerTokenResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: OAuthAccessToken, required: true, location_name: "access_token"))
136
+ CreateBearerTokenResponse.add_member(:token_type, Shapes::ShapeRef.new(shape: BearerTokenType, required: true, location_name: "token_type"))
137
+ CreateBearerTokenResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: BearerTokenExpiresIn, required: true, location_name: "expires_in"))
138
+ CreateBearerTokenResponse.struct_class = Types::CreateBearerTokenResponse
139
+
126
140
  CreateOAuth2TokenRequest.add_member(:token_input, Shapes::ShapeRef.new(shape: CreateOAuth2TokenRequestBody, required: true, location_name: "tokenInput"))
127
141
  CreateOAuth2TokenRequest.struct_class = Types::CreateOAuth2TokenRequest
128
142
  CreateOAuth2TokenRequest[:payload] = :token_input
@@ -326,6 +340,18 @@ module Aws::Signin
326
340
  "uid" => "signin-2023-01-01",
327
341
  }
328
342
 
343
+ api.add_operation(:create_bearer_token, Seahorse::Model::Operation.new.tap do |o|
344
+ o.name = "CreateBearerToken"
345
+ o.http_method = "POST"
346
+ o.http_request_uri = "/v1/token?x-amz-token-request-type=bearer"
347
+ o.input = Shapes::ShapeRef.new(shape: CreateBearerTokenRequest)
348
+ o.output = Shapes::ShapeRef.new(shape: CreateBearerTokenResponse)
349
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsError)
350
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
351
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
352
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
353
+ end)
354
+
329
355
  api.add_operation(:create_o_auth_2_token, Seahorse::Model::Operation.new.tap do |o|
330
356
  o.name = "CreateOAuth2Token"
331
357
  o.http_method = "POST"
@@ -12,6 +12,15 @@ module Aws::Signin
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
+ class CreateBearerToken
16
+ def self.build(context)
17
+ Aws::Signin::EndpointParameters.create(
18
+ context.config,
19
+ is_o_auth_endpoint: true,
20
+ )
21
+ end
22
+ end
23
+
15
24
  class CreateOAuth2TokenWithIAM
16
25
  def self.build(context)
17
26
  Aws::Signin::EndpointParameters.create(
@@ -114,6 +123,8 @@ module Aws::Signin
114
123
 
115
124
  def self.parameters_for_operation(context)
116
125
  case context.operation_name
126
+ when :create_bearer_token
127
+ CreateBearerToken.build(context)
117
128
  when :create_o_auth_2_token_with_iam
118
129
  CreateOAuth2TokenWithIAM.build(context)
119
130
  when :create_o_auth_2_token_with_token_exchange
@@ -79,6 +79,60 @@ module Aws::Signin
79
79
  include Aws::Structure
80
80
  end
81
81
 
82
+ # Input structure for CreateBearerToken operation
83
+ #
84
+ # @!attribute [rw] grant_type
85
+ # The grant type. Must be "client\_credentials".
86
+ # @return [String]
87
+ #
88
+ # @!attribute [rw] resource
89
+ # The AWS service the bearer token is for. Example:
90
+ # "ecr.amazonaws.com".
91
+ # @return [String]
92
+ #
93
+ # @!attribute [rw] duration_seconds
94
+ # The requested token lifetime in seconds, from 300 (5 minutes) up to
95
+ # the maximum allowed for the service, currently 43200 (12 hours). If
96
+ # omitted, the token is valid for 12 hours.
97
+ # @return [Integer]
98
+ #
99
+ # @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateBearerTokenRequest AWS API Documentation
100
+ #
101
+ class CreateBearerTokenRequest < Struct.new(
102
+ :grant_type,
103
+ :resource,
104
+ :duration_seconds)
105
+ SENSITIVE = []
106
+ include Aws::Structure
107
+ end
108
+
109
+ # Output structure for CreateBearerToken operation
110
+ #
111
+ # Contains the bearer token, its type, and its lifetime.
112
+ #
113
+ # @!attribute [rw] access_token
114
+ # The bearer token. Present it to the AWS service named in the
115
+ # request.
116
+ # @return [String]
117
+ #
118
+ # @!attribute [rw] token_type
119
+ # The token type. Always "Bearer".
120
+ # @return [String]
121
+ #
122
+ # @!attribute [rw] expires_in
123
+ # Token lifetime in seconds.
124
+ # @return [Integer]
125
+ #
126
+ # @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateBearerTokenResponse AWS API Documentation
127
+ #
128
+ class CreateBearerTokenResponse < Struct.new(
129
+ :access_token,
130
+ :token_type,
131
+ :expires_in)
132
+ SENSITIVE = [:access_token]
133
+ include Aws::Structure
134
+ end
135
+
82
136
  # Input structure for CreateOAuth2Token operation
83
137
  #
84
138
  # Contains flattened token operation inputs for both authorization code
@@ -25,7 +25,7 @@ Aws::Plugins::GlobalConfiguration.add_identifier(:signin)
25
25
  # structure.
26
26
  #
27
27
  # signin = Aws::Signin::Client.new
28
- # resp = signin.create_o_auth_2_token(params)
28
+ # resp = signin.create_bearer_token(params)
29
29
  #
30
30
  # See {Client} for more information.
31
31
  #
@@ -56,7 +56,7 @@ module Aws::Signin
56
56
  autoload :EndpointProvider, 'aws-sdk-signin/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-signin/endpoints'
58
58
 
59
- GEM_VERSION = '3.265.0'
59
+ GEM_VERSION = '3.267.0'
60
60
 
61
61
  end
62
62
 
@@ -264,7 +264,8 @@ module Aws::SSO
264
264
  # An integer representing the maximum number attempts that will be made for
265
265
  # a single request, including the initial attempt. For example,
266
266
  # setting this value to 5 will result in a request being retried up to
267
- # 4 times. Used in `standard` and `adaptive` retry modes.
267
+ # 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
268
+ # except for DynamoDB and DynamoDB Streams, which default to 4.
268
269
  #
269
270
  # @option options [String] :profile ("default")
270
271
  # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
@@ -327,15 +328,15 @@ module Aws::SSO
327
328
  # used by the default backoff function. This option is only used in the
328
329
  # `legacy` retry mode.
329
330
  #
330
- # @option options [String] :retry_mode ("legacy")
331
+ # @option options [String] :retry_mode ("standard")
331
332
  # Specifies which retry algorithm to use. Values are:
332
333
  #
333
- # * `legacy` - The pre-existing retry behavior. This is the default
334
- # value if no retry mode is provided.
334
+ # * `legacy` - The pre-existing retry behavior.
335
335
  #
336
336
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
337
337
  # This includes support for retry quotas, which limit the number of
338
- # unsuccessful retries a client can make.
338
+ # unsuccessful retries a client can make. This is the default value
339
+ # if no retry mode is provided.
339
340
  #
340
341
  # * `adaptive` - A retry mode that includes all the functionality of
341
342
  # `standard` mode along with automatic client side throttling.
@@ -703,7 +704,7 @@ module Aws::SSO
703
704
  tracer: tracer
704
705
  )
705
706
  context[:gem_name] = 'aws-sdk-core'
706
- context[:gem_version] = '3.265.0'
707
+ context[:gem_version] = '3.267.0'
707
708
  Seahorse::Client::Request.new(handlers, context)
708
709
  end
709
710
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.265.0'
59
+ GEM_VERSION = '3.267.0'
60
60
 
61
61
  end
62
62
 
@@ -264,7 +264,8 @@ module Aws::SSOOIDC
264
264
  # An integer representing the maximum number attempts that will be made for
265
265
  # a single request, including the initial attempt. For example,
266
266
  # setting this value to 5 will result in a request being retried up to
267
- # 4 times. Used in `standard` and `adaptive` retry modes.
267
+ # 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
268
+ # except for DynamoDB and DynamoDB Streams, which default to 4.
268
269
  #
269
270
  # @option options [String] :profile ("default")
270
271
  # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
@@ -327,15 +328,15 @@ module Aws::SSOOIDC
327
328
  # used by the default backoff function. This option is only used in the
328
329
  # `legacy` retry mode.
329
330
  #
330
- # @option options [String] :retry_mode ("legacy")
331
+ # @option options [String] :retry_mode ("standard")
331
332
  # Specifies which retry algorithm to use. Values are:
332
333
  #
333
- # * `legacy` - The pre-existing retry behavior. This is the default
334
- # value if no retry mode is provided.
334
+ # * `legacy` - The pre-existing retry behavior.
335
335
  #
336
336
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
337
337
  # This includes support for retry quotas, which limit the number of
338
- # unsuccessful retries a client can make.
338
+ # unsuccessful retries a client can make. This is the default value
339
+ # if no retry mode is provided.
339
340
  #
340
341
  # * `adaptive` - A retry mode that includes all the functionality of
341
342
  # `standard` mode along with automatic client side throttling.
@@ -1086,7 +1087,7 @@ module Aws::SSOOIDC
1086
1087
  tracer: tracer
1087
1088
  )
1088
1089
  context[:gem_name] = 'aws-sdk-core'
1089
- context[:gem_version] = '3.265.0'
1090
+ context[:gem_version] = '3.267.0'
1090
1091
  Seahorse::Client::Request.new(handlers, context)
1091
1092
  end
1092
1093
 
@@ -56,7 +56,7 @@ module Aws::SSOOIDC
56
56
  autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
58
58
 
59
- GEM_VERSION = '3.265.0'
59
+ GEM_VERSION = '3.267.0'
60
60
 
61
61
  end
62
62
 
@@ -266,7 +266,8 @@ module Aws::STS
266
266
  # An integer representing the maximum number attempts that will be made for
267
267
  # a single request, including the initial attempt. For example,
268
268
  # setting this value to 5 will result in a request being retried up to
269
- # 4 times. Used in `standard` and `adaptive` retry modes.
269
+ # 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
270
+ # except for DynamoDB and DynamoDB Streams, which default to 4.
270
271
  #
271
272
  # @option options [String] :profile ("default")
272
273
  # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
@@ -329,15 +330,15 @@ module Aws::STS
329
330
  # used by the default backoff function. This option is only used in the
330
331
  # `legacy` retry mode.
331
332
  #
332
- # @option options [String] :retry_mode ("legacy")
333
+ # @option options [String] :retry_mode ("standard")
333
334
  # Specifies which retry algorithm to use. Values are:
334
335
  #
335
- # * `legacy` - The pre-existing retry behavior. This is the default
336
- # value if no retry mode is provided.
336
+ # * `legacy` - The pre-existing retry behavior.
337
337
  #
338
338
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
339
339
  # This includes support for retry quotas, which limit the number of
340
- # unsuccessful retries a client can make.
340
+ # unsuccessful retries a client can make. This is the default value
341
+ # if no retry mode is provided.
341
342
  #
342
343
  # * `adaptive` - A retry mode that includes all the functionality of
343
344
  # `standard` mode along with automatic client side throttling.
@@ -2807,7 +2808,7 @@ module Aws::STS
2807
2808
  tracer: tracer
2808
2809
  )
2809
2810
  context[:gem_name] = 'aws-sdk-core'
2810
- context[:gem_version] = '3.265.0'
2811
+ context[:gem_version] = '3.267.0'
2811
2812
  Seahorse::Client::Request.new(handlers, context)
2812
2813
  end
2813
2814
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::STS
56
56
  autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sts/endpoints'
58
58
 
59
- GEM_VERSION = '3.265.0'
59
+ GEM_VERSION = '3.267.0'
60
60
 
61
61
  end
62
62
 
@@ -55,8 +55,16 @@ module Seahorse
55
55
  contents
56
56
  end
57
57
 
58
+ # @api private
59
+ def buffer_supported?
60
+ return @buffer_enabled unless @buffer_enabled.nil?
61
+
62
+ @buffer_enabled = detect_read_buffer_support
63
+ end
64
+
58
65
  # @param [#read, #size, #rewind] io
59
66
  def body=(io)
67
+ @buffer_enabled = nil
60
68
  @body = case io
61
69
  when nil then StringIO.new('')
62
70
  when String then StringIO.new(io)
@@ -64,6 +72,17 @@ module Seahorse
64
72
  end
65
73
  end
66
74
 
75
+ private
76
+
77
+ # Only probe ArgumentError falls back. Payload errors must propagate.
78
+ def detect_read_buffer_support
79
+ buffer = "\0".b
80
+ @body.read(0, buffer)
81
+ buffer.empty?
82
+ rescue ArgumentError
83
+ false
84
+ end
85
+
67
86
  end
68
87
  end
69
88
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.265.0
4
+ version: 3.267.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services