aws-sdk-core 3.191.0 → 3.196.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +109 -1
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-core/binary/decode_handler.rb +0 -5
  5. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  6. data/lib/aws-sdk-core/credential_provider.rb +1 -1
  7. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  8. data/lib/aws-sdk-core/ecs_credentials.rb +2 -1
  9. data/lib/aws-sdk-core/event_emitter.rb +0 -16
  10. data/lib/aws-sdk-core/instance_profile_credentials.rb +3 -2
  11. data/lib/aws-sdk-core/json/builder.rb +8 -1
  12. data/lib/aws-sdk-core/json/error_handler.rb +10 -3
  13. data/lib/aws-sdk-core/json/parser.rb +4 -1
  14. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  15. data/lib/aws-sdk-core/param_validator.rb +7 -2
  16. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  17. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -16
  18. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +1 -2
  19. data/lib/aws-sdk-core/plugins/request_compression.rb +1 -1
  20. data/lib/aws-sdk-core/plugins/sign.rb +8 -3
  21. data/lib/aws-sdk-core/plugins/user_agent.rb +3 -2
  22. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  23. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  24. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  25. data/lib/aws-sdk-core/rest/request/content_type.rb +60 -0
  26. data/lib/aws-sdk-core/rest/request/endpoint.rb +22 -4
  27. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  28. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +23 -11
  29. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  30. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  31. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  32. data/lib/aws-sdk-core/rest.rb +1 -0
  33. data/lib/aws-sdk-core/util.rb +39 -0
  34. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  35. data/lib/aws-sdk-core/xml/error_handler.rb +24 -8
  36. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  37. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  38. data/lib/aws-sdk-core.rb +1 -0
  39. data/lib/aws-sdk-sso/client.rb +73 -48
  40. data/lib/aws-sdk-sso.rb +1 -1
  41. data/lib/aws-sdk-ssooidc/client.rb +123 -50
  42. data/lib/aws-sdk-ssooidc/client_api.rb +22 -0
  43. data/lib/aws-sdk-ssooidc/errors.rb +21 -0
  44. data/lib/aws-sdk-ssooidc/types.rb +77 -9
  45. data/lib/aws-sdk-ssooidc.rb +1 -1
  46. data/lib/aws-sdk-sts/client.rb +73 -48
  47. data/lib/aws-sdk-sts/client_api.rb +8 -8
  48. data/lib/aws-sdk-sts.rb +1 -1
  49. data/lib/seahorse/client/async_base.rb +1 -1
  50. data/lib/seahorse/client/async_response.rb +19 -0
  51. data/lib/seahorse/client/base.rb +1 -0
  52. data/lib/seahorse/client/h2/handler.rb +1 -0
  53. data/lib/seahorse/client/net_http/connection_pool.rb +1 -5
  54. data/lib/seahorse/client/plugin.rb +8 -0
  55. data/lib/seahorse/client/plugins/net_http.rb +48 -16
  56. data/lib/seahorse/model/shapes.rb +2 -2
  57. metadata +5 -2
@@ -118,6 +118,13 @@ module Aws::SSOOIDC
118
118
  # that has registered to receive the authorization code.
119
119
  # @return [String]
120
120
  #
121
+ # @!attribute [rw] code_verifier
122
+ # Used only when calling this API for the Authorization Code grant
123
+ # type. This value is generated by the client and presented to
124
+ # validate the original code challenge value the client passed at
125
+ # authorization time.
126
+ # @return [String]
127
+ #
121
128
  # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenRequest AWS API Documentation
122
129
  #
123
130
  class CreateTokenRequest < Struct.new(
@@ -128,14 +135,15 @@ module Aws::SSOOIDC
128
135
  :code,
129
136
  :refresh_token,
130
137
  :scope,
131
- :redirect_uri)
132
- SENSITIVE = [:client_secret, :refresh_token]
138
+ :redirect_uri,
139
+ :code_verifier)
140
+ SENSITIVE = [:client_secret, :refresh_token, :code_verifier]
133
141
  include Aws::Structure
134
142
  end
135
143
 
136
144
  # @!attribute [rw] access_token
137
- # A bearer token to access AWS accounts and applications assigned to a
138
- # user.
145
+ # A bearer token to access Amazon Web Services accounts and
146
+ # applications assigned to a user.
139
147
  # @return [String]
