aws-sdk-core 3.173.0 → 3.254.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 (213) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +947 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +5 -6
  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 +21 -13
  8. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +16 -9
  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 +309 -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 +39 -55
  19. data/lib/aws-sdk-core/credential_provider.rb +8 -1
  20. data/lib/aws-sdk-core/credential_provider_chain.rb +101 -25
  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 +104 -26
  24. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  25. data/lib/aws-sdk-core/endpoints/matchers.rb +21 -19
  26. data/lib/aws-sdk-core/endpoints.rb +106 -22
  27. data/lib/aws-sdk-core/error_handler.rb +46 -0
  28. data/lib/aws-sdk-core/errors.rb +17 -5
  29. data/lib/aws-sdk-core/event_emitter.rb +1 -17
  30. data/lib/aws-sdk-core/ini_parser.rb +7 -0
  31. data/lib/aws-sdk-core/instance_profile_credentials.rb +181 -158
  32. data/lib/aws-sdk-core/json/builder.rb +23 -1
  33. data/lib/aws-sdk-core/json/error_handler.rb +31 -14
  34. data/lib/aws-sdk-core/json/handler.rb +13 -6
  35. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  36. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  37. data/lib/aws-sdk-core/json/parser.rb +33 -3
  38. data/lib/aws-sdk-core/json.rb +43 -14
  39. data/lib/aws-sdk-core/log/param_filter.rb +2 -2
  40. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  41. data/lib/aws-sdk-core/log.rb +10 -0
  42. data/lib/aws-sdk-core/login_credentials.rb +230 -0
  43. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  44. data/lib/aws-sdk-core/pageable_response.rb +3 -1
  45. data/lib/aws-sdk-core/param_validator.rb +9 -4
  46. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  47. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +437 -201
  48. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -1
  49. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  50. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +78 -56
  51. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  52. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  53. data/lib/aws-sdk-core/plugins/http_checksum.rb +3 -8
  54. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  55. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  56. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  57. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  58. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  59. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  60. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  61. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  62. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  63. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +162 -37
  64. data/lib/aws-sdk-core/plugins/request_compression.rb +226 -0
  65. data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +28 -16
  66. data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +11 -8
  67. data/lib/aws-sdk-core/plugins/retry_errors.rb +211 -110
  68. data/lib/aws-sdk-core/plugins/sign.rb +55 -33
  69. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  70. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  71. data/lib/aws-sdk-core/plugins/stub_responses.rb +59 -9
  72. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  73. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  74. data/lib/aws-sdk-core/plugins/user_agent.rb +205 -14
  75. data/lib/aws-sdk-core/plugins.rb +39 -0
  76. data/lib/aws-sdk-core/process_credentials.rb +48 -29
  77. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  78. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  79. data/lib/aws-sdk-core/query/handler.rb +4 -4
  80. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  81. data/lib/aws-sdk-core/query.rb +2 -1
  82. data/lib/aws-sdk-core/refreshing_credentials.rb +20 -23
  83. data/lib/aws-sdk-core/resources.rb +8 -0
  84. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  85. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  86. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  87. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  88. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  89. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
  90. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  91. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  92. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  93. data/lib/aws-sdk-core/rest.rb +1 -0
  94. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  95. data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
  96. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
  97. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +95 -0
  98. data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
  99. data/lib/aws-sdk-core/rpc_v2/parser.rb +98 -0
  100. data/lib/aws-sdk-core/rpc_v2.rb +69 -0
  101. data/lib/aws-sdk-core/shared_config.rb +155 -39
  102. data/lib/aws-sdk-core/shared_credentials.rb +1 -7
  103. data/lib/aws-sdk-core/sso_credentials.rb +6 -3
  104. data/lib/aws-sdk-core/sso_token_provider.rb +1 -0
  105. data/lib/aws-sdk-core/static_token_provider.rb +1 -2
  106. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  107. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  108. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  109. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  110. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  111. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  112. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
  113. data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
  114. data/lib/aws-sdk-core/stubbing.rb +22 -0
  115. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  116. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  117. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  118. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  119. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  120. data/lib/aws-sdk-core/telemetry.rb +78 -0
  121. data/lib/aws-sdk-core/token.rb +3 -3
  122. data/lib/aws-sdk-core/token_provider.rb +4 -0
  123. data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
  124. data/lib/aws-sdk-core/util.rb +41 -1
  125. data/lib/aws-sdk-core/waiters/poller.rb +12 -5
  126. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  127. data/lib/aws-sdk-core/xml/error_handler.rb +35 -43
  128. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  129. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  130. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  131. data/lib/aws-sdk-core.rb +86 -107
  132. data/lib/aws-sdk-signin/client.rb +1008 -0
  133. data/lib/aws-sdk-signin/client_api.rb +444 -0
  134. data/lib/aws-sdk-signin/customizations.rb +1 -0
  135. data/lib/aws-sdk-signin/endpoint_parameters.rb +85 -0
  136. data/lib/aws-sdk-signin/endpoint_provider.rb +107 -0
  137. data/lib/aws-sdk-signin/endpoints.rb +133 -0
  138. data/lib/aws-sdk-signin/errors.rb +185 -0
  139. data/lib/aws-sdk-signin/plugins/endpoints.rb +77 -0
  140. data/lib/aws-sdk-signin/resource.rb +26 -0
  141. data/lib/aws-sdk-signin/types.rb +909 -0
  142. data/lib/aws-sdk-signin.rb +63 -0
  143. data/lib/aws-sdk-sso/client.rb +210 -99
  144. data/lib/aws-sdk-sso/client_api.rb +7 -0
  145. data/lib/aws-sdk-sso/endpoint_parameters.rb +13 -10
  146. data/lib/aws-sdk-sso/endpoint_provider.rb +30 -28
  147. data/lib/aws-sdk-sso/endpoints.rb +3 -54
  148. data/lib/aws-sdk-sso/plugins/endpoints.rb +23 -22
  149. data/lib/aws-sdk-sso/types.rb +1 -0
  150. data/lib/aws-sdk-sso.rb +15 -11
  151. data/lib/aws-sdk-ssooidc/client.rb +630 -132
  152. data/lib/aws-sdk-ssooidc/client_api.rb +94 -1
  153. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +13 -10
  154. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -28
  155. data/lib/aws-sdk-ssooidc/endpoints.rb +3 -40
  156. data/lib/aws-sdk-ssooidc/errors.rb +62 -0
  157. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +23 -20
  158. data/lib/aws-sdk-ssooidc/types.rb +419 -53
  159. data/lib/aws-sdk-ssooidc.rb +15 -11
  160. data/lib/aws-sdk-sts/client.rb +567 -158
  161. data/lib/aws-sdk-sts/client_api.rb +120 -9
  162. data/lib/aws-sdk-sts/customizations.rb +5 -2
  163. data/lib/aws-sdk-sts/endpoint_parameters.rb +15 -14
  164. data/lib/aws-sdk-sts/endpoint_provider.rb +52 -57
  165. data/lib/aws-sdk-sts/endpoints.rb +3 -118
  166. data/lib/aws-sdk-sts/errors.rb +79 -0
  167. data/lib/aws-sdk-sts/plugins/endpoints.rb +23 -30
  168. data/lib/aws-sdk-sts/presigner.rb +3 -7
  169. data/lib/aws-sdk-sts/types.rb +382 -31
  170. data/lib/aws-sdk-sts.rb +15 -11
  171. data/lib/seahorse/client/async_base.rb +4 -5
  172. data/lib/seahorse/client/async_response.rb +19 -0
  173. data/lib/seahorse/client/base.rb +18 -21
  174. data/lib/seahorse/client/configuration.rb +0 -4
  175. data/lib/seahorse/client/h2/connection.rb +18 -28
  176. data/lib/seahorse/client/h2/handler.rb +19 -3
  177. data/lib/seahorse/client/handler.rb +1 -1
  178. data/lib/seahorse/client/http/response.rb +1 -1
  179. data/lib/seahorse/client/net_http/connection_pool.rb +15 -12
  180. data/lib/seahorse/client/net_http/handler.rb +21 -9
  181. data/lib/seahorse/client/net_http/patches.rb +44 -14
  182. data/lib/seahorse/client/networking_error.rb +1 -1
  183. data/lib/seahorse/client/plugin.rb +9 -0
  184. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  185. data/lib/seahorse/client/plugins/h2.rb +4 -4
  186. data/lib/seahorse/client/plugins/net_http.rb +57 -16
  187. data/lib/seahorse/client/plugins/request_callback.rb +31 -0
  188. data/lib/seahorse/client/request_context.rb +9 -2
  189. data/lib/seahorse/client/response.rb +8 -0
  190. data/lib/seahorse/model/operation.rb +3 -0
  191. data/lib/seahorse/model/shapes.rb +2 -2
  192. data/lib/seahorse/util.rb +2 -1
  193. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  194. data/sig/aws-sdk-core/client_stubs.rbs +10 -0
  195. data/sig/aws-sdk-core/errors.rbs +22 -0
  196. data/sig/aws-sdk-core/resources/collection.rbs +21 -0
  197. data/sig/aws-sdk-core/structure.rbs +4 -0
  198. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  199. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  200. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  201. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  202. data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
  203. data/sig/aws-sdk-core.rbs +7 -0
  204. data/sig/seahorse/client/async_base.rbs +18 -0
  205. data/sig/seahorse/client/base.rbs +25 -0
  206. data/sig/seahorse/client/handler_builder.rbs +16 -0
  207. data/sig/seahorse/client/response.rbs +61 -0
  208. metadata +118 -23
  209. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  210. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  211. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  212. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  213. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -7,34 +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/defaults_mode.rb'
