aws-sdk-core 3.197.0 → 3.220.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 (139) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +297 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +1 -2
  5. data/lib/aws-defaults.rb +4 -1
  6. data/lib/aws-sdk-core/arn.rb +1 -3
  7. data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
  8. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
  9. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -4
  10. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  11. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  12. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  13. data/lib/aws-sdk-core/cbor/decoder.rb +308 -0
  14. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  15. data/lib/aws-sdk-core/cbor.rb +53 -0
  16. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  17. data/lib/aws-sdk-core/client_stubs.rb +8 -7
  18. data/lib/aws-sdk-core/credential_provider_chain.rb +13 -6
  19. data/lib/aws-sdk-core/credentials.rb +13 -6
  20. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  21. data/lib/aws-sdk-core/endpoints/matchers.rb +6 -9
  22. data/lib/aws-sdk-core/endpoints.rb +74 -18
  23. data/lib/aws-sdk-core/error_handler.rb +41 -0
  24. data/lib/aws-sdk-core/errors.rb +9 -0
  25. data/lib/aws-sdk-core/json/error_handler.rb +8 -9
  26. data/lib/aws-sdk-core/json/handler.rb +6 -6
  27. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  28. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  29. data/lib/aws-sdk-core/json/parser.rb +2 -0
  30. data/lib/aws-sdk-core/json.rb +43 -14
  31. data/lib/aws-sdk-core/log/param_filter.rb +2 -2
  32. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  33. data/lib/aws-sdk-core/log.rb +10 -0
  34. data/lib/aws-sdk-core/param_validator.rb +1 -1
  35. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  36. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -169
  37. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
  38. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  39. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  40. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  41. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  42. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  43. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  44. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +4 -3
  45. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +5 -1
  46. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  47. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -25
  48. data/lib/aws-sdk-core/plugins/retry_errors.rb +0 -1
  49. data/lib/aws-sdk-core/plugins/sign.rb +13 -11
  50. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  51. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  52. data/lib/aws-sdk-core/plugins/stub_responses.rb +29 -2
  53. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  54. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  55. data/lib/aws-sdk-core/plugins/user_agent.rb +26 -8
  56. data/lib/aws-sdk-core/plugins.rb +39 -0
  57. data/lib/aws-sdk-core/process_credentials.rb +47 -28
  58. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  59. data/lib/aws-sdk-core/query/handler.rb +4 -4
  60. data/lib/aws-sdk-core/query.rb +2 -1
  61. data/lib/aws-sdk-core/resources.rb +8 -0
  62. data/lib/aws-sdk-core/rest/{request/content_type.rb → content_type_handler.rb} +1 -1
  63. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  64. data/lib/aws-sdk-core/rest/request/endpoint.rb +3 -1
  65. data/lib/aws-sdk-core/rest/request/headers.rb +2 -2
  66. data/lib/aws-sdk-core/rest.rb +1 -1
  67. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  68. data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
  69. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
  70. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +85 -0
  71. data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
  72. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  73. data/lib/aws-sdk-core/rpc_v2.rb +69 -0
  74. data/lib/aws-sdk-core/shared_config.rb +7 -2
  75. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  76. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  77. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  78. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  79. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  80. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  81. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  82. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  83. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
  84. data/lib/aws-sdk-core/stubbing.rb +22 -0
  85. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  86. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  87. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  88. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  89. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  90. data/lib/aws-sdk-core/telemetry.rb +78 -0
  91. data/lib/aws-sdk-core/waiters/poller.rb +9 -4
  92. data/lib/aws-sdk-core/xml/error_handler.rb +11 -37
  93. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  94. data/lib/aws-sdk-core.rb +82 -108
  95. data/lib/aws-sdk-sso/client.rb +99 -37
  96. data/lib/aws-sdk-sso/client_api.rb +7 -0
  97. data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
  98. data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
  99. data/lib/aws-sdk-sso/endpoints.rb +2 -54
  100. data/lib/aws-sdk-sso/plugins/endpoints.rb +19 -20
  101. data/lib/aws-sdk-sso/types.rb +1 -0
  102. data/lib/aws-sdk-sso.rb +15 -11
  103. data/lib/aws-sdk-ssooidc/client.rb +123 -55
  104. data/lib/aws-sdk-ssooidc/client_api.rb +5 -0
  105. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
  106. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  107. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
  108. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +19 -20
  109. data/lib/aws-sdk-ssooidc/types.rb +21 -15
  110. data/lib/aws-sdk-ssooidc.rb +15 -11
  111. data/lib/aws-sdk-sts/client.rb +307 -89
  112. data/lib/aws-sdk-sts/client_api.rb +28 -2
  113. data/lib/aws-sdk-sts/customizations.rb +5 -1
  114. data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
  115. data/lib/aws-sdk-sts/endpoint_provider.rb +33 -38
  116. data/lib/aws-sdk-sts/endpoints.rb +2 -118
  117. data/lib/aws-sdk-sts/errors.rb +16 -0
  118. data/lib/aws-sdk-sts/plugins/endpoints.rb +19 -28
  119. data/lib/aws-sdk-sts/types.rb +171 -28
  120. data/lib/aws-sdk-sts.rb +15 -11
  121. data/lib/seahorse/client/base.rb +17 -7
  122. data/lib/seahorse/client/h2/handler.rb +13 -3
  123. data/lib/seahorse/client/handler.rb +1 -1
  124. data/lib/seahorse/client/net_http/connection_pool.rb +10 -2
  125. data/lib/seahorse/client/net_http/handler.rb +21 -9
  126. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  127. data/lib/seahorse/client/plugins/net_http.rb +9 -0
  128. data/lib/seahorse/client/request_context.rb +8 -1
  129. data/lib/seahorse/client/response.rb +2 -0
  130. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  131. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  132. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  133. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  134. metadata +62 -18
  135. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  136. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  137. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  138. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  139. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -15,11 +15,11 @@ module Aws::SSOOIDC
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::SSOOIDC::EndpointProvider',
17
17
  rbs_type: 'untyped',
