aws-sdk-core 3.191.1 → 3.228.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 (181) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +530 -1
  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 +13 -5
  8. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -7
  9. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
  10. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  11. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  12. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  13. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  14. data/lib/aws-sdk-core/cbor/decoder.rb +308 -0
  15. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  16. data/lib/aws-sdk-core/cbor.rb +53 -0
  17. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  18. data/lib/aws-sdk-core/client_stubs.rb +30 -55
  19. data/lib/aws-sdk-core/credential_provider.rb +4 -0
  20. data/lib/aws-sdk-core/credential_provider_chain.rb +38 -11
  21. data/lib/aws-sdk-core/credentials.rb +19 -6
  22. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  23. data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
  24. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  25. data/lib/aws-sdk-core/endpoints/matchers.rb +8 -10
  26. data/lib/aws-sdk-core/endpoints.rb +101 -21
  27. data/lib/aws-sdk-core/error_handler.rb +46 -0
  28. data/lib/aws-sdk-core/errors.rb +11 -2
  29. data/lib/aws-sdk-core/event_emitter.rb +1 -17
  30. data/lib/aws-sdk-core/instance_profile_credentials.rb +148 -158
  31. data/lib/aws-sdk-core/json/builder.rb +8 -1
  32. data/lib/aws-sdk-core/json/error_handler.rb +29 -13
  33. data/lib/aws-sdk-core/json/handler.rb +6 -6
  34. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  35. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  36. data/lib/aws-sdk-core/json/parser.rb +6 -1
  37. data/lib/aws-sdk-core/json.rb +43 -14
  38. data/lib/aws-sdk-core/log/param_filter.rb +2 -2
  39. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  40. data/lib/aws-sdk-core/log.rb +10 -0
  41. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  42. data/lib/aws-sdk-core/pageable_response.rb +1 -1
  43. data/lib/aws-sdk-core/param_validator.rb +7 -2
  44. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  45. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -169
  46. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
  47. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  48. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +87 -68
  49. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  50. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  51. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  52. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  53. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  54. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  55. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  56. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  57. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  58. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  59. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  60. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -25
  61. data/lib/aws-sdk-core/plugins/request_compression.rb +11 -2
  62. data/lib/aws-sdk-core/plugins/retry_errors.rb +10 -3
  63. data/lib/aws-sdk-core/plugins/sign.rb +42 -26
  64. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  65. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  66. data/lib/aws-sdk-core/plugins/stub_responses.rb +58 -9
  67. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  68. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  69. data/lib/aws-sdk-core/plugins/user_agent.rb +101 -26
  70. data/lib/aws-sdk-core/plugins.rb +39 -0
  71. data/lib/aws-sdk-core/process_credentials.rb +48 -29
  72. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  73. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  74. data/lib/aws-sdk-core/query/handler.rb +4 -4
  75. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  76. data/lib/aws-sdk-core/query.rb +2 -1
  77. data/lib/aws-sdk-core/resources.rb +8 -0
  78. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  79. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  80. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  81. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  82. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  83. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +23 -11
  84. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  85. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  86. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  87. data/lib/aws-sdk-core/rest.rb +1 -0
  88. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  89. data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
  90. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
  91. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +95 -0
  92. data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
  93. data/lib/aws-sdk-core/rpc_v2/parser.rb +98 -0
  94. data/lib/aws-sdk-core/rpc_v2.rb +69 -0
  95. data/lib/aws-sdk-core/shared_config.rb +79 -22
  96. data/lib/aws-sdk-core/shared_credentials.rb +1 -7
  97. data/lib/aws-sdk-core/sso_credentials.rb +4 -1
  98. data/lib/aws-sdk-core/static_token_provider.rb +1 -2
  99. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  100. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  101. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  102. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  103. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  104. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  105. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
  106. data/lib/aws-sdk-core/stubbing.rb +22 -0
  107. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  108. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  109. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  110. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  111. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  112. data/lib/aws-sdk-core/telemetry.rb +78 -0
  113. data/lib/aws-sdk-core/token.rb +3 -3
  114. data/lib/aws-sdk-core/token_provider.rb +4 -0
  115. data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
  116. data/lib/aws-sdk-core/util.rb +41 -1
  117. data/lib/aws-sdk-core/waiters/poller.rb +10 -5
  118. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  119. data/lib/aws-sdk-core/xml/error_handler.rb +35 -43
  120. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  121. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  122. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  123. data/lib/aws-sdk-core.rb +82 -107
  124. data/lib/aws-sdk-sso/client.rb +185 -89
  125. data/lib/aws-sdk-sso/client_api.rb +7 -0
  126. data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
  127. data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
  128. data/lib/aws-sdk-sso/endpoints.rb +2 -54
  129. data/lib/aws-sdk-sso/plugins/endpoints.rb +19 -20
  130. data/lib/aws-sdk-sso/types.rb +1 -0
  131. data/lib/aws-sdk-sso.rb +15 -11
  132. data/lib/aws-sdk-ssooidc/client.rb +270 -109
  133. data/lib/aws-sdk-ssooidc/client_api.rb +33 -0
  134. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
  135. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  136. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
  137. data/lib/aws-sdk-ssooidc/errors.rb +21 -0
  138. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +19 -20
  139. data/lib/aws-sdk-ssooidc/types.rb +125 -24
  140. data/lib/aws-sdk-ssooidc.rb +15 -11
  141. data/lib/aws-sdk-sts/client.rb +393 -141
  142. data/lib/aws-sdk-sts/client_api.rb +36 -8
  143. data/lib/aws-sdk-sts/customizations.rb +5 -1
  144. data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
  145. data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
  146. data/lib/aws-sdk-sts/endpoints.rb +2 -118
  147. data/lib/aws-sdk-sts/errors.rb +15 -0
  148. data/lib/aws-sdk-sts/plugins/endpoints.rb +19 -28
  149. data/lib/aws-sdk-sts/presigner.rb +2 -6
  150. data/lib/aws-sdk-sts/types.rb +171 -28
  151. data/lib/aws-sdk-sts.rb +15 -11
  152. data/lib/seahorse/client/async_base.rb +4 -5
  153. data/lib/seahorse/client/async_response.rb +19 -0
  154. data/lib/seahorse/client/base.rb +18 -21
  155. data/lib/seahorse/client/h2/connection.rb +18 -28
  156. data/lib/seahorse/client/h2/handler.rb +14 -3
  157. data/lib/seahorse/client/handler.rb +1 -1
  158. data/lib/seahorse/client/http/response.rb +1 -1
  159. data/lib/seahorse/client/net_http/connection_pool.rb +15 -12
  160. data/lib/seahorse/client/net_http/handler.rb +21 -9
  161. data/lib/seahorse/client/networking_error.rb +1 -1
  162. data/lib/seahorse/client/plugin.rb +8 -0
  163. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  164. data/lib/seahorse/client/plugins/h2.rb +4 -4
  165. data/lib/seahorse/client/plugins/net_http.rb +57 -16
  166. data/lib/seahorse/client/request_context.rb +9 -2
  167. data/lib/seahorse/client/response.rb +2 -0
  168. data/lib/seahorse/model/shapes.rb +2 -2
  169. data/lib/seahorse/util.rb +2 -1
  170. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  171. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  172. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  173. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  174. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  175. data/sig/seahorse/client/async_base.rbs +18 -0
  176. metadata +96 -23
  177. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  178. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  179. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  180. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  181. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -7,35 +7,35 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