32
- require 'aws-sdk-core/plugins/recursion_detection.rb'
33
- require 'aws-sdk-core/plugins/sign.rb'
34
- require 'aws-sdk-core/plugins/protocols/query.rb'
35
- require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
36
-
37
- 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'
38
39
 
39
40
  module Aws::STS
40
41
  # An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
@@ -72,14 +73,17 @@ module Aws::STS
72
73
  add_plugin(Aws::Plugins::ResponsePaging)
73
74
  add_plugin(Aws::Plugins::StubResponses)
74
75
  add_plugin(Aws::Plugins::IdempotencyToken)
76
+ add_plugin(Aws::Plugins::InvocationId)
75
77
  add_plugin(Aws::Plugins::JsonvalueConverter)
76
78
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
77
79
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
78
80
  add_plugin(Aws::Plugins::TransferEncoding)
79
81
  add_plugin(Aws::Plugins::HttpChecksum)
80
82
  add_plugin(Aws::Plugins::ChecksumAlgorithm)
83
+ add_plugin(Aws::Plugins::RequestCompression)
81
84
  add_plugin(Aws::Plugins::DefaultsMode)
82
85
  add_plugin(Aws::Plugins::RecursionDetection)
86
+ add_plugin(Aws::Plugins::Telemetry)
83
87
  add_plugin(Aws::Plugins::Sign)
84
88
  add_plugin(Aws::Plugins::Protocols::Query)
85
89
  add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
@@ -87,9 +91,14 @@ module Aws::STS
87
91
 
88
92
  # @overload initialize(options)
89
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
+ #
90
99
  # @option options [required, Aws::CredentialProvider] :credentials
91
- # Your AWS credentials. This can be an instance of any one of the
92
- # following classes:
100
+ # Your AWS credentials used for authentication. This can be any class that includes and implements
101
+ # `Aws::CredentialProvider`, or instance of any one of the following classes:
93
102
  #
94
103
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
95
104
  # credentials.
@@ -117,20 +126,24 @@ module Aws::STS
117
126
  # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
118
127
  # from the Cognito Identity service.
119
128
  #
120
- # When `:credentials` are not configured directly, the following
121
- # locations will be searched for credentials:
129
+ # When `:credentials` are not configured directly, the following locations will be searched for credentials:
122
130
  #
123
131
  # * `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']
132
+ #
133
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
134
+ # `:account_id` options.
135
+ #
136
+ # * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
137
+ # `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
138
+ #
126
139
  # * `~/.aws/credentials`
140
+ #
127
141
  # * `~/.aws/config`
128
- # * EC2/ECS IMDS instance profile - When used by default, the timeouts
129
- # are very aggressive. Construct and pass an instance of
130
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
131
- # enable retries and extended timeouts. Instance profile credential
132
- # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
133
- # to true.
142
+ #
143
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive.
144
+ # Construct and pass an instance of `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
145
+ # enable retries and extended timeouts. Instance profile credential fetching can be disabled by
146
+ # setting `ENV['AWS_EC2_METADATA_DISABLED']` to `true`.
134
147
  #
135
148
  # @option options [required, String] :region
136
149
  # The AWS region to connect to. The configured `:region` is
@@ -146,6 +159,8 @@ module Aws::STS
146
159
  #
147
160
  # @option options [String] :access_key_id
148
161
  #
162
+ # @option options [String] :account_id
163
+ #
149
164
  # @option options [Boolean] :active_endpoint_cache (false)
150
165
  # When set to `true`, a thread polling for endpoints will be running in
151
166
  # the background every 60 secs (default). Defaults to `false`.
@@ -156,6 +171,11 @@ module Aws::STS
156
171
  # When false, the request will raise a `RetryCapacityNotAvailableError` and will
157
172
  # not retry instead of sleeping.
158
173
  #
174
+ # @option options [Array<String>] :auth_scheme_preference
175
+ # A list of preferred authentication schemes to use when making a request. Supported values are:
176
+ # `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
177
+ # shared config as `auth_scheme_preference`, the value should be a comma-separated list.
178
+ #
159
179
  # @option options [Boolean] :client_side_monitoring (false)
160
180
  # When `true`, client-side metrics will be collected for all API requests from
161
181
  # this client.
@@ -181,7 +201,7 @@ module Aws::STS
181
201
  # the required types.
182
202
  #
183
203
  # @option options [Boolean] :correct_clock_skew (true)
184
- # Used only in `standard` and adaptive retry modes. Specifies whether to apply
204
+ # Used only in `standard` and `adaptive` retry modes. Specifies whether to apply
185
205
  # a clock skew correction and retry requests with skewed client clocks.
186
206
  #
187
207
  # @option options [String] :defaults_mode ("legacy")
@@ -189,13 +209,22 @@ module Aws::STS
189
209
  # accepted modes and the configuration defaults that are included.
190
210
  #
191
211
  # @option options [Boolean] :disable_host_prefix_injection (false)