140
148
  #
141
149
  # @!attribute [rw] token_type
@@ -278,6 +286,13 @@ module Aws::SSOOIDC
278
286
  # * Refresh Token - `urn:ietf:params:oauth:token-type:refresh_token`
279
287
  # @return [String]
280
288
  #
289
+ # @!attribute [rw] code_verifier
290
+ # Used only when calling this API for the Authorization Code grant
291
+ # type. This value is generated by the client and presented to
292
+ # validate the original code challenge value the client passed at
293
+ # authorization time.
294
+ # @return [String]
295
+ #
281
296
  # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAMRequest AWS API Documentation
282
297
  #
283
298
  class CreateTokenWithIAMRequest < Struct.new(
@@ -290,14 +305,15 @@ module Aws::SSOOIDC
290
305
  :redirect_uri,
291
306
  :subject_token,
292
307
  :subject_token_type,
293
- :requested_token_type)
294
- SENSITIVE = [:refresh_token, :assertion, :subject_token]
308
+ :requested_token_type,
309
+ :code_verifier)
310
+ SENSITIVE = [:refresh_token, :assertion, :subject_token, :code_verifier]
295
311
  include Aws::Structure
296
312
  end
297
313
 
298
314
  # @!attribute [rw] access_token
299
- # A bearer token to access AWS accounts and applications assigned to a
300
- # user.
315
+ # A bearer token to access Amazon Web Services accounts and
316
+ # applications assigned to a user.
301
317
  # @return [String]
302
318
  #
303
319
  # @!attribute [rw] token_type
@@ -467,6 +483,28 @@ module Aws::SSOOIDC
467
483
  include Aws::Structure
468
484
  end
469
485
 
486
+ # Indicates that one or more redirect URI in the request is not
487
+ # supported for this operation.
488
+ #
489
+ # @!attribute [rw] error
490
+ # Single error code. For this exception the value will be
491
+ # `invalid_redirect_uri`.
492
+ # @return [String]
493
+ #
494
+ # @!attribute [rw] error_description
495
+ # Human-readable text providing additional information, used to assist
496
+ # the client developer in understanding the error that occurred.
497
+ # @return [String]
498
+ #
499
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidRedirectUriException AWS API Documentation
500
+ #
501
+ class InvalidRedirectUriException < Struct.new(
502
+ :error,
503
+ :error_description)
504
+ SENSITIVE = []
505
+ include Aws::Structure
506
+ end
507
+
470
508
  # Indicates that something is wrong with the input to the request. For
471
509
  # example, a required parameter might be missing or out of range.
472
510
  #
@@ -559,12 +597,42 @@ module Aws::SSOOIDC
559
597
  # granting an access token.
560
598
  # @return [Array<String>]
561
599
  #
600
+ # @!attribute [rw] redirect_uris
601
+ # The list of redirect URI that are defined by the client. At
602
+ # completion of authorization, this list is used to restrict what
603
+ # locations the user agent can be redirected back to.
604
+ # @return [Array<String>]
605
+ #
606
+ # @!attribute [rw] grant_types
607
+ # The list of OAuth 2.0 grant types that are defined by the client.
608
+ # This list is used to restrict the token granting flows available to
609
+ # the client.
610
+ # @return [Array<String>]
611
+ #
612
+ # @!attribute [rw] issuer_url
613
+ # The IAM Identity Center Issuer URL associated with an instance of
614
+ # IAM Identity Center. This value is needed for user access to
615
+ # resources through the client.
616
+ # @return [String]
617
+ #
618
+ # @!attribute [rw] entitled_application_arn
619
+ # This IAM Identity Center application ARN is used to define
620
+ # administrator-managed configuration for public client access to
621
+ # resources. At authorization, the scopes, grants, and redirect URI
622
+ # available to this client will be restricted by this application
623
+ # resource.
624
+ # @return [String]
625
+ #
562
626
  # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClientRequest AWS API Documentation
563
627
  #
564
628
  class RegisterClientRequest < Struct.new(
565
629
  :client_name,
566
630
  :client_type,
567
- :scopes)
631
+ :scopes,
632
+ :redirect_uris,
633
+ :grant_types,
634
+ :issuer_url,
635
+ :entitled_application_arn)
568
636
  SENSITIVE = []