- require 'seahorse/client/plugins/content_length.rb'
11
- require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
- require 'aws-sdk-core/plugins/logging.rb'
13
- require 'aws-sdk-core/plugins/param_converter.rb'
14
- require 'aws-sdk-core/plugins/param_validator.rb'
15
- require 'aws-sdk-core/plugins/user_agent.rb'
16
- require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
- require 'aws-sdk-core/plugins/retry_errors.rb'
18
- require 'aws-sdk-core/plugins/global_configuration.rb'
19
- require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
- require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
- require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
- require 'aws-sdk-core/plugins/response_paging.rb'
23
- require 'aws-sdk-core/plugins/stub_responses.rb'
24
- require 'aws-sdk-core/plugins/idempotency_token.rb'
25
- require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
- require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
- require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
- require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
- require 'aws-sdk-core/plugins/http_checksum.rb'
30
- require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
- require 'aws-sdk-core/plugins/request_compression.rb'
32
- require 'aws-sdk-core/plugins/defaults_mode.rb'
33
- require 'aws-sdk-core/plugins/recursion_detection.rb'
34
- require 'aws-sdk-core/plugins/sign.rb'
35
- require 'aws-sdk-core/plugins/protocols/query.rb'
36
- require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
37
-
38
- Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
10
+ require 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/query'
38
+ require 'aws-sdk-sts/plugins/sts_regional_endpoints'
39
39
 
40
40
  module Aws::STS
41
41
  # An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
@@ -73,6 +73,7 @@ module Aws::STS
73
73
  add_plugin(Aws::Plugins::ResponsePaging)
74
74
  add_plugin(Aws::Plugins::StubResponses)
75
75
  add_plugin(Aws::Plugins::IdempotencyToken)
76
+ add_plugin(Aws::Plugins::InvocationId)
76
77
  add_plugin(Aws::Plugins::JsonvalueConverter)
77
78
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
78
79
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
@@ -82,6 +83,7 @@ module Aws::STS
82
83
  add_plugin(Aws::Plugins::RequestCompression)
83
84
  add_plugin(Aws::Plugins::DefaultsMode)
84
85
  add_plugin(Aws::Plugins::RecursionDetection)
86
+ add_plugin(Aws::Plugins::Telemetry)
85
87
  add_plugin(Aws::Plugins::Sign)
86
88
  add_plugin(Aws::Plugins::Protocols::Query)
87
89
  add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
@@ -89,8 +91,13 @@ module Aws::STS
89
91
 
90
92
  # @overload initialize(options)
91
93
  # @param [Hash] options
94
+ #
95
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
96
+ # A list of plugins to apply to the client. Each plugin is either a
97
+ # class name or an instance of a plugin class.
98
+ #
92
99
  # @option options [required, Aws::CredentialProvider] :credentials
93
- # Your AWS credentials. This can be an instance of any one of the
100
+ # Your AWS credentials used for authentication. This can be an instance of any one of the
94
101
  # following classes:
95
102
  #
96
103
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
@@ -123,16 +130,23 @@ module Aws::STS
123
130
  # locations will be searched for credentials:
124
131
  #
125
132
  # * `Aws.config[:credentials]`
126
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
127
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
133
+ #
134
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
135
+ # `:account_id` options.
136
+ #
137
+ # * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
138
+ # `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
139
+ #
128
140
  # * `~/.aws/credentials`
141
+ #
129
142
  # * `~/.aws/config`