192
- # Set to true to disable SDK automatically adding host prefix
193
- # to default service endpoint when available.
212
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
213
+ #
214
+ # @option options [Boolean] :disable_request_compression (false)
215
+ # When set to 'true' the request body will not be compressed
216
+ # for supported operations.
194
217
  #
195
- # @option options [String] :endpoint
196
- # The client endpoint is normally constructed from the `:region`
197
- # option. You should only configure an `:endpoint` when connecting
198
- # to test or custom endpoints. This should be a valid HTTP(S) URI.
218
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
219
+ # Normally you should not configure the `:endpoint` option
220
+ # directly. This is normally constructed from the `:region`
221
+ # option. Configuring `:endpoint` is normally reserved for
222
+ # connecting to test or custom endpoints. The endpoint should
223
+ # be a URI formatted like:
224
+ #
225
+ # 'http://example.com'
226
+ # 'https://example.com'
227
+ # 'http://example.com:123'
199
228
  #
200
229
  # @option options [Integer] :endpoint_cache_max_entries (1000)
201
230
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -212,6 +241,10 @@ module Aws::STS
212
241
  # @option options [Boolean] :endpoint_discovery (false)
213
242
  # When set to `true`, endpoint discovery will be enabled for operations when available.
214
243
  #
244
+ # @option options [Boolean] :ignore_configured_endpoint_urls
245
+ # Setting to true disables use of endpoint URLs provided via environment
246
+ # variables and the shared configuration file.
247
+ #
215
248
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
216
249
  # The log formatter.
217
250
  #
@@ -229,8 +262,36 @@ module Aws::STS
229
262
  # 4 times. Used in `standard` and `adaptive` retry modes.
230
263
  #
231
264
  # @option options [String] :profile ("default")
232
- # Used when loading credentials from the shared credentials file
233
- # at HOME/.aws/credentials. When not specified, 'default' is used.
265
+ # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
266
+ # When not specified, 'default' is used.
267
+ #
268
+ # @option options [String] :request_checksum_calculation ("when_supported")
269
+ # Determines when a checksum will be calculated for request payloads. Values are:
270
+ #
271
+ # * `when_supported` - (default) When set, a checksum will be
272
+ # calculated for all request payloads of operations modeled with the
273
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
274
+ # `requestAlgorithmMember` is modeled.
275
+ # * `when_required` - When set, a checksum will only be calculated for
276
+ # request payloads of operations modeled with the `httpChecksum` trait where
277
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
278
+ # is modeled and supplied.
279
+ #
280
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
281
+ # The minimum size in bytes that triggers compression for request
282
+ # bodies. The value must be non-negative integer value between 0
283
+ # and 10485780 bytes inclusive.
284
+ #
285
+ # @option options [String] :response_checksum_validation ("when_supported")
286
+ # Determines when checksum validation will be performed on response payloads. Values are:
287
+ #
288
+ # * `when_supported` - (default) When set, checksum validation is performed on all
289
+ # response payloads of operations modeled with the `httpChecksum` trait where
290
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
291
+ # are supported.
292
+ # * `when_required` - When set, checksum validation is not performed on
293
+ # response payloads of operations unless the checksum algorithm is supported and
294
+ # the `requestValidationModeMember` member is set to `ENABLED`.
234
295
  #
235
296
  # @option options [Proc] :retry_backoff
236
297
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
@@ -264,23 +325,35 @@ module Aws::STS
264
325
  # @option options [String] :retry_mode ("legacy")
265
326
  # Specifies which retry algorithm to use. Values are:
266
327
  #
267
- # * `legacy` - The pre-existing retry behavior. This is default value if
268
- # no retry mode is provided.
328
+ # * `legacy` - The pre-existing retry behavior. This is the default
329
+ # value if no retry mode is provided.
269
330
  #
270
331
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
271
332
  # This includes support for retry quotas, which limit the number of
272
333
  # unsuccessful retries a client can make.
273
334
  #
274
- # * `adaptive` - An experimental retry mode that includes all the
275
- # functionality of `standard` mode along with automatic client side
276
- # throttling. This is a provisional mode that may change behavior
277
- # in the future.
335
+ # * `adaptive` - A retry mode that includes all the functionality of
336
+ # `standard` mode along with automatic client side throttling.
278
337
  #
338
+ # @option options [String] :sdk_ua_app_id
339
+ # A unique and opaque application ID that is appended to the
340
+ # User-Agent header as app/sdk_ua_app_id. It should have a
341
+ # maximum length of 50. This variable is sourced from environment
342
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
279
343
  #
280
344
  # @option options [String] :secret_access_key
281
345
  #
282
346
  # @option options [String] :session_token
283
347
  #
348
+ # @option options [Array] :sigv4a_signing_region_set
349
+ # A list of regions that should be signed with SigV4a signing. When
350
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
351
+ # in the following locations:
352
+ #
353
+ # * `Aws.config[:sigv4a_signing_region_set]`
354
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
355
+ # * `~/.aws/config`
356
+ #
284
357
  # @option options [String] :sts_regional_endpoints ("regional")
285
358
  # Passing in 'regional' to enable regional endpoint for STS for all supported
286
359
  # regions (except 'aws-global'). Using 'legacy' mode will force all legacy
@@ -295,9 +368,19 @@ module Aws::STS
295
368
  # ** Please note ** When response stubbing is enabled, no HTTP
296
369
  # requests are made, and retries are disabled.
297
370
  #
371
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
372
+ # Allows you to provide a telemetry provider, which is used to
373
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
374
+ # will not record or emit any telemetry data. The SDK supports the
375
+ # following telemetry providers:
376
+ #
377
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
378
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
379
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
380
+ #
298
381
  # @option options [Aws::TokenProvider] :token_provider
299
- # A Bearer Token Provider. This can be an instance of any one of the
300
- # following classes:
382
+ # Your Bearer token used for authentication. This can be any class that includes and implements
383
+ # `Aws::TokenProvider`, or instance of any one of the following classes:
301
384
  #
302
385
  # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
303
386
  # tokens.
@@ -322,52 +405,75 @@ module Aws::STS
322
405
  # sending the request.
323
406
  #
324
407
  # @option options [Aws::STS::EndpointProvider] :endpoint_provider
