aws-sdk-core 3.181.0 → 3.209.1

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 (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +413 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults.rb +4 -1
  5. data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
  6. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
  7. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
  8. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  9. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  10. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  11. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  12. data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
  13. data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
  14. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  15. data/lib/aws-sdk-core/cbor.rb +106 -0
  16. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  17. data/lib/aws-sdk-core/client_stubs.rb +18 -14
  18. data/lib/aws-sdk-core/credential_provider.rb +1 -1
  19. data/lib/aws-sdk-core/credential_provider_chain.rb +13 -6
  20. data/lib/aws-sdk-core/credentials.rb +13 -6
  21. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  22. data/lib/aws-sdk-core/ecs_credentials.rb +78 -11
  23. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  24. data/lib/aws-sdk-core/endpoints/matchers.rb +18 -10
  25. data/lib/aws-sdk-core/endpoints.rb +74 -18
  26. data/lib/aws-sdk-core/error_handler.rb +41 -0
  27. data/lib/aws-sdk-core/errors.rb +12 -3
  28. data/lib/aws-sdk-core/event_emitter.rb +0 -16
  29. data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
  30. data/lib/aws-sdk-core/json/builder.rb +8 -1
  31. data/lib/aws-sdk-core/json/error_handler.rb +15 -10
  32. data/lib/aws-sdk-core/json/handler.rb +12 -6
  33. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  34. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  35. data/lib/aws-sdk-core/json/parser.rb +33 -3
  36. data/lib/aws-sdk-core/json.rb +43 -14
  37. data/lib/aws-sdk-core/log/param_filter.rb +2 -2
  38. data/lib/aws-sdk-core/log.rb +10 -0
  39. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  40. data/lib/aws-sdk-core/pageable_response.rb +1 -1
  41. data/lib/aws-sdk-core/param_validator.rb +9 -4
  42. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  43. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +6 -3
  44. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
  45. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  46. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +9 -3
  47. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  48. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
  49. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  50. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  51. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  52. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  53. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  54. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  55. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  56. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  57. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  58. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +33 -3
  59. data/lib/aws-sdk-core/plugins/request_compression.rb +11 -2
  60. data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
  61. data/lib/aws-sdk-core/plugins/sign.rb +27 -15
  62. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  63. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  64. data/lib/aws-sdk-core/plugins/stub_responses.rb +30 -2
  65. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  66. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  67. data/lib/aws-sdk-core/plugins/user_agent.rb +70 -26
  68. data/lib/aws-sdk-core/plugins.rb +39 -0
  69. data/lib/aws-sdk-core/process_credentials.rb +47 -28
  70. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  71. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  72. data/lib/aws-sdk-core/query/handler.rb +4 -4
  73. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  74. data/lib/aws-sdk-core/query.rb +2 -1
  75. data/lib/aws-sdk-core/refreshing_credentials.rb +12 -6
  76. data/lib/aws-sdk-core/resources.rb +8 -0
  77. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  78. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  79. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  80. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  81. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  82. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
  83. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  84. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  85. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  86. data/lib/aws-sdk-core/rest.rb +1 -0
  87. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  88. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
  89. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
  90. data/lib/aws-sdk-core/rpc_v2/handler.rb +78 -0
  91. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  92. data/lib/aws-sdk-core/rpc_v2.rb +6 -0
  93. data/lib/aws-sdk-core/shared_config.rb +7 -2
  94. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  95. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  96. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +41 -0
  97. data/lib/aws-sdk-core/stubbing.rb +22 -0
  98. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  99. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  100. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  101. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  102. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  103. data/lib/aws-sdk-core/telemetry.rb +78 -0
  104. data/lib/aws-sdk-core/util.rb +39 -0
  105. data/lib/aws-sdk-core/waiters/poller.rb +10 -5
  106. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  107. data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
  108. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  109. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  110. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  111. data/lib/aws-sdk-core.rb +82 -107
  112. data/lib/aws-sdk-sso/client.rb +119 -55
  113. data/lib/aws-sdk-sso/client_api.rb +7 -0
  114. data/lib/aws-sdk-sso/endpoint_provider.rb +30 -24
  115. data/lib/aws-sdk-sso/endpoints.rb +4 -16
  116. data/lib/aws-sdk-sso/plugins/endpoints.rb +22 -8
  117. data/lib/aws-sdk-sso/types.rb +1 -0
  118. data/lib/aws-sdk-sso.rb +15 -11
  119. data/lib/aws-sdk-ssooidc/client.rb +504 -83
  120. data/lib/aws-sdk-ssooidc/client_api.rb +83 -1
  121. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -24
  122. data/lib/aws-sdk-ssooidc/endpoints.rb +14 -12
  123. data/lib/aws-sdk-ssooidc/errors.rb +52 -0
  124. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +24 -8
  125. data/lib/aws-sdk-ssooidc/types.rb +373 -51
  126. data/lib/aws-sdk-ssooidc.rb +15 -11
  127. data/lib/aws-sdk-sts/client.rb +129 -57
  128. data/lib/aws-sdk-sts/client_api.rb +15 -11
  129. data/lib/aws-sdk-sts/customizations.rb +5 -1
  130. data/lib/aws-sdk-sts/endpoint_provider.rb +2 -2
  131. data/lib/aws-sdk-sts/endpoints.rb +8 -32
  132. data/lib/aws-sdk-sts/plugins/endpoints.rb +22 -8
  133. data/lib/aws-sdk-sts/presigner.rb +1 -1
  134. data/lib/aws-sdk-sts/types.rb +19 -4
  135. data/lib/aws-sdk-sts.rb +15 -11
  136. data/lib/seahorse/client/async_base.rb +1 -1
  137. data/lib/seahorse/client/async_response.rb +19 -0
  138. data/lib/seahorse/client/base.rb +18 -7
  139. data/lib/seahorse/client/h2/handler.rb +14 -3
  140. data/lib/seahorse/client/handler.rb +1 -1
  141. data/lib/seahorse/client/net_http/connection_pool.rb +11 -11
  142. data/lib/seahorse/client/net_http/handler.rb +21 -9
  143. data/lib/seahorse/client/net_http/patches.rb +1 -4
  144. data/lib/seahorse/client/plugin.rb +9 -0
  145. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  146. data/lib/seahorse/client/plugins/h2.rb +3 -3
  147. data/lib/seahorse/client/plugins/net_http.rb +57 -16
  148. data/lib/seahorse/client/request_context.rb +8 -1
  149. data/lib/seahorse/model/shapes.rb +2 -2
  150. data/sig/aws-sdk-core/client_stubs.rbs +10 -0
  151. data/sig/aws-sdk-core/errors.rbs +22 -0
  152. data/sig/aws-sdk-core/resources/collection.rbs +21 -0
  153. data/sig/aws-sdk-core/structure.rbs +4 -0
  154. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  155. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  156. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  157. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  158. data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
  159. data/sig/aws-sdk-core.rbs +7 -0
  160. data/sig/seahorse/client/base.rbs +25 -0
  161. data/sig/seahorse/client/handler_builder.rbs +16 -0
  162. data/sig/seahorse/client/response.rbs +61 -0
  163. metadata +59 -17
  164. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  165. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  166. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  167. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  168. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -138,11 +138,7 @@ module Aws
138
138
  end
139
139
 
140
140
  def xml_name(ref)
141
- if flattened_list?(ref)
142
- ref.shape.member.location_name || ref.location_name
143
- else
144
- ref.location_name
145
- end
141
+ ref.location_name
146
142
  end
147
143
 
148
144
  def flattened_list?(ref)
@@ -266,7 +262,7 @@ module Aws
266
262
 
267
263
  class BlobFrame < Frame
268
264
  def result
269
- @text.empty? ? nil : Base64.decode64(@text.join)
265
+ @text.empty? ? '' : Base64.decode64(@text.join)
270
266
  end
271
267
  end
272
268
 
@@ -278,7 +274,7 @@ module Aws
278
274
 
279
275
  class FloatFrame < Frame
280
276
  def result
281
- @text.empty? ? nil : @text.join.to_f
277
+ @text.empty? ? nil : Aws::Util.deserialize_number(@text.join)
282
278
  end
283
279
  end
284
280
 
@@ -296,19 +292,7 @@ module Aws
296
292
 
297
293
  class TimestampFrame < Frame
298
294
  def result
299
- @text.empty? ? nil : parse(@text.join)
300
- end
301
- def parse(value)
302
- case value
303
- when nil then nil
304
- when /^\d+$/ then Time.at(value.to_i)
305
- else
306
- begin
307
- Time.parse(value).utc
308
- rescue ArgumentError
309
- raise "unhandled timestamp format `#{value}'"
310
- end
311
- end
295
+ @text.empty? ? nil : Aws::Util.deserialize_time(@text.join)
312
296
  end
313
297
  end
314
298
 
@@ -24,6 +24,8 @@ module Aws
24
24
  if name.to_s == 'encoding' && value.to_s == 'base64'
25
25
  @frame = BlobFrame.new(name, @frame.parent, @frame.ref)
26
26
  else
27
+ # don't try to parse shapes from xml namespace
28
+ return if name.to_s == 'xmlns'
27
29
  start_element(name)
28
30
  text(value)
29
31
  end_element(name)
@@ -5,7 +5,6 @@ module Aws
5
5
  module Xml
6
6
  # A SAX-style XML parser that uses a shape context to handle types.
7
7
  class Parser
8
-
9
8
  # @param [Seahorse::Model::ShapeRef] rules
10
9
  def initialize(rules, options = {})
11
10
  @rules = rules
@@ -47,8 +46,7 @@ module Aws
47
46
  # * :libxml
48
47
  # * :nokogiri
49
48
  # * :rexml
50
- #
51
- def engine= engine
49
+ def engine=(engine)
52
50
  @engine = Class === engine ? engine : load_engine(engine)
53
51
  end
54
52
 
@@ -60,7 +58,6 @@ module Aws
60
58
  # * {LibxmlEngine}
61
59
  # * {NokogiriEngine}
62
60
  # * {RexmlEngine}
63
- #
64
61
  def engine
65
62
  set_default_engine unless @engine
66
63
  @engine
@@ -80,7 +77,7 @@ module Aws
80
77
  private
81
78
 
82
79
  def load_engine(name)
83
- require "aws-sdk-core/xml/parser/engines/#{name}"
80
+ require "aws-sdk-core/xml/parser/#{name}_engine"
84
81
  const_name = name[0].upcase + name[1..-1] + 'Engine'
85
82
  const_get(const_name)
86
83
  end
@@ -94,7 +91,6 @@ module Aws
94
91
  end
95
92
 
96
93
  set_default_engine
97
-
98
94
  end
99
95
  end
100
96
  end
data/lib/aws-sdk-core.rb CHANGED
@@ -3,120 +3,80 @@
3
3
  require 'aws-partitions'
4
4
  require 'seahorse'
5
5
  require 'jmespath'
6
+ require 'aws-sigv4'
6
7
 
7
8
  require_relative 'aws-sdk-core/deprecations'
8
-
9
- # credential providers
10
-
11
- require_relative 'aws-sdk-core/credential_provider'
12
- require_relative 'aws-sdk-core/refreshing_credentials'
13
- require_relative 'aws-sdk-core/assume_role_credentials'
14
- require_relative 'aws-sdk-core/assume_role_web_identity_credentials'
15
- require_relative 'aws-sdk-core/credentials'
16
- require_relative 'aws-sdk-core/credential_provider_chain'
17
- require_relative 'aws-sdk-core/ecs_credentials'
18
- require_relative 'aws-sdk-core/instance_profile_credentials'
19
- require_relative 'aws-sdk-core/shared_credentials'
20
- require_relative 'aws-sdk-core/process_credentials'
21
- require_relative 'aws-sdk-core/sso_credentials'
22
-
23
- # tokens and token providers
24
- require_relative 'aws-sdk-core/token'
25
- require_relative 'aws-sdk-core/token_provider'
26
- require_relative 'aws-sdk-core/static_token_provider'
27
- require_relative 'aws-sdk-core/refreshing_token'
28
- require_relative 'aws-sdk-core/sso_token_provider'
29
- require_relative 'aws-sdk-core/token_provider_chain'
30
- require_relative 'aws-sdk-core/plugins/bearer_authorization'
31
-
32
- # client modules
33
-
34
- require_relative 'aws-sdk-core/client_stubs'
35
- require_relative 'aws-sdk-core/async_client_stubs'
36
- require_relative 'aws-sdk-core/eager_loader'
37
- require_relative 'aws-sdk-core/errors'
38
- require_relative 'aws-sdk-core/pageable_response'
39
- require_relative 'aws-sdk-core/pager'
40
- require_relative 'aws-sdk-core/param_converter'
41
- require_relative 'aws-sdk-core/param_validator'
42
- require_relative 'aws-sdk-core/shared_config'
43
- require_relative 'aws-sdk-core/structure'
44
- require_relative 'aws-sdk-core/type_builder'
45
- require_relative 'aws-sdk-core/util'
46
-
47
- # resource classes
48
-
49
- require_relative 'aws-sdk-core/resources/collection'
50
-
51
- # logging
52
-
53
- require_relative 'aws-sdk-core/log/formatter'
54
- require_relative 'aws-sdk-core/log/param_filter'
55
- require_relative 'aws-sdk-core/log/param_formatter'
56
-
57
- # stubbing
58
-
59
- require_relative 'aws-sdk-core/stubbing/empty_stub'
60
- require_relative 'aws-sdk-core/stubbing/data_applicator'
61
- require_relative 'aws-sdk-core/stubbing/stub_data'
62
- require_relative 'aws-sdk-core/stubbing/xml_error'
63
-
64
- # stubbing protocols
65
-
66
- require_relative 'aws-sdk-core/stubbing/protocols/ec2'
67
- require_relative 'aws-sdk-core/stubbing/protocols/json'
68
- require_relative 'aws-sdk-core/stubbing/protocols/query'
69
- require_relative 'aws-sdk-core/stubbing/protocols/rest'
70
- require_relative 'aws-sdk-core/stubbing/protocols/rest_json'
71
- require_relative 'aws-sdk-core/stubbing/protocols/rest_xml'
72
- require_relative 'aws-sdk-core/stubbing/protocols/api_gateway'
73
-
74
- # protocols
75
-
76
- require_relative 'aws-sdk-core/rest'
77
- require_relative 'aws-sdk-core/xml'
78
- require_relative 'aws-sdk-core/json'
79
-
80
- # event stream
81
-
82
- require_relative 'aws-sdk-core/binary'
83
- require_relative 'aws-sdk-core/event_emitter'
84
-
85
- # endpoint discovery
86
-
87
- require_relative 'aws-sdk-core/endpoint_cache'
88
-
89
- # client metrics
90
-
91
- require_relative 'aws-sdk-core/client_side_monitoring/request_metrics'
92
- require_relative 'aws-sdk-core/client_side_monitoring/publisher'
93
-
94
- # utilities
95
-
96
- require_relative 'aws-sdk-core/arn'
97
- require_relative 'aws-sdk-core/arn_parser'
98
- require_relative 'aws-sdk-core/ec2_metadata'
99
-
100
- # dynamic endpoints
101
- require_relative 'aws-sdk-core/endpoints'
102
- require_relative 'aws-sdk-core/plugins/signature_v4'
103
-
104
9
  # defaults
105
10
  require_relative 'aws-defaults'
106
11
 
107
- # plugins
108
- # loaded through building STS or SSO ..
109
-
110
- # aws-sdk-sts is included to support Aws::AssumeRoleCredentials
111
- require_relative 'aws-sdk-sts'
112
-
113
- # aws-sdk-sso is included to support Aws::SSOCredentials
114
- require_relative 'aws-sdk-sso'
115
- require_relative 'aws-sdk-ssooidc'
116
-
117
12
  module Aws
118
13
 
119
- CORE_GEM_VERSION = File.read(File.expand_path('../../VERSION', __FILE__)).strip
14
+ autoload :IniParser, 'aws-sdk-core/ini_parser'
15
+
16
+ # Credentials and credentials providers
17
+ autoload :Credentials, 'aws-sdk-core/credentials'
18
+ autoload :CredentialProvider, 'aws-sdk-core/credential_provider'
19
+ autoload :RefreshingCredentials, 'aws-sdk-core/refreshing_credentials'
20
+ autoload :AssumeRoleCredentials, 'aws-sdk-core/assume_role_credentials'
21
+ autoload :AssumeRoleWebIdentityCredentials, 'aws-sdk-core/assume_role_web_identity_credentials'
22
+ autoload :CredentialProviderChain, 'aws-sdk-core/credential_provider_chain'
23
+ autoload :ECSCredentials, 'aws-sdk-core/ecs_credentials'
24
+ autoload :InstanceProfileCredentials, 'aws-sdk-core/instance_profile_credentials'
25
+ autoload :SharedCredentials, 'aws-sdk-core/shared_credentials'
26
+ autoload :ProcessCredentials, 'aws-sdk-core/process_credentials'
27
+ autoload :SSOCredentials, 'aws-sdk-core/sso_credentials'
28
+
29
+
30
+ # tokens and token providers
31
+ autoload :Token, 'aws-sdk-core/token'
32
+ autoload :TokenProvider, 'aws-sdk-core/token_provider'
33
+ autoload :StaticTokenProvider, 'aws-sdk-core/static_token_provider'
34
+ autoload :RefreshingToken, 'aws-sdk-core/refreshing_token'
35
+ autoload :SSOTokenProvider, 'aws-sdk-core/sso_token_provider'
36
+ autoload :TokenProviderChain, 'aws-sdk-core/token_provider_chain'
37
+
38
+ # client modules
39
+ autoload :ClientStubs, 'aws-sdk-core/client_stubs'
40
+ autoload :AsyncClientStubs, 'aws-sdk-core/async_client_stubs'
41
+ autoload :EagerLoader, 'aws-sdk-core/eager_loader'
42
+ autoload :Errors, 'aws-sdk-core/errors'
43
+ autoload :PageableResponse, 'aws-sdk-core/pageable_response'
44
+ autoload :Pager, 'aws-sdk-core/pager'
45
+ autoload :ParamConverter, 'aws-sdk-core/param_converter'
46
+ autoload :ParamValidator, 'aws-sdk-core/param_validator'
47
+ autoload :SharedConfig, 'aws-sdk-core/shared_config'
48
+ autoload :Structure, 'aws-sdk-core/structure'
49
+ autoload :EmptyStructure, 'aws-sdk-core/structure'
50
+ autoload :TypeBuilder, 'aws-sdk-core/type_builder'
51
+ autoload :Util, 'aws-sdk-core/util'
52
+
53
+ # protocols
54
+ autoload :ErrorHandler, 'aws-sdk-core/error_handler'
55
+ autoload :Rest, 'aws-sdk-core/rest'
56
+ autoload :Xml, 'aws-sdk-core/xml'
57
+ autoload :Json, 'aws-sdk-core/json'
58
+ autoload :Query, 'aws-sdk-core/query'
59
+ autoload :RpcV2, 'aws-sdk-core/rpc_v2'
60
+
61
+ # event stream
62
+ autoload :Binary, 'aws-sdk-core/binary'
63
+ autoload :EventEmitter, 'aws-sdk-core/event_emitter'
64
+
65
+ # endpoint discovery
66
+ autoload :EndpointCache, 'aws-sdk-core/endpoint_cache'
67
+
68
+ autoload :Telemetry, 'aws-sdk-core/telemetry'
69
+
70
+ # utilities
71
+ autoload :ARN, 'aws-sdk-core/arn'
72
+ autoload :ARNParser, 'aws-sdk-core/arn_parser'
73
+ autoload :EC2Metadata, 'aws-sdk-core/ec2_metadata'
74
+ autoload :LRUCache, 'aws-sdk-core/lru_cache'
75
+
76
+ # dynamic endpoints
77
+ autoload :Endpoints, 'aws-sdk-core/endpoints'
78
+
79
+ CORE_GEM_VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip
120
80
 
121
81
  @config = {}
122
82
 
@@ -200,3 +160,18 @@ module Aws
200
160
 
201
161
  end
202
162
  end
163
+
164
+ # Setup additional autoloads/modules
165
+ require_relative 'aws-sdk-core/client_side_monitoring'
166
+ require_relative 'aws-sdk-core/log'
167
+ require_relative 'aws-sdk-core/plugins'
168
+ require_relative 'aws-sdk-core/resources'
169
+ require_relative 'aws-sdk-core/stubbing'
170
+ require_relative 'aws-sdk-core/waiters'
171
+
172
+ # aws-sdk-sts is included to support Aws::AssumeRoleCredentials
173
+ require_relative 'aws-sdk-sts'
174
+
175
+ # aws-sdk-sso is included to support Aws::SSOCredentials
176
+ require_relative 'aws-sdk-sso'
177
+ require_relative 'aws-sdk-ssooidc'
@@ -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'
@@ -31,11 +32,10 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
32
  require 'aws-sdk-core/plugins/request_compression.rb'
32
33
  require 'aws-sdk-core/plugins/defaults_mode.rb'
33
34
  require 'aws-sdk-core/plugins/recursion_detection.rb'
35
+ require 'aws-sdk-core/plugins/telemetry.rb'
34
36
  require 'aws-sdk-core/plugins/sign.rb'
35
37
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
36
38
 
37
- Aws::Plugins::GlobalConfiguration.add_identifier(:sso)
38
-
39
39
  module Aws::SSO
40
40
  # An API client for SSO. To construct a client, you need to configure a `:region` and `:credentials`.
41
41
  #
@@ -72,6 +72,7 @@ module Aws::SSO
72
72
  add_plugin(Aws::Plugins::ResponsePaging)
73
73
  add_plugin(Aws::Plugins::StubResponses)
74
74
  add_plugin(Aws::Plugins::IdempotencyToken)
75
+ add_plugin(Aws::Plugins::InvocationId)
75
76
  add_plugin(Aws::Plugins::JsonvalueConverter)
76
77
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
77
78
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
@@ -81,12 +82,18 @@ module Aws::SSO
81
82
  add_plugin(Aws::Plugins::RequestCompression)
82
83
  add_plugin(Aws::Plugins::DefaultsMode)
83
84
  add_plugin(Aws::Plugins::RecursionDetection)
85
+ add_plugin(Aws::Plugins::Telemetry)
84
86
  add_plugin(Aws::Plugins::Sign)
85
87
  add_plugin(Aws::Plugins::Protocols::RestJson)
86
88
  add_plugin(Aws::SSO::Plugins::Endpoints)
87
89
 
88
90
  # @overload initialize(options)
89
91
  # @param [Hash] options
92
+ #
93
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
94
+ # A list of plugins to apply to the client. Each plugin is either a
95
+ # class name or an instance of a plugin class.
96
+ #
90
97
  # @option options [required, Aws::CredentialProvider] :credentials
91
98
  # Your AWS credentials. This can be an instance of any one of the
92
99
  # following classes:
@@ -121,13 +128,15 @@ module Aws::SSO
121
128
  # locations will be searched for credentials:
122
129
  #
123
130
  # * `Aws.config[:credentials]`
124
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
125
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
131
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
132
+ # `:account_id` options.
133
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
134
+ # ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
126
135
  # * `~/.aws/credentials`
127
136
  # * `~/.aws/config`
128
137
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
129
138
  # are very aggressive. Construct and pass an instance of
130
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
139
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
131
140
  # enable retries and extended timeouts. Instance profile credential
132
141
  # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
133
142
  # to true.
@@ -146,6 +155,8 @@ module Aws::SSO
146
155
  #
147
156
  # @option options [String] :access_key_id
148
157
  #
158
+ # @option options [String] :account_id
159
+ #
149
160
  # @option options [Boolean] :active_endpoint_cache (false)
150
161
  # When set to `true`, a thread polling for endpoints will be running in
151
162
  # the background every 60 secs (default). Defaults to `false`.
@@ -196,10 +207,16 @@ module Aws::SSO
196
207
  # When set to 'true' the request body will not be compressed
197
208
  # for supported operations.
198
209
  #
199
- # @option options [String] :endpoint
200
- # The client endpoint is normally constructed from the `:region`
201
- # option. You should only configure an `:endpoint` when connecting
202
- # to test or custom endpoints. This should be a valid HTTP(S) URI.
210
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
211
+ # Normally you should not configure the `:endpoint` option
212
+ # directly. This is normally constructed from the `:region`
213
+ # option. Configuring `:endpoint` is normally reserved for
214
+ # connecting to test or custom endpoints. The endpoint should
215
+ # be a URI formatted like:
216
+ #
217
+ # 'http://example.com'
218
+ # 'https://example.com'
219
+ # 'http://example.com:123'
203
220
  #
204
221
  # @option options [Integer] :endpoint_cache_max_entries (1000)
205
222
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -289,16 +306,25 @@ module Aws::SSO
289
306
  # throttling. This is a provisional mode that may change behavior
290
307
  # in the future.
291
308
  #
292
- #
293
309
  # @option options [String] :sdk_ua_app_id
294
310
  # A unique and opaque application ID that is appended to the
295
- # User-Agent header as app/<sdk_ua_app_id>. It should have a
296
- # maximum length of 50.
311
+ # User-Agent header as app/sdk_ua_app_id. It should have a
312
+ # maximum length of 50. This variable is sourced from environment
313
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
297
314
  #
298
315
  # @option options [String] :secret_access_key
299
316
  #
300
317
  # @option options [String] :session_token
301
318
  #
319
+ # @option options [Array] :sigv4a_signing_region_set
320
+ # A list of regions that should be signed with SigV4a signing. When
321
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
322
+ # in the following locations:
323
+ #
324
+ # * `Aws.config[:sigv4a_signing_region_set]`
325
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
326
+ # * `~/.aws/config`
327
+ #
302
328
  # @option options [Boolean] :stub_responses (false)
303
329
  # Causes the client to return stubbed responses. By default
304
330
  # fake responses are generated and returned. You can specify
@@ -308,6 +334,16 @@ module Aws::SSO
308
334
  # ** Please note ** When response stubbing is enabled, no HTTP
309
335
  # requests are made, and retries are disabled.
310
336
  #
337
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
338
+ # Allows you to provide a telemetry provider, which is used to
339
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
340
+ # will not record or emit any telemetry data. The SDK supports the
341
+ # following telemetry providers:
342
+ #
343
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
344
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
345
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
346
+ #
311
347
  # @option options [Aws::TokenProvider] :token_provider
312
348
  # A Bearer Token Provider. This can be an instance of any one of the
313
349
  # following classes:
@@ -335,52 +371,75 @@ module Aws::SSO
335
371
  # sending the request.
336
372
  #
337
373
  # @option options [Aws::SSO::EndpointProvider] :endpoint_provider
338
- # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SSO::EndpointParameters`
339
- #
340
- # @option options [URI::HTTP,String] :http_proxy A proxy to send
341
- # requests through. Formatted like 'http://proxy.com:123'.
342
- #
343
- # @option options [Float] :http_open_timeout (15) The number of
344
- # seconds to wait when opening a HTTP session before raising a
345
- # `Timeout::Error`.
346
- #
347
- # @option options [Float] :http_read_timeout (60) The default
348
- # number of seconds to wait for response data. This value can
349
- # safely be set per-request on the session.
350
- #
351
- # @option options [Float] :http_idle_timeout (5) The number of
352
- # seconds a connection is allowed to sit idle before it is
353
- # considered stale. Stale connections are closed and removed
354
- # from the pool before making a request.
355
- #
356
- # @option options [Float] :http_continue_timeout (1) The number of
357
- # seconds to wait for a 100-continue response before sending the
358
- # request body. This option has no effect unless the request has
359
- # "Expect" header set to "100-continue". Defaults to `nil` which
360
- # disables this behaviour. This value can safely be set per
361
- # request on the session.
374
+ # The endpoint provider used to resolve endpoints. Any object that responds to
375
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
376
+ # `Aws::SSO::EndpointParameters`.
377
+ #
378
+ # @option options [Float] :http_continue_timeout (1)
379
+ # The number of seconds to wait for a 100-continue response before sending the
380
+ # request body. This option has no effect unless the request has "Expect"
381
+ # header set to "100-continue". Defaults to `nil` which disables this
382
+ # behaviour. This value can safely be set per request on the session.
383
+ #
384
+ # @option options [Float] :http_idle_timeout (5)
385
+ # The number of seconds a connection is allowed to sit idle before it
386
+ # is considered stale. Stale connections are closed and removed from the
387
+ # pool before making a request.
388
+ #
389
+ # @option options [Float] :http_open_timeout (15)
390
+ # The default number of seconds to wait for response data.
391
+ # This value can safely be set per-request on the session.
392
+ #
393
+ # @option options [URI::HTTP,String] :http_proxy
394
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
395
+ #
396
+ # @option options [Float] :http_read_timeout (60)
397
+ # The default number of seconds to wait for response data.
398
+ # This value can safely be set per-request on the session.
399
+ #
400
+ # @option options [Boolean] :http_wire_trace (false)
401
+ # When `true`, HTTP debug output will be sent to the `:logger`.
402
+ #
403
+ # @option options [Proc] :on_chunk_received
404
+ # When a Proc object is provided, it will be used as callback when each chunk
405
+ # of the response body is received. It provides three arguments: the chunk,
406
+ # the number of bytes received, and the total number of
407
+ # bytes in the response (or nil if the server did not send a `content-length`).
408
+ #
409
+ # @option options [Proc] :on_chunk_sent
410
+ # When a Proc object is provided, it will be used as callback when each chunk
411
+ # of the request body is sent. It provides three arguments: the chunk,
412
+ # the number of bytes read from the body, and the total number of
413
+ # bytes in the body.
414
+ #
415
+ # @option options [Boolean] :raise_response_errors (true)
416
+ # When `true`, response errors are raised.
417
+ #
418
+ # @option options [String] :ssl_ca_bundle
419
+ # Full path to the SSL certificate authority bundle file that should be used when
420
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
421
+ # `:ssl_ca_directory` the the system default will be used if available.
422
+ #
423
+ # @option options [String] :ssl_ca_directory
424
+ # Full path of the directory that contains the unbundled SSL certificate
425
+ # authority files for verifying peer certificates. If you do
426
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
427
+ # default will be used if available.
362
428
  #
363
- # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
364
- # in seconds.
429
+ # @option options [String] :ssl_ca_store
430
+ # Sets the X509::Store to verify peer certificate.
365
431
  #
366
- # @option options [Boolean] :http_wire_trace (false) When `true`,
367
- # HTTP debug output will be sent to the `:logger`.
432
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
433
+ # Sets a client certificate when creating http connections.
368
434
  #
369
- # @option options [Boolean] :ssl_verify_peer (true) When `true`,
370
- # SSL peer certificates are verified when establishing a
371
- # connection.
435
+ # @option options [OpenSSL::PKey] :ssl_key
436
+ # Sets a client key when creating http connections.
372
437
  #
373
- # @option options [String] :ssl_ca_bundle Full path to the SSL
374
- # certificate authority bundle file that should be used when
375
- # verifying peer certificates. If you do not pass
376
- # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
377
- # will be used if available.
438
+ # @option options [Float] :ssl_timeout
439
+ # Sets the SSL timeout in seconds
378
440
  #
379
- # @option options [String] :ssl_ca_directory Full path of the
380
- # directory that contains the unbundled SSL certificate
381
- # authority files for verifying peer certificates. If you do
382
- # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
383
- # system default will be used if available.
441
+ # @option options [Boolean] :ssl_verify_peer (true)
442
+ # When `true`, SSL peer certificates are verified when establishing a connection.
384
443
  #
385
444
  def initialize(*args)
386
445
  super
@@ -598,14 +657,19 @@ module Aws::SSO
598
657
  # @api private
599
658
  def build_request(operation_name, params = {})
600
659
  handlers = @handlers.for(operation_name)
660
+ tracer = config.telemetry_provider.tracer_provider.tracer(
661
+ Aws::Telemetry.module_to_tracer_name('Aws::SSO')
662
+ )
601
663
  context = Seahorse::Client::RequestContext.new(
602
664
  operation_name: operation_name,
603
665
  operation: config.api.operation(operation_name),
604
666
  client: self,
605
667
  params: params,
606
- config: config)
668
+ config: config,
669
+ tracer: tracer
670
+ )
607
671
  context[:gem_name] = 'aws-sdk-core'