569
637
  include Aws::Structure
570
638
  end
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-ssooidc/customizations'
54
54
  # @!group service
55
55
  module Aws::SSOOIDC
56
56
 
57
- GEM_VERSION = '3.191.0'
57
+ GEM_VERSION = '3.196.0'
58
58
 
59
59
  end
@@ -22,6 +22,7 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
22
  require 'aws-sdk-core/plugins/response_paging.rb'
23
23
  require 'aws-sdk-core/plugins/stub_responses.rb'
24
24
  require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/invocation_id.rb'
25
26
  require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
27
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
28
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
@@ -73,6 +74,7 @@ module Aws::STS
73
74
  add_plugin(Aws::Plugins::ResponsePaging)
74
75
  add_plugin(Aws::Plugins::StubResponses)
75
76
  add_plugin(Aws::Plugins::IdempotencyToken)
77
+ add_plugin(Aws::Plugins::InvocationId)
76
78
  add_plugin(Aws::Plugins::JsonvalueConverter)
77
79
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
78
80
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
@@ -198,10 +200,17 @@ module Aws::STS
198
200
  # When set to 'true' the request body will not be compressed
199
201
  # for supported operations.
200
202
  #
201
- # @option options [String] :endpoint
202
- # The client endpoint is normally constructed from the `:region`
203
- # option. You should only configure an `:endpoint` when connecting
204
- # to test or custom endpoints. This should be a valid HTTP(S) URI.
203
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
204
+ # Normally you should not configure the `:endpoint` option
205
+ # directly. This is normally constructed from the `:region`
206
+ # option. Configuring `:endpoint` is normally reserved for
207
+ # connecting to test or custom endpoints. The endpoint should
208
+ # be a URI formatted like:
209
+ #
210
+ # 'http://example.com'
211
+ # 'https://example.com'
212
+ # 'http://example.com:123'
213
+ #
205
214
  #
206
215
  # @option options [Integer] :endpoint_cache_max_entries (1000)
207
216
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -294,8 +303,9 @@ module Aws::STS
294
303
  #
295
304
  # @option options [String] :sdk_ua_app_id
296
305
  # A unique and opaque application ID that is appended to the
297
- # User-Agent header as app/<sdk_ua_app_id>. It should have a
298
- # maximum length of 50.
306
+ # User-Agent header as app/sdk_ua_app_id. It should have a
307
+ # maximum length of 50. This variable is sourced from environment
308
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
299
309
  #
300
310
  # @option options [String] :secret_access_key
301
311
  #
@@ -344,50 +354,65 @@ module Aws::STS
344
354
  # @option options [Aws::STS::EndpointProvider] :endpoint_provider
345
355
  # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::STS::EndpointParameters`
346
356
  #