325
- # 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`
326
- #
327
- # @option options [URI::HTTP,String] :http_proxy A proxy to send
328
- # requests through. Formatted like 'http://proxy.com:123'.
329
- #
330
- # @option options [Float] :http_open_timeout (15) The number of
331
- # seconds to wait when opening a HTTP session before raising a
332
- # `Timeout::Error`.
333
- #
334
- # @option options [Float] :http_read_timeout (60) The default
335
- # number of seconds to wait for response data. This value can
336
- # safely be set per-request on the session.
337
- #
338
- # @option options [Float] :http_idle_timeout (5) The number of
339
- # seconds a connection is allowed to sit idle before it is
340
- # considered stale. Stale connections are closed and removed
341
- # from the pool before making a request.
342
- #
343
- # @option options [Float] :http_continue_timeout (1) The number of
344
- # seconds to wait for a 100-continue response before sending the
345
- # request body. This option has no effect unless the request has
346
- # "Expect" header set to "100-continue". Defaults to `nil` which
347
- # disables this behaviour. This value can safely be set per
348
- # request on the session.
408
+ # The endpoint provider used to resolve endpoints. Any object that responds to
409
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
410
+ # `Aws::STS::EndpointParameters`.
411
+ #
412
+ # @option options [Float] :http_continue_timeout (1)
413
+ # The number of seconds to wait for a 100-continue response before sending the
414
+ # request body. This option has no effect unless the request has "Expect"
415
+ # header set to "100-continue". Defaults to `nil` which disables this
416
+ # behaviour. This value can safely be set per request on the session.
417
+ #
418
+ # @option options [Float] :http_idle_timeout (5)
419
+ # The number of seconds a connection is allowed to sit idle before it
420
+ # is considered stale. Stale connections are closed and removed from the
421
+ # pool before making a request.
422
+ #
423
+ # @option options [Float] :http_open_timeout (15)
424
+ # The default number of seconds to wait for response data.
425
+ # This value can safely be set per-request on the session.
426
+ #
427
+ # @option options [URI::HTTP,String] :http_proxy
428
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
429
+ #
430
+ # @option options [Float] :http_read_timeout (60)
431
+ # The default number of seconds to wait for response data.
432
+ # This value can safely be set per-request on the session.
433
+ #
434
+ # @option options [Boolean] :http_wire_trace (false)
435
+ # When `true`, HTTP debug output will be sent to the `:logger`.
436
+ #
437
+ # @option options [Proc] :on_chunk_received
438
+ # When a Proc object is provided, it will be used as callback when each chunk
439
+ # of the response body is received. It provides three arguments: the chunk,
440
+ # the number of bytes received, and the total number of
441
+ # bytes in the response (or nil if the server did not send a `content-length`).
442
+ #
443
+ # @option options [Proc] :on_chunk_sent
444
+ # When a Proc object is provided, it will be used as callback when each chunk
445
+ # of the request body is sent. It provides three arguments: the chunk,
446
+ # the number of bytes read from the body, and the total number of
447
+ # bytes in the body.
448
+ #
449
+ # @option options [Boolean] :raise_response_errors (true)
450
+ # When `true`, response errors are raised.
451
+ #
452
+ # @option options [String] :ssl_ca_bundle
453
+ # Full path to the SSL certificate authority bundle file that should be used when
454
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
455
+ # `:ssl_ca_directory` the the system default will be used if available.
456
+ #
457
+ # @option options [String] :ssl_ca_directory
458
+ # Full path of the directory that contains the unbundled SSL certificate
459
+ # authority files for verifying peer certificates. If you do
460
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
461
+ # default will be used if available.
349
462
  #
350
- # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
351
- # in seconds.
463
+ # @option options [String] :ssl_ca_store
464
+ # Sets the X509::Store to verify peer certificate.
352
465
  #
353
- # @option options [Boolean] :http_wire_trace (false) When `true`,
354
- # HTTP debug output will be sent to the `:logger`.
466
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
467
+ # Sets a client certificate when creating http connections.
355
468
  #
356
- # @option options [Boolean] :ssl_verify_peer (true) When `true`,
357
- # SSL peer certificates are verified when establishing a
358
- # connection.
469
+ # @option options [OpenSSL::PKey] :ssl_key
470
+ # Sets a client key when creating http connections.
359
471
  #
360
- # @option options [String] :ssl_ca_bundle Full path to the SSL
361
- # certificate authority bundle file that should be used when
362
- # verifying peer certificates. If you do not pass
363
- # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
364
- # will be used if available.
472
+ # @option options [Float] :ssl_timeout
473
+ # Sets the SSL timeout in seconds
365
474
  #
366
- # @option options [String] :ssl_ca_directory Full path of the
367
- # directory that contains the unbundled SSL certificate
368
- # authority files for verifying peer certificates. If you do
369
- # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
370
- # system default will be used if available.
475
+ # @option options [Boolean] :ssl_verify_peer (true)
476
+ # When `true`, SSL peer certificates are verified when establishing a connection.
371
477
  #
372
478
  def initialize(*args)
373
479
  super
@@ -381,8 +487,8 @@ module Aws::STS
381
487
  # token. Typically, you use `AssumeRole` within your account or for
382
488
  # cross-account access. For a comparison of `AssumeRole` with other API
383
489
  # operations that produce temporary credentials, see [Requesting
384
- # Temporary Security Credentials][1] and [Comparing the Amazon Web
385
- # Services STS API operations][2] in the *IAM User Guide*.
490
+ # Temporary Security Credentials][1] and [Compare STS credentials][2] in
491
+ # the *IAM User Guide*.
386
492
  #
387
493
  # **Permissions**
388
494
  #
@@ -391,9 +497,9 @@ module Aws::STS
391
497
  # following exception: You cannot call the Amazon Web Services STS
392
498
  # `GetFederationToken` or `GetSessionToken` API operations.
393
499
  #
394
- # (Optional) You can pass inline or managed [session policies][3] to
395
- # this operation. You can pass a single JSON policy document to use as
396
- # an inline session policy. You can also specify up to 10 managed policy
500
+ # (Optional) You can pass inline or managed session policies to this
501
+ # operation. You can pass a single JSON policy document to use as an
502
+ # inline session policy. You can also specify up to 10 managed policy
397
503
  # Amazon Resource Names (ARNs) to use as managed session policies. The
398
504
  # plaintext that you use for both inline and managed session policies
399
505
  # can't exceed 2,048 characters. Passing policies to this operation
@@ -466,7 +572,7 @@ module Aws::STS
466
572
  # denied. The condition in a trust policy that tests for MFA
467
573
  # authentication might look like the following example.
468
574
  #
469
- # `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
575
+ # `"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}`
470
576
  #
471
577
  # For more information, see [Configuring MFA-Protected API Access][8] in
472
578
  # the *IAM User Guide* guide.
@@ -479,7 +585,7 @@ module Aws::STS
479
585
  #
480
586
  #
481
587
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
482
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
588
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
483
589
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
484
590
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
485
591
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
@@ -502,10 +608,21 @@ module Aws::STS
502
608
  # credentials will expose the role session name to the external account
503
609
  # in their CloudTrail logs.
504
610
  #
611
+ # For security purposes, administrators can view this field in
612
+ # [CloudTrail logs][1] to help identify who performed an action in
613
+ # Amazon Web Services. Your administrator might require that you specify
614
+ # your user name as the session name when you assume the role. For more
615
+ # information, see [ `sts:RoleSessionName` ][2].
616
+ #
505
617
  # The regex used to validate this parameter is a string of characters
506
618
  # consisting of upper- and lower-case alphanumeric characters with no
507
619
  # spaces. You can also include underscores or any of the following
508
- # characters: =,.@-
620
+ # characters: +=,.@-
621
+ #
622
+ #
623
+ #
624
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
625
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
509
626
  #
510
627
  # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
511
628
  # The Amazon Resource Names (ARNs) of the IAM managed policies that you
@@ -572,6 +689,9 @@ module Aws::STS
572
689
  #
573
690
  # </note>
574
691
  #
692
+ # For more information about role session permissions, see [Session
693
+ # policies][1].
694
+ #
575
695
  #
576
696
  #
577
697
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
@@ -594,9 +714,8 @@ module Aws::STS
594
714
  # depending on the maximum session duration setting for your role.
595
715
  # However, if you assume a role using role chaining and provide a
596
716
  # `DurationSeconds` parameter value greater than one hour, the operation