143
+ #
130
144
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
131
145
  # are very aggressive. Construct and pass an instance of
132
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
146
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
133
147
  # enable retries and extended timeouts. Instance profile credential
134
- # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
135
- # to true.
148
+ # fetching can be disabled by setting `ENV['AWS_EC2_METADATA_DISABLED']`
149
+ # to `true`.
136
150
  #
137
151
  # @option options [required, String] :region
138
152
  # The AWS region to connect to. The configured `:region` is
@@ -148,6 +162,8 @@ module Aws::STS
148
162
  #
149
163
  # @option options [String] :access_key_id
150
164
  #
165
+ # @option options [String] :account_id
166
+ #
151
167
  # @option options [Boolean] :active_endpoint_cache (false)
152
168
  # When set to `true`, a thread polling for endpoints will be running in
153
169
  # the background every 60 secs (default). Defaults to `false`.
@@ -158,6 +174,11 @@ module Aws::STS
158
174
  # When false, the request will raise a `RetryCapacityNotAvailableError` and will
159
175
  # not retry instead of sleeping.
160
176
  #
177
+ # @option options [Array<String>] :auth_scheme_preference
178
+ # A list of preferred authentication schemes to use when making a request. Supported values are:
179
+ # `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
180
+ # shared config as `auth_scheme_preference`, the value should be a comma-separated list.
181
+ #
161
182
  # @option options [Boolean] :client_side_monitoring (false)
162
183
  # When `true`, client-side metrics will be collected for all API requests from
163
184
  # this client.
@@ -191,17 +212,22 @@ module Aws::STS
191
212
  # accepted modes and the configuration defaults that are included.
192
213
  #
193
214
  # @option options [Boolean] :disable_host_prefix_injection (false)
194
- # Set to true to disable SDK automatically adding host prefix
195
- # to default service endpoint when available.
215
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
196
216
  #
197
217
  # @option options [Boolean] :disable_request_compression (false)
198
218
  # When set to 'true' the request body will not be compressed
199
219
  # for supported operations.
200
220
  #
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.
221
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
222
+ # Normally you should not configure the `:endpoint` option
223
+ # directly. This is normally constructed from the `:region`
224
+ # option. Configuring `:endpoint` is normally reserved for
225
+ # connecting to test or custom endpoints. The endpoint should
226
+ # be a URI formatted like:
227
+ #
228
+ # 'http://example.com'
229
+ # 'https://example.com'
230
+ # 'http://example.com:123'
205
231
  #
206
232
  # @option options [Integer] :endpoint_cache_max_entries (1000)
207
233
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -239,14 +265,37 @@ module Aws::STS
239
265
  # 4 times. Used in `standard` and `adaptive` retry modes.
240
266
  #
241
267
  # @option options [String] :profile ("default")
242
- # Used when loading credentials from the shared credentials file
243
- # at HOME/.aws/credentials. When not specified, 'default' is used.
268
+ # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
269
+ # When not specified, 'default' is used.
270
+ #
271
+ # @option options [String] :request_checksum_calculation ("when_supported")
272
+ # Determines when a checksum will be calculated for request payloads. Values are:
273
+ #
274
+ # * `when_supported` - (default) When set, a checksum will be
275
+ # calculated for all request payloads of operations modeled with the
276
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
277
+ # `requestAlgorithmMember` is modeled.
278
+ # * `when_required` - When set, a checksum will only be calculated for
279
+ # request payloads of operations modeled with the `httpChecksum` trait where
280
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
281
+ # is modeled and supplied.
244
282
  #
245
283
  # @option options [Integer] :request_min_compression_size_bytes (10240)
246
284
  # The minimum size in bytes that triggers compression for request
247
285
  # bodies. The value must be non-negative integer value between 0
248
286
  # and 10485780 bytes inclusive.
249
287
  #
288
+ # @option options [String] :response_checksum_validation ("when_supported")
289
+ # Determines when checksum validation will be performed on response payloads. Values are:
290
+ #
291
+ # * `when_supported` - (default) When set, checksum validation is performed on all
292
+ # response payloads of operations modeled with the `httpChecksum` trait where
293
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
294
+ # are supported.
295
+ # * `when_required` - When set, checksum validation is not performed on
296
+ # response payloads of operations unless the checksum algorithm is supported and
297
+ # the `requestValidationModeMember` member is set to `ENABLED`.
298
+ #
250
299
  # @option options [Proc] :retry_backoff
251
300
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
252
301
  # This option is only used in the `legacy` retry mode.
@@ -291,16 +340,25 @@ module Aws::STS
291
340
  # throttling. This is a provisional mode that may change behavior
292
341
  # in the future.
293
342
  #
294
- #
295
343
  # @option options [String] :sdk_ua_app_id
296
344
  # 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.
345
+ # User-Agent header as app/sdk_ua_app_id. It should have a
346
+ # maximum length of 50. This variable is sourced from environment
347
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
299
348
  #
300
349
  # @option options [String] :secret_access_key
301
350
  #
302
351
  # @option options [String] :session_token
303
352
  #
353
+ # @option options [Array] :sigv4a_signing_region_set
354
+ # A list of regions that should be signed with SigV4a signing. When
355
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
356
+ # in the following locations:
357
+ #
358
+ # * `Aws.config[:sigv4a_signing_region_set]`
359
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
360
+ # * `~/.aws/config`
361
+ #
304
362
  # @option options [String] :sts_regional_endpoints ("regional")