347
- # @option options [URI::HTTP,String] :http_proxy A proxy to send
348
- # requests through. Formatted like 'http://proxy.com:123'.
349
- #
350
- # @option options [Float] :http_open_timeout (15) The number of
351
- # seconds to wait when opening a HTTP session before raising a
352
- # `Timeout::Error`.
353
- #
354
- # @option options [Float] :http_read_timeout (60) The default
355
- # number of seconds to wait for response data. This value can
356
- # safely be set per-request on the session.
357
- #
358
- # @option options [Float] :http_idle_timeout (5) The number of
359
- # seconds a connection is allowed to sit idle before it is
360
- # considered stale. Stale connections are closed and removed
361
- # from the pool before making a request.
362
- #
363
- # @option options [Float] :http_continue_timeout (1) The number of
364
- # seconds to wait for a 100-continue response before sending the
365
- # request body. This option has no effect unless the request has
366
- # "Expect" header set to "100-continue". Defaults to `nil` which
367
- # disables this behaviour. This value can safely be set per
368
- # request on the session.
369
- #
370
- # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
371
- # in seconds.
357
+ # @option options [Float] :http_continue_timeout (1)
358
+ # The number of seconds to wait for a 100-continue response before sending the
359
+ # request body. This option has no effect unless the request has "Expect"
360
+ # header set to "100-continue". Defaults to `nil` which disables this
361
+ # behaviour. This value can safely be set per request on the session.
362
+ #
363
+ # @option options [Float] :http_idle_timeout (5)
364
+ # The number of seconds a connection is allowed to sit idle before it
365
+ # is considered stale. Stale connections are closed and removed from the
366
+ # pool before making a request.
367
+ #
368
+ # @option options [Float] :http_open_timeout (15)
369
+ # The default number of seconds to wait for response data.
370
+ # This value can safely be set per-request on the session.
371
+ #
372
+ # @option options [URI::HTTP,String] :http_proxy
373
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
374
+ #
375
+ # @option options [Float] :http_read_timeout (60)
376
+ # The default number of seconds to wait for response data.
377
+ # This value can safely be set per-request on the session.
378
+ #
379
+ # @option options [Boolean] :http_wire_trace (false)
380
+ # When `true`, HTTP debug output will be sent to the `:logger`.
381
+ #
382
+ # @option options [Proc] :on_chunk_received
383
+ # When a Proc object is provided, it will be used as callback when each chunk
384
+ # of the response body is received. It provides three arguments: the chunk,
385
+ # the number of bytes received, and the total number of
386
+ # bytes in the response (or nil if the server did not send a `content-length`).
387
+ #
388
+ # @option options [Proc] :on_chunk_sent
389
+ # When a Proc object is provided, it will be used as callback when each chunk
390
+ # of the request body is sent. It provides three arguments: the chunk,
391
+ # the number of bytes read from the body, and the total number of
392
+ # bytes in the body.
393
+ #
394
+ # @option options [Boolean] :raise_response_errors (true)
395
+ # When `true`, response errors are raised.
396
+ #
397
+ # @option options [String] :ssl_ca_bundle
398
+ # Full path to the SSL certificate authority bundle file that should be used when
399
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
400
+ # `:ssl_ca_directory` the the system default will be used if available.
401
+ #
402
+ # @option options [String] :ssl_ca_directory
403
+ # Full path of the directory that contains the unbundled SSL certificate
404
+ # authority files for verifying peer certificates. If you do
405
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
406
+ # default will be used if available.
372
407
  #
373
- # @option options [Boolean] :http_wire_trace (false) When `true`,
374
- # HTTP debug output will be sent to the `:logger`.
408
+ # @option options [String] :ssl_ca_store
409
+ # Sets the X509::Store to verify peer certificate.
375
410
  #
376
- # @option options [Boolean] :ssl_verify_peer (true) When `true`,
377
- # SSL peer certificates are verified when establishing a
378
- # connection.
411
+ # @option options [Float] :ssl_timeout
412
+ # Sets the SSL timeout in seconds
379
413
  #
380
- # @option options [String] :ssl_ca_bundle Full path to the SSL
381
- # certificate authority bundle file that should be used when
382
- # verifying peer certificates. If you do not pass
383
- # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
384
- # will be used if available.
385
- #
386
- # @option options [String] :ssl_ca_directory Full path of the
387
- # directory that contains the unbundled SSL certificate
388
- # authority files for verifying peer certificates. If you do
389
- # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
390
- # system default will be used if available.
414
+ # @option options [Boolean] :ssl_verify_peer (true)
415
+ # When `true`, SSL peer certificates are verified when establishing a connection.
391
416
  #
392
417
  def initialize(*args)
393
418
  super
@@ -2352,7 +2377,7 @@ module Aws::STS
2352
2377
  params: params,
2353
2378
  config: config)
2354
2379
  context[:gem_name] = 'aws-sdk-core'
2355
- context[:gem_version] = '3.191.0'
2380
+ context[:gem_version] = '3.196.0'
2356
2381
  Seahorse::Client::Request.new(handlers, context)
2357
2382
  end
2358
2383
 
@@ -24,7 +24,7 @@ module Aws::STS
24
24
  Credentials = Shapes::StructureShape.new(name: 'Credentials')
25
25
  DecodeAuthorizationMessageRequest = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageRequest')
26
26
  DecodeAuthorizationMessageResponse = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageResponse')
27
- ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
27
+ ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException', error: {"code"=>"ExpiredTokenException", "httpStatusCode"=>400, "senderFault"=>true})
28
28
  FederatedUser = Shapes::StructureShape.new(name: 'FederatedUser')
29
29
  GetAccessKeyInfoRequest = Shapes::StructureShape.new(name: 'GetAccessKeyInfoRequest')
30
30
  GetAccessKeyInfoResponse = Shapes::StructureShape.new(name: 'GetAccessKeyInfoResponse')