597
- # fails. To learn how to view the maximum value for your role, see [View
598
- # the Maximum Session Duration Setting for a Role][1] in the *IAM User
599
- # Guide*.
717
+ # fails. To learn how to view the maximum value for your role, see
718
+ # [Update the maximum session duration for a role][1].
600
719
  #
601
720
  # By default, the value is set to `3600` seconds.
602
721
  #
@@ -612,7 +731,7 @@ module Aws::STS
612
731
  #
613
732
  #
614
733
  #
615
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
734
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
616
735
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
617
736
  #
618
737
  # @option params [Array<Types::Tag>] :tags
@@ -665,9 +784,8 @@ module Aws::STS
665
784
  # passes to subsequent sessions in a role chain. For more information,
666
785
  # see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
667
786
  #
668
- # This parameter is optional. When you set session tags as transitive,
669
- # the session policy and session tags packed binary limit is not
670
- # affected.
787
+ # This parameter is optional. The transitive status of a session tag
788
+ # does not impact its packed binary size.
671
789
  #
672
790
  # If you choose not to specify a transitive tag key, then no tags are
673
791
  # passed from this session to any subsequent sessions.
@@ -693,7 +811,7 @@ module Aws::STS
693
811
  # The regex used to validate this parameter is a string of characters
694
812
  # consisting of upper- and lower-case alphanumeric characters with no
695
813
  # spaces. You can also include underscores or any of the following
696
- # characters: =,.@:/-
814
+ # characters: +=,.@:\\/-
697
815
  #
698
816
  #
699
817
  #
@@ -711,7 +829,7 @@ module Aws::STS
711
829
  # The regex used to validate this parameter is a string of characters
712
830
  # consisting of upper- and lower-case alphanumeric characters with no
713
831
  # spaces. You can also include underscores or any of the following
714
- # characters: =,.@-
832
+ # characters: +=/:,.@-
715
833
  #
716
834
  # @option params [String] :token_code
717
835
  # The value provided by the MFA device, if the trust policy of the role
@@ -725,26 +843,40 @@ module Aws::STS
725
843
  #
726
844
  # @option params [String] :source_identity
727
845
  # The source identity specified by the principal that is calling the
728
- # `AssumeRole` operation.
846
+ # `AssumeRole` operation. The source identity value persists across
847
+ # [chained role][1] sessions.
729
848
  #
730
849
  # You can require users to specify a source identity when they assume a
731
- # role. You do this by using the `sts:SourceIdentity` condition key in a
732
- # role trust policy. You can use source identity information in
850
+ # role. You do this by using the [ `sts:SourceIdentity` ][2] condition
851
+ # key in a role trust policy. You can use source identity information in
733
852
  # CloudTrail logs to determine who took actions with a role. You can use
734
853
  # the `aws:SourceIdentity` condition key to further control access to
735
854
  # Amazon Web Services resources based on the value of source identity.
736
855
  # For more information about using source identity, see [Monitor and
737
- # control actions taken with assumed roles][1] in the *IAM User Guide*.
856
+ # control actions taken with assumed roles][3] in the *IAM User Guide*.
738
857
  #
739
858
  # The regex used to validate this parameter is a string of characters
740
859
  # consisting of upper- and lower-case alphanumeric characters with no
741
860
  # spaces. You can also include underscores or any of the following
742
- # characters: =,.@-. You cannot use a value that begins with the text
861
+ # characters: +=,.@-. You cannot use a value that begins with the text
743
862
  # `aws:`. This prefix is reserved for Amazon Web Services internal use.
744
863
  #
745
864
  #
746
865
  #
747
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
866
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
867
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
868
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
869
+ #
870
+ # @option params [Array<Types::ProvidedContext>] :provided_contexts
871
+ # A list of previously acquired trusted context assertions in the format
872
+ # of a JSON array. The trusted context assertion is signed and encrypted
873
+ # by Amazon Web Services STS.
874
+ #
875
+ # The following is an example of a `ProvidedContext` value that includes
876
+ # a single trusted context assertion and the ARN of the context provider
877
+ # from which the trusted context assertion was generated.
878
+ #
879
+ # `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
748
880
  #
749
881
  # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
750
882
  #
@@ -758,7 +890,7 @@ module Aws::STS
758
890
  #
759
891
  # resp = client.assume_role({
760
892
  # external_id: "123ABC",
761
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
893
+ # policy: "escaped-JSON-IAM-POLICY",
762
894
  # role_arn: "arn:aws:iam::123456789012:role/demo",
763
895
  # role_session_name: "testAssumeRoleSession",
764
896
  # tags: [
@@ -806,7 +938,7 @@ module Aws::STS
806
938
  # arn: "arnType",
807
939
  # },
808
940
  # ],
809
- # policy: "sessionPolicyDocumentType",
941
+ # policy: "unrestrictedSessionPolicyDocumentType",
810
942
  # duration_seconds: 1,
811
943
  # tags: [
812
944
  # {
@@ -819,6 +951,12 @@ module Aws::STS
819
951
  # serial_number: "serialNumberType",
820
952
  # token_code: "tokenCodeType",
821
953
  # source_identity: "sourceIdentityType",
954
+ # provided_contexts: [
955
+ # {
956
+ # provider_arn: "arnType",
957
+ # context_assertion: "contextAssertionType",
958
+ # },
959
+ # ],
822
960
  # })
823
961
  #
824
962
  # @example Response structure
@@ -848,14 +986,19 @@ module Aws::STS
848
986
  # user-specific credentials or configuration. For a comparison of
849
987
  # `AssumeRoleWithSAML` with the other API operations that produce
850
988
  # temporary credentials, see [Requesting Temporary Security
851
- # Credentials][1] and [Comparing the Amazon Web Services STS API
852
- # operations][2] in the *IAM User Guide*.
989
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
990
+ # Guide*.
853
991
  #
854
992
  # The temporary security credentials returned by this operation consist
855
993
  # of an access key ID, a secret access key, and a security token.
856
994
  # Applications can use these temporary security credentials to sign
857
995
  # calls to Amazon Web Services services.
858
996
  #
997
+ # <note markdown="1"> AssumeRoleWithSAML will not work on IAM Identity Center managed roles.
998
+ # These roles' names start with `AWSReservedSSO_`.
999
+ #
1000
+ # </note>
1001
+ #
859
1002
  # **Session Duration**
860
1003
  #
861
1004
  # By default, the temporary security credentials created by
@@ -979,7 +1122,7 @@ module Aws::STS
979
1122
  #
980
1123
  #
981
1124
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
982
- # [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
983
1126
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
984
1127
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
985
1128
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
@@ -1067,6 +1210,9 @@ module Aws::STS
1067
1210
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1068
1211
  # characters.
1069
1212
  #
1213
+ # For more information about role session permissions, see [Session
1214
+ # policies][1].
1215
+ #
1070
1216
  # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1071
1217
  # policy, managed policy ARNs, and session tags into a packed binary
1072
1218
  # format that has a separate limit. Your request can fail for this limit
@@ -1221,8 +1367,8 @@ module Aws::STS
1221
1367
  # a token from the web identity provider. For a comparison of
1222
1368
  # `AssumeRoleWithWebIdentity` with the other API operations that produce
1223
1369
  # temporary credentials, see [Requesting Temporary Security