305
363
  # Passing in 'regional' to enable regional endpoint for STS for all supported
306
364
  # regions (except 'aws-global'). Using 'legacy' mode will force all legacy
@@ -315,8 +373,18 @@ module Aws::STS
315
373
  # ** Please note ** When response stubbing is enabled, no HTTP
316
374
  # requests are made, and retries are disabled.
317
375
  #
376
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
377
+ # Allows you to provide a telemetry provider, which is used to
378
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
379
+ # will not record or emit any telemetry data. The SDK supports the
380
+ # following telemetry providers:
381
+ #
382
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
383
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
384
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
385
+ #
318
386
  # @option options [Aws::TokenProvider] :token_provider
319
- # A Bearer Token Provider. This can be an instance of any one of the
387
+ # Your Bearer token used for authentication. This can be an instance of any one of the
320
388
  # following classes:
321
389
  #
322
390
  # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
@@ -342,52 +410,75 @@ module Aws::STS
342
410
  # sending the request.
343
411
  #
344
412
  # @option options [Aws::STS::EndpointProvider] :endpoint_provider
345
- # 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
- #
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.
413
+ # The endpoint provider used to resolve endpoints. Any object that responds to
414
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
415
+ # `Aws::STS::EndpointParameters`.
416
+ #
417
+ # @option options [Float] :http_continue_timeout (1)
418
+ # The number of seconds to wait for a 100-continue response before sending the
419
+ # request body. This option has no effect unless the request has "Expect"
420
+ # header set to "100-continue". Defaults to `nil` which disables this
421
+ # behaviour. This value can safely be set per request on the session.
422
+ #
423
+ # @option options [Float] :http_idle_timeout (5)
424
+ # The number of seconds a connection is allowed to sit idle before it
425
+ # is considered stale. Stale connections are closed and removed from the
426
+ # pool before making a request.
427
+ #
428
+ # @option options [Float] :http_open_timeout (15)
429
+ # The default number of seconds to wait for response data.
430
+ # This value can safely be set per-request on the session.
431
+ #
432
+ # @option options [URI::HTTP,String] :http_proxy
433
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
434
+ #
435
+ # @option options [Float] :http_read_timeout (60)
436
+ # The default number of seconds to wait for response data.
437
+ # This value can safely be set per-request on the session.
438
+ #
439
+ # @option options [Boolean] :http_wire_trace (false)
440
+ # When `true`, HTTP debug output will be sent to the `:logger`.
441
+ #
442
+ # @option options [Proc] :on_chunk_received
443
+ # When a Proc object is provided, it will be used as callback when each chunk
444
+ # of the response body is received. It provides three arguments: the chunk,
445
+ # the number of bytes received, and the total number of
446
+ # bytes in the response (or nil if the server did not send a `content-length`).
447
+ #
448
+ # @option options [Proc] :on_chunk_sent
449
+ # When a Proc object is provided, it will be used as callback when each chunk
450
+ # of the request body is sent. It provides three arguments: the chunk,
451
+ # the number of bytes read from the body, and the total number of
452
+ # bytes in the body.
453
+ #
454
+ # @option options [Boolean] :raise_response_errors (true)
455
+ # When `true`, response errors are raised.
456
+ #
457
+ # @option options [String] :ssl_ca_bundle
458
+ # Full path to the SSL certificate authority bundle file that should be used when
459
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
460
+ # `:ssl_ca_directory` the the system default will be used if available.
461
+ #
462
+ # @option options [String] :ssl_ca_directory
463
+ # Full path of the directory that contains the unbundled SSL certificate
464
+ # authority files for verifying peer certificates. If you do
465
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
466
+ # default will be used if available.
362
467
  #
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.
468
+ # @option options [String] :ssl_ca_store
469
+ # Sets the X509::Store to verify peer certificate.
369
470
  #
370
- # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
371
- # in seconds.
471
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
472
+ # Sets a client certificate when creating http connections.
372
473
  #
373
- # @option options [Boolean] :http_wire_trace (false) When `true`,
374
- # HTTP debug output will be sent to the `:logger`.
474
+ # @option options [OpenSSL::PKey] :ssl_key
475
+ # Sets a client key when creating http connections.
375
476
  #
376
- # @option options [Boolean] :ssl_verify_peer (true) When `true`,
377
- # SSL peer certificates are verified when establishing a
378
- # connection.
477
+ # @option options [Float] :ssl_timeout
478
+ # Sets the SSL timeout in seconds
379
479
  #
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.
480
+ # @option options [Boolean] :ssl_verify_peer (true)
481
+ # When `true`, SSL peer certificates are verified when establishing a connection.
391
482
  #
392
483
  def initialize(*args)
393
484
  super
@@ -401,8 +492,8 @@ module Aws::STS
401
492
  # token. Typically, you use `AssumeRole` within your account or for
402
493
  # cross-account access. For a comparison of `AssumeRole` with other API
403
494
  # operations that produce temporary credentials, see [Requesting
404
- # Temporary Security Credentials][1] and [Comparing the Amazon Web
405
- # Services STS API operations][2] in the *IAM User Guide*.
495
+ # Temporary Security Credentials][1] and [Compare STS credentials][2] in
496
+ # the *IAM User Guide*.
406
497
  #
407
498
  # **Permissions**
408
499
  #
@@ -411,9 +502,9 @@ module Aws::STS
411
502
  # following exception: You cannot call the Amazon Web Services STS
412
503
  # `GetFederationToken` or `GetSessionToken` API operations.