@@ -34,18 +34,18 @@ module Aws::STS
34
34
  GetFederationTokenResponse = Shapes::StructureShape.new(name: 'GetFederationTokenResponse')
35
35
  GetSessionTokenRequest = Shapes::StructureShape.new(name: 'GetSessionTokenRequest')
36
36
  GetSessionTokenResponse = Shapes::StructureShape.new(name: 'GetSessionTokenResponse')
37
- IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException')
38
- IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException')
39
- InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException')
40
- InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException')
37
+ IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException', error: {"code"=>"IDPCommunicationError", "httpStatusCode"=>400, "senderFault"=>true})
38
+ IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException', error: {"code"=>"IDPRejectedClaim", "httpStatusCode"=>403, "senderFault"=>true})
39
+ InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException', error: {"code"=>"InvalidAuthorizationMessageException", "httpStatusCode"=>400, "senderFault"=>true})
40
+ InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException', error: {"code"=>"InvalidIdentityToken", "httpStatusCode"=>400, "senderFault"=>true})
41
41
  Issuer = Shapes::StringShape.new(name: 'Issuer')
42
- MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException')
42
+ MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException', error: {"code"=>"MalformedPolicyDocument", "httpStatusCode"=>400, "senderFault"=>true})
43
43
  NameQualifier = Shapes::StringShape.new(name: 'NameQualifier')
44
- PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException')
44
+ PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException', error: {"code"=>"PackedPolicyTooLarge", "httpStatusCode"=>400, "senderFault"=>true})
45
45
  PolicyDescriptorType = Shapes::StructureShape.new(name: 'PolicyDescriptorType')
46
46
  ProvidedContext = Shapes::StructureShape.new(name: 'ProvidedContext')
47
47
  ProvidedContextsListType = Shapes::ListShape.new(name: 'ProvidedContextsListType')
48
- RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException')
48
+ RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException', error: {"code"=>"RegionDisabledException", "httpStatusCode"=>403, "senderFault"=>true})
49
49
  SAMLAssertionType = Shapes::StringShape.new(name: 'SAMLAssertionType')
50
50
  Subject = Shapes::StringShape.new(name: 'Subject')
51
51
  SubjectType = Shapes::StringShape.new(name: 'SubjectType')
data/lib/aws-sdk-sts.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sts/customizations'
54
54
  # @!group service
55
55
  module Aws::STS
56
56
 
57
- GEM_VERSION = '3.191.0'
57
+ GEM_VERSION = '3.196.0'
58
58
 
59
59
  end
@@ -5,12 +5,12 @@ module Seahorse
5
5
  class AsyncBase < Seahorse::Client::Base
6
6
 
7
7
  # default H2 plugins
8
+ # @api private
8
9
  @plugins = PluginList.new([
9
10
  Plugins::Endpoint,
10
11
  Plugins::H2,
11
12
  Plugins::ResponseTarget
12
13
  ])
13
-
14
14
  def initialize(plugins, options)
15
15
  super
16
16
  @connection = H2::Connection.new(options)
@@ -12,24 +12,43 @@ module Seahorse
12
12
  @sync_queue = options[:sync_queue]
13
13
  end
14
14
 
15
+ # @return [RequestContext]
15
16
  def context
16
17
  @response.context
17
18
  end
18
19
 
20
+ # @return [StandardError, nil]
19
21
  def error
20
22
  @response.error
21
23
  end
22
24
 
25
+ # @overload on(status_code, &block)
26
+ # @param [Integer] status_code The block will be
27
+ # triggered only for responses with the given status code.
28
+ #
29
+ # @overload on(status_code_range, &block)
30
+ # @param [Range<Integer>] status_code_range The block will be
31
+ # triggered only for responses with a status code that falls
32
+ # witin the given range.
33
+ #
34
+ # @return [self]
23
35
  def on(range, &block)
24
36
  @response.on(range, &block)
25
37
  self
26
38
  end
27
39
 
40
+ # @api private
28
41
  def on_complete(&block)
29
42
  @response.on_complete(&block)
30
43
  self
31
44
  end
32
45
 