1224
- # Credentials][4] and [Comparing the Amazon Web Services STS API
1225
- # operations][5] in the *IAM User Guide*.
1370
+ # Credentials][4] and [Compare STS credentials][5] in the *IAM User
1371
+ # Guide*.
1226
1372
  #
1227
1373
  # The temporary security credentials returned by this API consist of an
1228
1374
  # access key ID, a secret access key, and a security token. Applications
@@ -1237,9 +1383,9 @@ module Aws::STS
1237
1383
  # your session. You can provide a value from 900 seconds (15 minutes) up
1238
1384
  # to the maximum session duration setting for the role. This setting can
1239
1385
  # have a value from 1 hour to 12 hours. To learn how to view the maximum
1240
- # value for your role, see [View the Maximum Session Duration Setting
1241
- # for a Role][6] in the *IAM User Guide*. The maximum session duration
1242
- # 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
1243
1389
  # `assume-role*` CLI commands. However the limit does not apply when you
1244
1390
  # use those operations to create a console URL. For more information,
1245
1391
  # see [Using IAM Roles][7] in the *IAM User Guide*.
@@ -1271,7 +1417,8 @@ module Aws::STS
1271
1417
  # (Optional) You can configure your IdP to pass attributes into your web
1272
1418
  # identity token as session tags. Each session tag consists of a key
1273
1419
  # name and an associated value. For more information about session tags,
1274
- # see [Passing Session Tags in STS][9] in the *IAM User Guide*.
1420
+ # see [Passing session tags using AssumeRoleWithWebIdentity][9] in the
1421
+ # *IAM User Guide*.
1275
1422
  #
1276
1423
  # You can pass up to 50 session tags. The plaintext session tag keys
1277
1424
  # can’t exceed 128 characters and the values can’t exceed 256
@@ -1317,38 +1464,29 @@ module Aws::STS
1317
1464
  # instead use a GUID or a pairwise identifier, as [suggested in the OIDC
1318
1465
  # specification][14].
1319
1466
  #
1320
- # For more information about how to use web identity federation and the
1467
+ # For more information about how to use OIDC federation and the
1321
1468
  # `AssumeRoleWithWebIdentity` API, see the following resources:
1322
1469
  #
1323
1470
  # * [Using Web Identity Federation API Operations for Mobile Apps][15]
1324
1471
  # and [Federation Through a Web-based Identity Provider][16].
1325
1472
  #
1326
- # * [ Web Identity Federation Playground][17]. Walk through the process
1327
- # of authenticating through Login with Amazon, Facebook, or Google,
1328
- # getting temporary security credentials, and then using those
1329
- # credentials to make a request to Amazon Web Services.
1330
- #
1331
1473
  # * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
1332
1474
  # Services SDK for Android Developer Guide][3]. These toolkits contain
1333
1475
  # sample apps that show how to invoke the identity providers. The
1334
1476
  # toolkits then show how to use the information from these providers
1335
1477
  # to get and use temporary security credentials.
1336
1478
  #
1337
- # * [Web Identity Federation with Mobile Applications][18]. This article
1338
- # discusses web identity federation and shows an example of how to use
1339
- # web identity federation to get access to content in Amazon S3.
1340
- #
1341
1479
  #
1342
1480
  #
1343
1481
  # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
1344
1482
  # [2]: http://aws.amazon.com/sdkforios/
1345
1483
  # [3]: http://aws.amazon.com/sdkforandroid/
1346
1484
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1347
- # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1348
- # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1485
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
1486
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
1349
1487
  # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
1350
1488
  # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1351
- # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
1489
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_adding-assume-role-idp
1352
1490
  # [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
1353
1491
  # [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
1354
1492
  # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
@@ -1356,13 +1494,29 @@ module Aws::STS
1356
1494
  # [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
1357
1495
  # [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
1358
1496
  # [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1359
- # [17]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
1360
- # [18]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
1361
1497
  #
1362
1498
  # @option params [required, String] :role_arn
1363
1499
  # The Amazon Resource Name (ARN) of the role that the caller is
1364
1500
  # assuming.
1365
1501
  #
1502
+ # <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools that
1503
+ # assume [cross-account IAM roles][1]. The trust policies of these roles
1504
+ # must accept the `cognito-identity.amazonaws.com` service principal and
1505
+ # must contain the `cognito-identity.amazonaws.com:aud` condition key to
1506
+ # restrict role assumption to users from your intended identity pools. A
1507
+ # policy that trusts Amazon Cognito identity pools without this
1508
+ # condition creates a risk that a user from an unintended identity pool
1509
+ # can assume the role. For more information, see [ Trust policies for
1510
+ # IAM roles in Basic (Classic) authentication ][2] in the *Amazon
1511
+ # Cognito Developer Guide*.
1512
+ #
1513
+ # </note>
1514
+ #
1515
+ #
1516
+ #
1517
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
1518
+ # [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
1519
+ #
1366
1520
  # @option params [required, String] :role_session_name
1367
1521
  # An identifier for the assumed role session. Typically, you pass the
1368
1522
  # name or identifier that is associated with the user who is using your
@@ -1371,17 +1525,31 @@ module Aws::STS
1371
1525
  # is included as part of the ARN and assumed role ID in the
1372
1526
  # `AssumedRoleUser` response element.
1373
1527
  #
1528
+ # For security purposes, administrators can view this field in
1529
+ # [CloudTrail logs][1] to help identify who performed an action in
1530
+ # Amazon Web Services. Your administrator might require that you specify
1531
+ # your user name as the session name when you assume the role. For more
1532
+ # information, see [ `sts:RoleSessionName` ][2].
1533
+ #
1374
1534
  # The regex used to validate this parameter is a string of characters
1375
1535
  # consisting of upper- and lower-case alphanumeric characters with no
1376
1536
  # spaces. You can also include underscores or any of the following
1377
1537
  # characters: =,.@-
1378
1538
  #
1539
+ #
1540
+ #
1541
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
1542
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
1543
+ #
1379
1544
  # @option params [required, String] :web_identity_token
1380
1545
  # The OAuth 2.0 access token or OpenID Connect ID token that is provided
1381
1546
  # by the identity provider. Your application must get this token by
1382
1547
  # authenticating the user who is using your application with a web
1383
1548
  # identity provider before the application makes an
1384
- # `AssumeRoleWithWebIdentity` call.
1549
+ # `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
1550
+ # formatted as either an integer or a long integer. Tokens must be
1551
+ # signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
1552
+ # (ES256, ES384, or ES512).
1385
1553
  #
1386
1554
  # @option params [String] :provider_id
1387
1555
  # The fully qualified host component of the domain name of the OAuth 2.0
@@ -1450,6 +1618,9 @@ module Aws::STS
1450
1618
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1451
1619
  # characters.
1452
1620
  #
1621
+ # For more information about role session permissions, see [Session
1622
+ # policies][1].
1623
+ #
1453
1624
  # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1454
1625
  # policy, managed policy ARNs, and session tags into a packed binary
1455
1626
  # format that has a separate limit. Your request can fail for this limit
@@ -1506,7 +1677,7 @@ module Aws::STS
1506
1677
  #
1507
1678
  # resp = client.assume_role_with_web_identity({
1508
1679
  # duration_seconds: 3600,
1509
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
1680
+ # policy: "escaped-JSON-IAM-POLICY",
1510
1681
  # provider_id: "www.amazon.com",