413
504
  #
414
- # (Optional) You can pass inline or managed [session policies][3] to
415
- # this operation. You can pass a single JSON policy document to use as
416
- # an inline session policy. You can also specify up to 10 managed policy
505
+ # (Optional) You can pass inline or managed session policies to this
506
+ # operation. You can pass a single JSON policy document to use as an
507
+ # inline session policy. You can also specify up to 10 managed policy
417
508
  # Amazon Resource Names (ARNs) to use as managed session policies. The
418
509
  # plaintext that you use for both inline and managed session policies
419
510
  # can't exceed 2,048 characters. Passing policies to this operation
@@ -486,7 +577,7 @@ module Aws::STS
486
577
  # denied. The condition in a trust policy that tests for MFA
487
578
  # authentication might look like the following example.
488
579
  #
489
- # `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
580
+ # `"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}`
490
581
  #
491
582
  # For more information, see [Configuring MFA-Protected API Access][8] in
492
583
  # the *IAM User Guide* guide.
@@ -499,7 +590,7 @@ module Aws::STS
499
590
  #
500
591
  #
501
592
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
502
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
593
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
503
594
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
504
595
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
505
596
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
@@ -522,11 +613,22 @@ module Aws::STS
522
613
  # credentials will expose the role session name to the external account
523
614
  # in their CloudTrail logs.
524
615
  #
616
+ # For security purposes, administrators can view this field in
617
+ # [CloudTrail logs][1] to help identify who performed an action in
618
+ # Amazon Web Services. Your administrator might require that you specify
619
+ # your user name as the session name when you assume the role. For more
620
+ # information, see [ `sts:RoleSessionName` ][2].
621
+ #
525
622
  # The regex used to validate this parameter is a string of characters
526
623
  # consisting of upper- and lower-case alphanumeric characters with no
527
624
  # spaces. You can also include underscores or any of the following
528
625
  # characters: =,.@-
529
626
  #
627
+ #
628
+ #
629
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
630
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
631
+ #
530
632
  # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
531
633
  # The Amazon Resource Names (ARNs) of the IAM managed policies that you
532
634
  # want to use as managed session policies. The policies must exist in
@@ -592,6 +694,9 @@ module Aws::STS
592
694
  #
593
695
  # </note>
594
696
  #
697
+ # For more information about role session permissions, see [Session
698
+ # policies][1].
699
+ #
595
700
  #
596
701
  #
597
702
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
@@ -614,9 +719,8 @@ module Aws::STS
614
719
  # depending on the maximum session duration setting for your role.
615
720
  # However, if you assume a role using role chaining and provide a
616
721
  # `DurationSeconds` parameter value greater than one hour, the operation
617
- # fails. To learn how to view the maximum value for your role, see [View
618
- # the Maximum Session Duration Setting for a Role][1] in the *IAM User
619
- # Guide*.
722
+ # fails. To learn how to view the maximum value for your role, see
723
+ # [Update the maximum session duration for a role][1].
620
724
  #
621
725
  # By default, the value is set to `3600` seconds.
622
726
  #
@@ -632,7 +736,7 @@ module Aws::STS
632
736
  #
633
737
  #
634
738
  #
635
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
739
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
636
740
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
637
741
  #
638
742
  # @option params [Array<Types::Tag>] :tags
@@ -685,9 +789,8 @@ module Aws::STS
685
789
  # passes to subsequent sessions in a role chain. For more information,
686
790
  # see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
687
791
  #
688
- # This parameter is optional. When you set session tags as transitive,
689
- # the session policy and session tags packed binary limit is not
690
- # affected.
792
+ # This parameter is optional. The transitive status of a session tag
793
+ # does not impact its packed binary size.
691
794
  #
692
795
  # If you choose not to specify a transitive tag key, then no tags are
693
796
  # passed from this session to any subsequent sessions.
@@ -745,26 +848,29 @@ module Aws::STS
745
848
  #
746
849
  # @option params [String] :source_identity
747
850
  # The source identity specified by the principal that is calling the
748
- # `AssumeRole` operation.
851
+ # `AssumeRole` operation. The source identity value persists across
852
+ # [chained role][1] sessions.
749
853
  #
750
854
  # You can require users to specify a source identity when they assume a
751
- # role. You do this by using the `sts:SourceIdentity` condition key in a
752
- # role trust policy. You can use source identity information in
855
+ # role. You do this by using the [ `sts:SourceIdentity` ][2] condition
856
+ # key in a role trust policy. You can use source identity information in
753
857
  # CloudTrail logs to determine who took actions with a role. You can use
754
858
  # the `aws:SourceIdentity` condition key to further control access to
755
859
  # Amazon Web Services resources based on the value of source identity.
756
860
  # For more information about using source identity, see [Monitor and
757
- # control actions taken with assumed roles][1] in the *IAM User Guide*.
861
+ # control actions taken with assumed roles][3] in the *IAM User Guide*.
758
862
  #
759
863
  # The regex used to validate this parameter is a string of characters
760
864
  # consisting of upper- and lower-case alphanumeric characters with no
761
865
  # spaces. You can also include underscores or any of the following
762
- # characters: =,.@-. You cannot use a value that begins with the text
866
+ # characters: +=,.@-. You cannot use a value that begins with the text
763
867
  # `aws:`. This prefix is reserved for Amazon Web Services internal use.
764
868
  #
765
869
  #
766
870
  #
767
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
871
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
872
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
873
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
768
874
  #