46
+ # @return [Boolean] Returns `true` if the response is complete with
47
+ # no error.
48
+ def successful?
49
+ @response.error.nil?
50
+ end
51
+
33
52
  def wait
34
53
  if error && context.config.raise_response_errors
35
54
  raise error
@@ -9,6 +9,7 @@ module Seahorse
9
9
  include HandlerBuilder
10
10
 
11
11
  # default plugins
12
+ # @api private
12
13
  @plugins = PluginList.new([
13
14
  Plugins::Endpoint,
14
15
  Plugins::NetHttp,
@@ -126,6 +126,7 @@ module Seahorse
126
126
  # https://http2.github.io/http2-spec/#rfc.section.8.1.2.3
127
127
  def _h2_headers(req)
128
128
  headers = {}
129
+ headers[':authority'] = req.endpoint.host
129
130
  headers[':method'] = req.http_method.upcase
130
131
  headers[':scheme'] = req.endpoint.scheme
131
132
  headers[':path'] = req.endpoint.path.empty? ? '/' : req.endpoint.path
@@ -119,11 +119,7 @@ module Seahorse
119
119
  # pool, not counting those currently in use.
120
120
  def size
121
121
  @pool_mutex.synchronize do
122
- size = 0
123
- @pool.each_pair do |endpoint,sessions|
124
- size += sessions.size
125
- end
126
- size
122
+ @pool.values.flatten.size
127
123
  end
128
124
  end
129
125
 
@@ -111,7 +111,15 @@ module Seahorse
111
111
 
112
112
  def initialize(name, options = {})
113
113
  @name = name
114
+ # prevent unstable object shapes by ensuring
115
+ # order and presence of instance variables
116
+ @default = nil
117
+ @default_block = nil
118
+ @required = nil
119
+ @doc_type = nil
114
120
  @doc_default = nil
121
+ @docstring = nil
122
+ @rbs_type = nil
115
123
  options.each_pair do |opt_name, opt_value|
116
124
  self.send("#{opt_name}=", opt_value)
117
125
  end
@@ -7,34 +7,66 @@ module Seahorse
7
7
  module Plugins
8
8
  class NetHttp < Plugin
9
9
 
10
- option(:http_proxy, default: nil, doc_type: String, docstring: '')
11
-
12
- option(:http_open_timeout, default: 15, doc_type: Integer, docstring: '') do |cfg|
10
+ option(:http_proxy, default: nil, doc_type: "URI::HTTP,String", docstring: <<-DOCS)
11
+ A proxy to send requests through. Formatted like 'http://proxy.com:123'.
12
+ DOCS
13
+
14
+ option(:http_open_timeout, default: 15, doc_type: Float, docstring: <<-DOCS) do |cfg|
15
+ The default number of seconds to wait for response data.
16
+ This value can safely be set per-request on the session.
17
+ DOCS
13
18
  resolve_http_open_timeout(cfg)
14
19
  end
15
20
 
16
- option(:http_read_timeout, default: 60, doc_type: Integer, docstring: '') do |cfg|
21
+ option(:http_read_timeout, default: 60, doc_type: Float, docstring: <<-DOCS) do |cfg|
22
+ The default number of seconds to wait for response data.
23
+ This value can safely be set per-request on the session.
24
+ DOCS
17
25
  resolve_http_read_timeout(cfg)
18
26
  end
19
27
 
20
- option(:http_idle_timeout, default: 5, doc_type: Integer, docstring: '')
21
-
22
- option(:http_continue_timeout, default: 1, doc_type: Integer, docstring: '')
23
-
24
- option(:http_wire_trace, default: false, doc_type: 'Boolean', docstring: '')
25
-
26
- option(:ssl_verify_peer, default: true, doc_type: 'Boolean', docstring: '')
27
-
28
- option(:ssl_ca_bundle, doc_type: String, docstring: '') do |cfg|
28
+ option(:http_idle_timeout, default: 5, doc_type: Float, docstring: <<-DOCS)
29
+ The number of seconds a connection is allowed to sit idle before it
30
+ is considered stale. Stale connections are closed and removed from the
31
+ pool before making a request.
32
+ DOCS
33
+
34
+ option(:http_continue_timeout, default: 1, doc_type: Float, docstring: <<-DOCS)
35
+ The number of seconds to wait for a 100-continue response before sending the
36
+ request body. This option has no effect unless the request has "Expect"
37
+ header set to "100-continue". Defaults to `nil` which disables this
38
+ behaviour. This value can safely be set per request on the session.
39
+ DOCS
40
+
41
+ option(:http_wire_trace, default: false, doc_type: 'Boolean', docstring: <<-DOCS)
42
+ When `true`, HTTP debug output will be sent to the `:logger`.
43
+ DOCS
44
+
45
+ option(:ssl_verify_peer, default: true, doc_type: 'Boolean', docstring: <<-DOCS)
46
+ When `true`, SSL peer certificates are verified when establishing a connection.
47
+ DOCS
48
+
49
+ option(:ssl_ca_bundle, doc_type: String, docstring: <<-DOCS) do |cfg|
50
+ Full path to the SSL certificate authority bundle file that should be used when
51
+ verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
52
+ `:ssl_ca_directory` the the system default will be used if available.
53
+ DOCS
29
54
  ENV['AWS_CA_BUNDLE'] ||
30
55
  Aws.shared_config.ca_bundle(profile: cfg.profile) if cfg.respond_to?(:profile)
31
56
  end
32
57
 
33
- option(:ssl_ca_directory, default: nil, doc_type: String, docstring: '')
58
+ option(:ssl_ca_directory, default: nil, doc_type: String, docstring: <<-DOCS)
59
+ Full path of the directory that contains the unbundled SSL certificate
60
+ authority files for verifying peer certificates. If you do
61
+ not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
62
+ default will be used if available.
63
+ DOCS
34
64
 
35
- option(:ssl_ca_store, default: nil, doc_type: String, docstring: '')
65
+ option(:ssl_ca_store, default: nil, doc_type: String, docstring: <<-DOCS)
66
+ Sets the X509::Store to verify peer certificate.
67
+ DOCS
36
68
 
37
- option(:ssl_timeout, default: nil, doc_type: Float, docstring: '') do |cfg|
69
+ option(:ssl_timeout, default: nil, doc_type: Float, docstring: 'Sets the SSL timeout in seconds') do |cfg|
38
70
  resolve_ssl_timeout(cfg)
39
71
  end
40
72
 
@@ -75,7 +75,7 @@ module Seahorse
75
75
 
76
76
  # @return [String, nil]
77
77
  def location_name
78
- @location_name || (shape && shape[:location_name])
78
+ @location_name || (shape && shape['locationName'])
79
79
  end
80
80
 
81
81
  def location_name= location_name
@@ -86,7 +86,7 @@ module Seahorse
86
86
  def [](key)
87
87
  if @metadata.key?(key.to_s)
88
88
  @metadata[key.to_s]
89
- else
89
+ elsif @shape
90
90
  @shape[key.to_s]
91
91
  end
92
92
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.191.0
4
+ version: 3.196.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-26 00:00:00.000000000 Z
11
+ date: 2024-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -151,6 +151,7 @@ files:
151
151
  - lib/aws-sdk-core/log/handler.rb
152
152
  - lib/aws-sdk-core/log/param_filter.rb
153
153
  - lib/aws-sdk-core/log/param_formatter.rb
154
+ - lib/aws-sdk-core/lru_cache.rb
154
155
  - lib/aws-sdk-core/pageable_response.rb
155
156
  - lib/aws-sdk-core/pager.rb
156
157
  - lib/aws-sdk-core/param_converter.rb
@@ -212,10 +213,12 @@ files:
212
213
  - lib/aws-sdk-core/rest/handler.rb
213
214
  - lib/aws-sdk-core/rest/request/body.rb
214
215
  - lib/aws-sdk-core/rest/request/builder.rb
216
+ - lib/aws-sdk-core/rest/request/content_type.rb
215
217
  - lib/aws-sdk-core/rest/request/endpoint.rb
216
218
  - lib/aws-sdk-core/rest/request/headers.rb
217
219
  - lib/aws-sdk-core/rest/request/querystring_builder.rb
218
220
  - lib/aws-sdk-core/rest/response/body.rb
221
+ - lib/aws-sdk-core/rest/response/header_list_parser.rb
219
222
  - lib/aws-sdk-core/rest/response/headers.rb
220
223
  - lib/aws-sdk-core/rest/response/parser.rb
221
224
  - lib/aws-sdk-core/rest/response/status_code.rb