1511
1682
  # role_arn: "arn:aws:iam::123456789012:role/FederatedWebIdentityRole",
1512
1683
  # role_session_name: "app1",
@@ -1570,6 +1741,134 @@ module Aws::STS
1570
1741
  req.send_request(options)
1571
1742
  end
1572
1743
 
1744
+ # Returns a set of short term credentials you can use to perform
1745
+ # privileged tasks on a member account in your organization. You must
1746
+ # use credentials from an Organizations management account or a
1747
+ # delegated administrator account for IAM to call `AssumeRoot`. You
1748
+ # cannot use root user credentials to make this call.
1749
+ #
1750
+ # Before you can launch a privileged session, you must have centralized
1751
+ # root access in your organization. For steps to enable this feature,
1752
+ # see [Centralize root access for member accounts][1] in the *IAM User
1753
+ # Guide*.
1754
+ #
1755
+ # <note markdown="1"> The STS global endpoint is not supported for AssumeRoot. You must send
1756
+ # this request to a Regional STS endpoint. For more information, see
1757
+ # [Endpoints][2].
1758
+ #
1759
+ # </note>
1760
+ #
1761
+ # You can track AssumeRoot in CloudTrail logs to determine what actions
1762
+ # were performed in a session. For more information, see [Track
1763
+ # privileged tasks in CloudTrail][3] in the *IAM User Guide*.
1764
+ #
1765
+ # When granting access to privileged tasks you should only grant the
1766
+ # necessary permissions required to perform that task. For more
1767
+ # information, see [Security best practices in IAM][4]. In addition, you
1768
+ # can use [service control policies][5] (SCPs) to manage and limit
1769
+ # permissions in your organization. See [General examples][6] in the
1770
+ # *Organizations User Guide* for more information on SCPs.
1771
+ #
1772
+ #
1773
+ #
1774
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
1775
+ # [2]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
1776
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
1777
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
1778
+ # [5]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html
1779
+ # [6]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_general.html
1780
+ #
1781
+ # @option params [required, String] :target_principal
1782
+ # The member account principal ARN or account ID.
1783
+ #
1784
+ # @option params [required, Types::PolicyDescriptorType] :task_policy_arn
1785
+ # The identity based policy that scopes the session to the privileged
1786
+ # tasks that can be performed. You must use one of following Amazon Web
1787
+ # Services managed policies to scope root session actions:
1788
+ #
1789
+ # * [IAMAuditRootUserCredentials][1]
1790
+ #
1791
+ # * [IAMCreateRootUserPassword][2]
1792
+ #
1793
+ # * [IAMDeleteRootUserCredentials][3]
1794
+ #
1795
+ # * [S3UnlockBucketPolicy][4]
1796
+ #
1797
+ # * [SQSUnlockQueuePolicy][5]
1798
+ #
1799
+ #
1800
+ #
1801
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
1802
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
1803
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
1804
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
1805
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
1806
+ #
1807
+ # @option params [Integer] :duration_seconds
1808
+ # The duration, in seconds, of the privileged session. The value can
1809
+ # range from 0 seconds up to the maximum session duration of 900 seconds
1810
+ # (15 minutes). If you specify a value higher than this setting, the
1811
+ # operation fails.
1812
+ #
1813
+ # By default, the value is set to `900` seconds.
1814
+ #
1815
+ # @return [Types::AssumeRootResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1816
+ #
1817
+ # * {Types::AssumeRootResponse#credentials #credentials} => Types::Credentials
1818
+ # * {Types::AssumeRootResponse#source_identity #source_identity} => String
1819
+ #
1820
+ #
1821
+ # @example Example: To launch a privileged session
1822
+ #
1823
+ # # The following command retrieves a set of short-term credentials you can use to unlock an S3 bucket for a member account
1824
+ # # by removing the bucket policy.
1825
+ #
1826
+ # resp = client.assume_root({
1827
+ # duration_seconds: 900,
1828
+ # target_principal: "111122223333",
1829
+ # task_policy_arn: {
1830
+ # arn: "arn:aws:iam::aws:policy/root-task/S3UnlockBucketPolicy",
1831
+ # },
1832
+ # })
1833
+ #
1834
+ # resp.to_h outputs the following:
1835
+ # {
1836
+ # credentials: {
1837
+ # access_key_id: "ASIAJEXAMPLEXEG2JICEA",
1838
+ # expiration: Time.parse("2024-11-15T00:05:07Z"),
1839
+ # secret_access_key: "9drTJvcXLB89EXAMPLELB8923FB892xMFI",
1840
+ # session_token: "AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=",
1841
+ # },
1842
+ # source_identity: "Alice",
1843
+ # }
1844
+ #
1845
+ # @example Request syntax with placeholder values
1846
+ #
1847
+ # resp = client.assume_root({
1848
+ # target_principal: "TargetPrincipalType", # required
1849
+ # task_policy_arn: { # required
1850
+ # arn: "arnType",
1851
+ # },
1852
+ # duration_seconds: 1,
1853
+ # })
1854
+ #
1855
+ # @example Response structure
1856
+ #
1857
+ # resp.credentials.access_key_id #=> String
1858
+ # resp.credentials.secret_access_key #=> String
1859
+ # resp.credentials.session_token #=> String
1860
+ # resp.credentials.expiration #=> Time
1861
+ # resp.source_identity #=> String
1862
+ #
1863
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoot AWS API Documentation
1864
+ #
1865
+ # @overload assume_root(params = {})
1866
+ # @param [Hash] params ({})
1867
+ def assume_root(params = {}, options = {})
1868
+ req = build_request(:assume_root, params)
1869
+ req.send_request(options)
1870
+ end
1871
+
1573
1872
  # Decodes additional information about the authorization status of a
1574
1873
  # request from an encoded message returned in response to an Amazon Web
1575
1874
  # Services request.
@@ -1796,6 +2095,46 @@ module Aws::STS
1796
2095
  req.send_request(options)
1797
2096
  end
1798
2097
 
2098
+ # Exchanges a trade-in token for temporary Amazon Web Services
2099
+ # credentials with the permissions associated with the assumed
2100
+ # principal. This operation allows you to obtain credentials for a
2101
+ # specific principal based on a trade-in token, enabling delegation of
2102
+ # access to Amazon Web Services resources.
2103
+ #
2104
+ # @option params [required, String] :trade_in_token
2105
+ # The token to exchange for temporary Amazon Web Services credentials.
2106
+ # This token must be valid and unexpired at the time of the request.
2107
+ #
2108
+ # @return [Types::GetDelegatedAccessTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2109
+ #
2110
+ # * {Types::GetDelegatedAccessTokenResponse#credentials #credentials} => Types::Credentials
2111
+ # * {Types::GetDelegatedAccessTokenResponse#packed_policy_size #packed_policy_size} => Integer
2112
+ # * {Types::GetDelegatedAccessTokenResponse#assumed_principal #assumed_principal} => String
2113
+ #
2114
+ # @example Request syntax with placeholder values
2115
+ #
2116
+ # resp = client.get_delegated_access_token({
2117
+ # trade_in_token: "tradeInTokenType", # required
2118
+ # })
2119
+ #
2120
+ # @example Response structure
2121
+ #
2122
+ # resp.credentials.access_key_id #=> String
2123
+ # resp.credentials.secret_access_key #=> String
2124
+ # resp.credentials.session_token #=> String
2125
+ # resp.credentials.expiration #=> Time
2126
+ # resp.packed_policy_size #=> Integer
2127
+ # resp.assumed_principal #=> String
2128
+ #
2129
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetDelegatedAccessToken AWS API Documentation
2130
+ #
2131
+ # @overload get_delegated_access_token(params = {})
2132
+ # @param [Hash] params ({})
2133
+ def get_delegated_access_token(params = {}, options = {})
2134
+ req = build_request(:get_delegated_access_token, params)
2135
+ req.send_request(options)
2136
+ end
2137
+
1799
2138
  # Returns a set of temporary security credentials (consisting of an