769
875
  # @option params [Array<Types::ProvidedContext>] :provided_contexts
770
876
  # A list of previously acquired trusted context assertions in the format
@@ -775,7 +881,7 @@ module Aws::STS
775
881
  # a single trusted context assertion and the ARN of the context provider
776
882
  # from which the trusted context assertion was generated.
777
883
  #
778
- # `[\{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"\}]`
884
+ # `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
779
885
  #
780
886
  # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
781
887
  #
@@ -885,8 +991,8 @@ module Aws::STS
885
991
  # user-specific credentials or configuration. For a comparison of
886
992
  # `AssumeRoleWithSAML` with the other API operations that produce
887
993
  # temporary credentials, see [Requesting Temporary Security
888
- # Credentials][1] and [Comparing the Amazon Web Services STS API
889
- # operations][2] in the *IAM User Guide*.
994
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
995
+ # Guide*.
890
996
  #
891
997
  # The temporary security credentials returned by this operation consist
892
998
  # of an access key ID, a secret access key, and a security token.
@@ -1016,7 +1122,7 @@ module Aws::STS
1016
1122
  #
1017
1123
  #
1018
1124
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1019
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1125
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
1020
1126
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1021
1127
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
1022
1128
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
@@ -1104,6 +1210,9 @@ module Aws::STS
1104
1210
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1105
1211
  # characters.
1106
1212
  #
1213
+ # For more information about role session permissions, see [Session
1214
+ # policies][1].
1215
+ #
1107
1216
  # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1108
1217
  # policy, managed policy ARNs, and session tags into a packed binary
1109
1218
  # format that has a separate limit. Your request can fail for this limit
@@ -1258,8 +1367,8 @@ module Aws::STS
1258
1367
  # a token from the web identity provider. For a comparison of
1259
1368
  # `AssumeRoleWithWebIdentity` with the other API operations that produce
1260
1369
  # temporary credentials, see [Requesting Temporary Security
1261
- # Credentials][4] and [Comparing the Amazon Web Services STS API
1262
- # operations][5] in the *IAM User Guide*.
1370
+ # Credentials][4] and [Compare STS credentials][5] in the *IAM User
1371
+ # Guide*.
1263
1372
  #
1264
1373
  # The temporary security credentials returned by this API consist of an
1265
1374
  # access key ID, a secret access key, and a security token. Applications
@@ -1274,9 +1383,9 @@ module Aws::STS
1274
1383
  # your session. You can provide a value from 900 seconds (15 minutes) up
1275
1384
  # to the maximum session duration setting for the role. This setting can
1276
1385
  # have a value from 1 hour to 12 hours. To learn how to view the maximum
1277
- # value for your role, see [View the Maximum Session Duration Setting
1278
- # for a Role][6] in the *IAM User Guide*. The maximum session duration
1279
- # limit applies when you use the `AssumeRole*` API operations or the
1386
+ # value for your role, see [Update the maximum session duration for a
1387
+ # role ][6] in the *IAM User Guide*. The maximum session duration limit
1388
+ # applies when you use the `AssumeRole*` API operations or the
1280
1389
  # `assume-role*` CLI commands. However the limit does not apply when you
1281
1390
  # use those operations to create a console URL. For more information,
1282
1391
  # see [Using IAM Roles][7] in the *IAM User Guide*.
@@ -1354,35 +1463,26 @@ module Aws::STS
1354
1463
  # instead use a GUID or a pairwise identifier, as [suggested in the OIDC
1355
1464
  # specification][14].
1356
1465
  #
1357
- # For more information about how to use web identity federation and the
1466
+ # For more information about how to use OIDC federation and the
1358
1467
  # `AssumeRoleWithWebIdentity` API, see the following resources:
1359
1468
  #
1360
1469
  # * [Using Web Identity Federation API Operations for Mobile Apps][15]
1361
1470
  # and [Federation Through a Web-based Identity Provider][16].
1362
1471
  #
1363
- # * [ Web Identity Federation Playground][17]. Walk through the process
1364
- # of authenticating through Login with Amazon, Facebook, or Google,
1365
- # getting temporary security credentials, and then using those
1366
- # credentials to make a request to Amazon Web Services.
1367
- #
1368
1472
  # * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
1369
1473
  # Services SDK for Android Developer Guide][3]. These toolkits contain
1370
1474
  # sample apps that show how to invoke the identity providers. The
1371
1475
  # toolkits then show how to use the information from these providers
1372
1476
  # to get and use temporary security credentials.
1373
1477
  #
1374
- # * [Web Identity Federation with Mobile Applications][18]. This article
1375
- # discusses web identity federation and shows an example of how to use
1376
- # web identity federation to get access to content in Amazon S3.
1377
- #
1378
1478
  #
1379
1479
  #
1380
1480
  # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
1381
1481
  # [2]: http://aws.amazon.com/sdkforios/
1382
1482
  # [3]: http://aws.amazon.com/sdkforandroid/
1383
1483
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1384
- # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1385
- # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1484
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
1485
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
1386
1486
  # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
1387
1487
  # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1388
1488
  # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
@@ -1393,13 +1493,29 @@ module Aws::STS
1393
1493
  # [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
1394
1494
  # [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
1395
1495
  # [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1396
- # [17]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
1397
- # [18]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
1398
1496
  #
1399
1497
  # @option params [required, String] :role_arn
1400
1498
  # The Amazon Resource Name (ARN) of the role that the caller is