18
- docstring: 'The endpoint provider used to resolve endpoints. Any '\
19
- 'object that responds to `#resolve_endpoint(parameters)` '\
20
- 'where `parameters` is a Struct similar to '\
21
- '`Aws::SSOOIDC::EndpointParameters`'
22
- ) do |cfg|
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::SSOOIDC::EndpointParameters`.
22
+ DOCS
23
23
  Aws::SSOOIDC::EndpointProvider.new
24
24
  end
25
25
 
@@ -27,7 +27,7 @@ module Aws::SSOOIDC
27
27
  class Handler < Seahorse::Client::Handler
28
28
  def call(context)
29
29
  unless context[:discovered_endpoint]
30
- params = parameters_for_operation(context)
30
+ params = Aws::SSOOIDC::Endpoints.parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
@@ -40,11 +40,23 @@ module Aws::SSOOIDC
40
40
  context[:auth_scheme] =
41
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
42
42
 
43
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
44
44
  end
45
45
 
46
46
  private
47
47
 
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
48
60
  def apply_endpoint_headers(context, headers)
49
61
  headers.each do |key, values|
50
62
  value = values
@@ -55,19 +67,6 @@ module Aws::SSOOIDC
55
67
  context.http_request.headers[key] = value
56
68
  end
57
69
  end
58
-
59
- def parameters_for_operation(context)
60
- case context.operation_name
61
- when :create_token
62
- Aws::SSOOIDC::Endpoints::CreateToken.build(context)
63
- when :create_token_with_iam
64
- Aws::SSOOIDC::Endpoints::CreateTokenWithIAM.build(context)
65
- when :register_client
66
- Aws::SSOOIDC::Endpoints::RegisterClient.build(context)
67
- when :start_device_authorization
68
- Aws::SSOOIDC::Endpoints::StartDeviceAuthorization.build(context)
69
- end
70
- end
71
70
  end
72
71
 
73
72
  def add_handlers(handlers, _config)
@@ -64,34 +64,32 @@ module Aws::SSOOIDC
64
64
  # @return [String]
65
65
  #
66
66
  # @!attribute [rw] grant_type
67
- # Supports the following OAuth grant types: Device Code and Refresh
68
- # Token. Specify either of the following values, depending on the
69
- # grant type that you want:
67
+ # Supports the following OAuth grant types: Authorization Code, Device
68
+ # Code, and Refresh Token. Specify one of the following values,
69
+ # depending on the grant type that you want:
70
+ #
71
+ # * Authorization Code - `authorization_code`
70
72
  #
71
73
  # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
72
74
  #
73
75
  # * Refresh Token - `refresh_token`
74
- #
75
- # For information about how to obtain the device code, see the
76
- # StartDeviceAuthorization topic.
77
76
  # @return [String]
78
77
  #
79
78
  # @!attribute [rw] device_code
80
79
  # Used only when calling this API for the Device Code grant type. This
81
- # short-term code is used to identify this authorization request. This
82
- # comes from the result of the StartDeviceAuthorization API.
80
+ # short-lived code is used to identify this authorization request.
81
+ # This comes from the result of the StartDeviceAuthorization API.
83
82
  # @return [String]
84
83
  #
85
84
  # @!attribute [rw] code
86
85
  # Used only when calling this API for the Authorization Code grant
87
- # type. The short-term code is used to identify this authorization
88
- # request. This grant type is currently unsupported for the
89
- # CreateToken API.
86
+ # type. The short-lived code is used to identify this authorization
87
+ # request.
90
88
  # @return [String]
91
89
  #
92
90
  # @!attribute [rw] refresh_token
93
91
  # Used only when calling this API for the Refresh Token grant type.
94
- # This token is used to refresh short-term tokens, such as the access
92
+ # This token is used to refresh short-lived tokens, such as the access
95
93
  # token, that might expire.
96
94
  #
97
95
  # For more information about the features and limitations of the
@@ -217,7 +215,7 @@ module Aws::SSOOIDC
217
215
  #
218
216
  # @!attribute [rw] code
219
217
  # Used only when calling this API for the Authorization Code grant
220
- # type. This short-term code is used to identify this authorization
218
+ # type. This short-lived code is used to identify this authorization
221
219
  # request. The code is obtained through a redirect from IAM Identity
222
220
  # Center to a redirect URI persisted in the Authorization Code
223
221
  # GrantOptions for the application.
@@ -225,7 +223,7 @@ module Aws::SSOOIDC
225
223
  #
226
224
  # @!attribute [rw] refresh_token
227
225
  # Used only when calling this API for the Refresh Token grant type.
228
- # This token is used to refresh short-term tokens, such as the access
226
+ # This token is used to refresh short-lived tokens, such as the access
229
227
  # token, that might expire.
230
228
  #
231
229
  # For more information about the features and limitations of the
@@ -606,7 +604,14 @@ module Aws::SSOOIDC
606
604
  # @!attribute [rw] grant_types
607
605
  # The list of OAuth 2.0 grant types that are defined by the client.
608
606
  # This list is used to restrict the token granting flows available to
609
- # the client.
607
+ # the client. Supports the following OAuth 2.0 grant types:
608
+ # Authorization Code, Device Code, and Refresh Token.
609
+ #
610
+ # * Authorization Code - `authorization_code`
611
+ #
612
+ # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
613
+ #
614
+ # * Refresh Token - `refresh_token`
610
615
  # @return [Array<String>]
611
616
  #
612
617
  # @!attribute [rw] issuer_url
@@ -821,3 +826,4 @@ module Aws::SSOOIDC
821
826
 
822
827
  end
823
828
  end
829
+
@@ -13,16 +13,7 @@ unless Module.const_defined?(:Aws)
13
13
  require 'aws-sigv4'
14
14
  end
15
15
 
16
- require_relative 'aws-sdk-ssooidc/types'
17
- require_relative 'aws-sdk-ssooidc/client_api'
18
- require_relative 'aws-sdk-ssooidc/plugins/endpoints.rb'
19
- require_relative 'aws-sdk-ssooidc/client'
20
- require_relative 'aws-sdk-ssooidc/errors'
21
- require_relative 'aws-sdk-ssooidc/resource'
22
- require_relative 'aws-sdk-ssooidc/endpoint_parameters'
23
- require_relative 'aws-sdk-ssooidc/endpoint_provider'
24
- require_relative 'aws-sdk-ssooidc/endpoints'
25
- require_relative 'aws-sdk-ssooidc/customizations'
16
+ Aws::Plugins::GlobalConfiguration.add_identifier(:ssooidc)
26
17
 
27
18
  # This module provides support for AWS SSO OIDC. This module is available in the
28
19
  # `aws-sdk-core` gem.
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-ssooidc/customizations'
53
44
  #
54
45
  # @!group service
55
46
  module Aws::SSOOIDC
47
+ autoload :Types, 'aws-sdk-ssooidc/types'
48
+ autoload :ClientApi, 'aws-sdk-ssooidc/client_api'
49
+ module Plugins
50
+ autoload :Endpoints, 'aws-sdk-ssooidc/plugins/endpoints.rb'
51
+ end
52
+ autoload :Client, 'aws-sdk-ssooidc/client'
53
+ autoload :Errors, 'aws-sdk-ssooidc/errors'
54
+ autoload :Resource, 'aws-sdk-ssooidc/resource'
55
+ autoload :EndpointParameters, 'aws-sdk-ssooidc/endpoint_parameters'
56
+ autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
+ autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
56
58
 
57
- GEM_VERSION = '3.197.0'
59
+ GEM_VERSION = '3.220.0'
58
60
 
59
61
  end
62
+
63
+ require_relative 'aws-sdk-ssooidc/customizations'