1800
2139
  # access key ID, a secret access key, and a security token) for a user.
1801
2140
  # A typical use is in a proxy application that gets temporary security
@@ -1808,8 +2147,8 @@ module Aws::STS
1808
2147
  # usually in a server-based application. For a comparison of
1809
2148
  # `GetFederationToken` with the other API operations that produce
1810
2149
  # temporary credentials, see [Requesting Temporary Security
1811
- # Credentials][1] and [Comparing the Amazon Web Services STS API
1812
- # operations][2] in the *IAM User Guide*.
2150
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
2151
+ # Guide*.
1813
2152
  #
1814
2153
  # Although it is possible to call `GetFederationToken` using the
1815
2154
  # security credentials of an Amazon Web Services account root user
@@ -1906,7 +2245,7 @@ module Aws::STS
1906
2245
  #
1907
2246
  #
1908
2247
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1909
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
2248
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
1910
2249
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
1911
2250
  # [4]: http://aws.amazon.com/cognito/
1912
2251
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
@@ -2078,7 +2417,7 @@ module Aws::STS
2078
2417
  # resp = client.get_federation_token({
2079
2418
  # duration_seconds: 3600,
2080
2419
  # name: "testFedUserSession",
2081
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
2420
+ # policy: "escaped-JSON-IAM-POLICY",
2082
2421
  # tags: [
2083
2422
  # {
2084
2423
  # key: "Project",
@@ -2158,8 +2497,8 @@ module Aws::STS
2158
2497
  # An incorrect MFA code causes the API to return an access denied error.
2159
2498
  # For a comparison of `GetSessionToken` with the other API operations
2160
2499
  # that produce temporary credentials, see [Requesting Temporary Security
2161
- # Credentials][1] and [Comparing the Amazon Web Services STS API
2162
- # operations][2] in the *IAM User Guide*.
2500
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
2501
+ # Guide*.
2163
2502
  #
2164
2503
  # <note markdown="1"> No permissions are required for users to perform this operation. The
2165
2504
  # purpose of the `sts:GetSessionToken` operation is to authenticate the
@@ -2214,7 +2553,7 @@ module Aws::STS
2214
2553
  #
2215
2554
  #
2216
2555
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
2217
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
2556
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
2218
2557
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
2219
2558
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
2220
2559
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
@@ -2301,20 +2640,90 @@ module Aws::STS
2301
2640
  req.send_request(options)
2302
2641
  end
2303
2642
 
2643
+ # Returns a signed JSON Web Token (JWT) that represents the calling
2644
+ # Amazon Web Services identity. The returned JWT can be used to
2645
+ # authenticate with external services that support OIDC discovery. The
2646
+ # token is signed by Amazon Web Services STS and can be publicly
2647
+ # verified using the verification keys published at the issuer's JWKS
2648
+ # endpoint.
2649
+ #
2650
+ # @option params [required, Array<String>] :audience
2651
+ # The intended recipient of the web identity token. This value populates
2652
+ # the `aud` claim in the JWT and should identify the service or
2653
+ # application that will validate and use the token. The external service
2654
+ # should verify this claim to ensure the token was intended for their
2655
+ # use.
2656
+ #
2657
+ # @option params [Integer] :duration_seconds
2658
+ # The duration, in seconds, for which the JSON Web Token (JWT) will
2659
+ # remain valid. The value can range from 60 seconds (1 minute) to 3600
2660
+ # seconds (1 hour). If not specified, the default duration is 300
2661
+ # seconds (5 minutes). The token is designed to be short-lived and
2662
+ # should be used for proof of identity, then exchanged for credentials
2663
+ # or short-lived tokens in the external service.
2664
+ #
2665
+ # @option params [required, String] :signing_algorithm
2666
+ # The cryptographic algorithm to use for signing the JSON Web Token
2667
+ # (JWT). Valid values are RS256 (RSA with SHA-256) and ES384 (ECDSA
2668
+ # using P-384 curve with SHA-384).
2669
+ #
2670
+ # @option params [Array<Types::Tag>] :tags
2671
+ # An optional list of tags to include in the JSON Web Token (JWT). These
2672
+ # tags are added as custom claims to the JWT and can be used by the
2673
+ # downstream service for authorization decisions.
2674
+ #
2675
+ # @return [Types::GetWebIdentityTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2676
+ #
2677
+ # * {Types::GetWebIdentityTokenResponse#web_identity_token #web_identity_token} => String
2678
+ # * {Types::GetWebIdentityTokenResponse#expiration #expiration} => Time
2679
+ #
2680
+ # @example Request syntax with placeholder values
2681
+ #
2682
+ # resp = client.get_web_identity_token({
2683
+ # audience: ["webIdentityTokenAudienceStringType"], # required
2684
+ # duration_seconds: 1,
2685
+ # signing_algorithm: "jwtAlgorithmType", # required
2686
+ # tags: [
2687
+ # {
2688
+ # key: "tagKeyType", # required
2689
+ # value: "tagValueType", # required
2690
+ # },
2691
+ # ],
2692
+ # })
2693
+ #
2694
+ # @example Response structure
2695
+ #
2696
+ # resp.web_identity_token #=> String
2697
+ # resp.expiration #=> Time
2698
+ #
2699
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetWebIdentityToken AWS API Documentation
2700
+ #
2701
+ # @overload get_web_identity_token(params = {})
2702
+ # @param [Hash] params ({})
2703
+ def get_web_identity_token(params = {}, options = {})
2704
+ req = build_request(:get_web_identity_token, params)
2705
+ req.send_request(options)
2706
+ end
2707
+
2304
2708
  # @!endgroup
2305
2709
 
2306
2710
  # @param params ({})
2307
2711
  # @api private
2308
2712
  def build_request(operation_name, params = {})
2309
2713
  handlers = @handlers.for(operation_name)
2714
+ tracer = config.telemetry_provider.tracer_provider.tracer(
2715
+ Aws::Telemetry.module_to_tracer_name('Aws::STS')
2716
+ )
2310
2717
  context = Seahorse::Client::RequestContext.new(
2311
2718
  operation_name: operation_name,
2312
2719
  operation: config.api.operation(operation_name),
2313
2720
  client: self,
2314
2721
  params: params,
2315
- config: config)
2722
+ config: config,
2723
+ tracer: tracer
2724
+ )
2316
2725
  context[:gem_name] = 'aws-sdk-core'
2317
- context[:gem_version] = '3.173.0'
2726
+ context[:gem_version] = '3.254.1'
2318
2727
  Seahorse::Client::Request.new(handlers, context)
2319
2728
  end
2320
2729