1401
1499
  # assuming.
1402
1500
  #
1501
+ # <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools that
1502
+ # assume [cross-account IAM roles][1]. The trust policies of these roles
1503
+ # must accept the `cognito-identity.amazonaws.com` service principal and
1504
+ # must contain the `cognito-identity.amazonaws.com:aud` condition key to
1505
+ # restrict role assumption to users from your intended identity pools. A
1506
+ # policy that trusts Amazon Cognito identity pools without this
1507
+ # condition creates a risk that a user from an unintended identity pool
1508
+ # can assume the role. For more information, see [ Trust policies for
1509
+ # IAM roles in Basic (Classic) authentication ][2] in the *Amazon
1510
+ # Cognito Developer Guide*.
1511
+ #
1512
+ # </note>
1513
+ #
1514
+ #
1515
+ #
1516
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
1517
+ # [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
1518
+ #
1403
1519
  # @option params [required, String] :role_session_name
1404
1520
  # An identifier for the assumed role session. Typically, you pass the
1405
1521
  # name or identifier that is associated with the user who is using your
@@ -1408,18 +1524,31 @@ module Aws::STS
1408
1524
  # is included as part of the ARN and assumed role ID in the
1409
1525
  # `AssumedRoleUser` response element.
1410
1526
  #
1527
+ # For security purposes, administrators can view this field in
1528
+ # [CloudTrail logs][1] to help identify who performed an action in
1529
+ # Amazon Web Services. Your administrator might require that you specify
1530
+ # your user name as the session name when you assume the role. For more
1531
+ # information, see [ `sts:RoleSessionName` ][2].
1532
+ #
1411
1533
  # The regex used to validate this parameter is a string of characters
1412
1534
  # consisting of upper- and lower-case alphanumeric characters with no
1413
1535
  # spaces. You can also include underscores or any of the following
1414
1536
  # characters: =,.@-
1415
1537
  #
1538
+ #
1539
+ #
1540
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
1541
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
1542
+ #
1416
1543
  # @option params [required, String] :web_identity_token
1417
1544
  # The OAuth 2.0 access token or OpenID Connect ID token that is provided
1418
1545
  # by the identity provider. Your application must get this token by
1419
1546
  # authenticating the user who is using your application with a web
1420
1547
  # identity provider before the application makes an
1421
- # `AssumeRoleWithWebIdentity` call. Only tokens with RSA algorithms
1422
- # (RS256) are supported.
1548
+ # `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
1549
+ # formatted as either an integer or a long integer. Tokens must be
1550
+ # signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
1551
+ # (ES256, ES384, or ES512).
1423
1552
  #
1424
1553
  # @option params [String] :provider_id
1425
1554
  # The fully qualified host component of the domain name of the OAuth 2.0
@@ -1488,6 +1617,9 @@ module Aws::STS
1488
1617
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1489
1618
  # characters.
1490
1619
  #
1620
+ # For more information about role session permissions, see [Session
1621
+ # policies][1].
1622
+ #
1491
1623
  # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1492
1624
  # policy, managed policy ARNs, and session tags into a packed binary
1493
1625
  # format that has a separate limit. Your request can fail for this limit
@@ -1608,6 +1740,121 @@ module Aws::STS
1608
1740
  req.send_request(options)
1609
1741
  end
1610
1742
 