608
- context[:gem_version] = '3.181.0'
672
+ context[:gem_version] = '3.209.1'
609
673
  Seahorse::Client::Request.new(handlers, context)
610
674
  end
611
675
 
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  module Aws::SSO
11
12
  # @api private
12
13
  module ClientApi
@@ -111,9 +112,11 @@ module Aws::SSO
111
112
 
112
113
  api.metadata = {
113
114
  "apiVersion" => "2019-06-10",
115
+ "auth" => ["aws.auth#sigv4"],
114
116
  "endpointPrefix" => "portal.sso",
115
117
  "jsonVersion" => "1.1",
116
118
  "protocol" => "rest-json",
119
+ "protocols" => ["rest-json"],
117
120
  "serviceAbbreviation" => "SSO",
118
121
  "serviceFullName" => "AWS Single Sign-On",
119
122
  "serviceId" => "SSO",
@@ -127,6 +130,7 @@ module Aws::SSO
127
130
  o.http_method = "GET"
128
131
  o.http_request_uri = "/federation/credentials"
129
132
  o['authtype'] = "none"
133
+ o['auth'] = ["smithy.api#noAuth"]
130
134
  o.input = Shapes::ShapeRef.new(shape: GetRoleCredentialsRequest)
131
135
  o.output = Shapes::ShapeRef.new(shape: GetRoleCredentialsResponse)
132
136
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -140,6 +144,7 @@ module Aws::SSO
140
144
  o.http_method = "GET"
141
145
  o.http_request_uri = "/assignment/roles"
142
146
  o['authtype'] = "none"
147
+ o['auth'] = ["smithy.api#noAuth"]
143
148
  o.input = Shapes::ShapeRef.new(shape: ListAccountRolesRequest)
144
149
  o.output = Shapes::ShapeRef.new(shape: ListAccountRolesResponse)
145
150
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -159,6 +164,7 @@ module Aws::SSO
159
164
  o.http_method = "GET"
160
165
  o.http_request_uri = "/assignment/accounts"
161
166
  o['authtype'] = "none"
167
+ o['auth'] = ["smithy.api#noAuth"]
162
168
  o.input = Shapes::ShapeRef.new(shape: ListAccountsRequest)
163
169
  o.output = Shapes::ShapeRef.new(shape: ListAccountsResponse)
164
170
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -178,6 +184,7 @@ module Aws::SSO
178
184
  o.http_method = "POST"
179
185
  o.http_request_uri = "/logout"
180
186
  o['authtype'] = "none"
187
+ o['auth'] = ["smithy.api#noAuth"]
181
188
  o.input = Shapes::ShapeRef.new(shape: LogoutRequest)
182
189
  o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
183
190
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)