1743
+ # Returns a set of short term credentials you can use to perform
1744
+ # privileged tasks on a member account in your organization.
1745
+ #
1746
+ # Before you can launch a privileged session, you must have centralized
1747
+ # root access in your organization. For steps to enable this feature,
1748
+ # see [Centralize root access for member accounts][1] in the *IAM User
1749
+ # Guide*.
1750
+ #
1751
+ # <note markdown="1"> The STS global endpoint is not supported for AssumeRoot. You must send
1752
+ # this request to a Regional STS endpoint. For more information, see
1753
+ # [Endpoints][2].
1754
+ #
1755
+ # </note>
1756
+ #
1757
+ # You can track AssumeRoot in CloudTrail logs to determine what actions
1758
+ # were performed in a session. For more information, see [Track
1759
+ # privileged tasks in CloudTrail][3] in the *IAM User Guide*.
1760
+ #
1761
+ #
1762
+ #
1763
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
1764
+ # [2]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
1765
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
1766
+ #
1767
+ # @option params [required, String] :target_principal
1768
+ # The member account principal ARN or account ID.
1769
+ #
1770
+ # @option params [required, Types::PolicyDescriptorType] :task_policy_arn
1771
+ # The identity based policy that scopes the session to the privileged
1772
+ # tasks that can be performed. You can use one of following Amazon Web
1773
+ # Services managed policies to scope root session actions.
1774
+ #
1775
+ # * [IAMAuditRootUserCredentials][1]
1776
+ #
1777
+ # * [IAMCreateRootUserPassword][2]
1778
+ #
1779
+ # * [IAMDeleteRootUserCredentials][3]
1780
+ #
1781
+ # * [S3UnlockBucketPolicy][4]
1782
+ #
1783
+ # * [SQSUnlockQueuePolicy][5]
1784
+ #
1785
+ #
1786
+ #
1787
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
1788
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
1789
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
1790
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
1791
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
1792
+ #
1793
+ # @option params [Integer] :duration_seconds
1794
+ # The duration, in seconds, of the privileged session. The value can
1795
+ # range from 0 seconds up to the maximum session duration of 900 seconds
1796
+ # (15 minutes). If you specify a value higher than this setting, the
1797
+ # operation fails.
1798
+ #
1799
+ # By default, the value is set to `900` seconds.
1800
+ #
1801
+ # @return [Types::AssumeRootResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1802
+ #
1803
+ # * {Types::AssumeRootResponse#credentials #credentials} => Types::Credentials
1804
+ # * {Types::AssumeRootResponse#source_identity #source_identity} => String
1805
+ #
1806
+ #
1807
+ # @example Example: To launch a privileged session
1808
+ #
1809
+ # # The following command retrieves a set of short-term credentials you can use to unlock an S3 bucket for a member account
1810
+ # # by removing the bucket policy.
1811
+ #
1812
+ # resp = client.assume_root({
1813
+ # duration_seconds: 900,
1814
+ # target_principal: "111122223333",
1815
+ # task_policy_arn: {
1816
+ # arn: "arn:aws:iam::aws:policy/root-task/S3UnlockBucketPolicy",
1817
+ # },
1818
+ # })
1819
+ #
1820
+ # resp.to_h outputs the following:
1821
+ # {
1822
+ # credentials: {
1823
+ # access_key_id: "ASIAJEXAMPLEXEG2JICEA",
1824
+ # expiration: Time.parse("2024-11-15T00:05:07Z"),
1825
+ # secret_access_key: "9drTJvcXLB89EXAMPLELB8923FB892xMFI",
1826
+ # session_token: "AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=",
1827
+ # },
1828
+ # source_identity: "Alice",
1829
+ # }
1830
+ #
1831
+ # @example Request syntax with placeholder values
1832
+ #
1833
+ # resp = client.assume_root({
1834
+ # target_principal: "TargetPrincipalType", # required
1835
+ # task_policy_arn: { # required
1836
+ # arn: "arnType",
1837
+ # },
1838
+ # duration_seconds: 1,
1839
+ # })
1840
+ #
1841
+ # @example Response structure
1842
+ #
1843
+ # resp.credentials.access_key_id #=> String
1844
+ # resp.credentials.secret_access_key #=> String
1845
+ # resp.credentials.session_token #=> String
1846
+ # resp.credentials.expiration #=> Time
1847
+ # resp.source_identity #=> String
1848
+ #
1849
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoot AWS API Documentation
1850
+ #
1851
+ # @overload assume_root(params = {})
1852
+ # @param [Hash] params ({})
1853
+ def assume_root(params = {}, options = {})
1854
+ req = build_request(:assume_root, params)
1855
+ req.send_request(options)
1856
+ end
1857
+
1611
1858
  # Decodes additional information about the authorization status of a
1612
1859
  # request from an encoded message returned in response to an Amazon Web
1613
1860
  # Services request.
@@ -1846,8 +2093,8 @@ module Aws::STS
1846
2093
  # usually in a server-based application. For a comparison of
1847
2094
  # `GetFederationToken` with the other API operations that produce
1848
2095
  # temporary credentials, see [Requesting Temporary Security
1849
- # Credentials][1] and [Comparing the Amazon Web Services STS API
1850
- # operations][2] in the *IAM User Guide*.
2096
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
2097
+ # Guide*.
1851
2098
  #
1852
2099
  # Although it is possible to call `GetFederationToken` using the
1853
2100
  # security credentials of an Amazon Web Services account root user
@@ -1944,7 +2191,7 @@ module Aws::STS
1944
2191
  #
1945
2192
  #
1946
2193
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1947
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
2194
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
1948
2195
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
1949
2196
  # [4]: http://aws.amazon.com/cognito/
1950
2197
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
@@ -2196,8 +2443,8 @@ module Aws::STS
2196
2443
  # An incorrect MFA code causes the API to return an access denied error.
2197
2444
  # For a comparison of `GetSessionToken` with the other API operations
2198
2445
  # that produce temporary credentials, see [Requesting Temporary Security
2199
- # Credentials][1] and [Comparing the Amazon Web Services STS API
2200
- # operations][2] in the *IAM User Guide*.
2446
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
2447
+ # Guide*.
2201
2448
  #
2202
2449
  # <note markdown="1"> No permissions are required for users to perform this operation. The
2203
2450
  # purpose of the `sts:GetSessionToken` operation is to authenticate the
@@ -2252,7 +2499,7 @@ module Aws::STS
2252
2499
  #
2253
2500
  #
2254
2501
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
2255
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
2502
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
2256
2503
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
2257
2504
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
2258
2505
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
@@ -2345,14 +2592,19 @@ module Aws::STS
2345
2592
  # @api private
2346
2593
  def build_request(operation_name, params = {})
2347
2594
  handlers = @handlers.for(operation_name)
2595
+ tracer = config.telemetry_provider.tracer_provider.tracer(
2596
+ Aws::Telemetry.module_to_tracer_name('Aws::STS')
2597
+ )
2348
2598
  context = Seahorse::Client::RequestContext.new(
2349
2599
  operation_name: operation_name,
2350
2600
  operation: config.api.operation(operation_name),
2351
2601
  client: self,
2352
2602
  params: params,
2353
- config: config)
2603
+ config: config,
2604
+ tracer: tracer
2605
+ )
2354
2606
  context[:gem_name] = 'aws-sdk-core'
2355
- context[:gem_version] = '3.191.1'
2607
+ context[:gem_version] = '3.228.0'
2356
2608
  Seahorse::Client::Request.new(handlers, context)
2357
2609
  end
2358
2610