aws-sdk-core 3.197.2 → 3.225.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +355 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +1 -2
- data/lib/aws-defaults.rb +4 -1
- data/lib/aws-sdk-core/arn.rb +1 -3
- data/lib/aws-sdk-core/assume_role_credentials.rb +13 -5
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -7
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -4
- data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
- data/lib/aws-sdk-core/cbor/decoder.rb +308 -0
- data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
- data/lib/aws-sdk-core/cbor.rb +53 -0
- data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
- data/lib/aws-sdk-core/client_stubs.rb +30 -55
- data/lib/aws-sdk-core/credential_provider.rb +4 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +37 -10
- data/lib/aws-sdk-core/credentials.rb +19 -6
- data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
- data/lib/aws-sdk-core/endpoints/matchers.rb +1 -8
- data/lib/aws-sdk-core/endpoints.rb +74 -18
- data/lib/aws-sdk-core/error_handler.rb +41 -0
- data/lib/aws-sdk-core/errors.rb +11 -2
- data/lib/aws-sdk-core/instance_profile_credentials.rb +1 -0
- data/lib/aws-sdk-core/json/error_handler.rb +8 -9
- data/lib/aws-sdk-core/json/handler.rb +6 -6
- data/lib/aws-sdk-core/json/json_engine.rb +3 -1
- data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
- data/lib/aws-sdk-core/json/parser.rb +2 -0
- data/lib/aws-sdk-core/json.rb +43 -14
- data/lib/aws-sdk-core/log/param_filter.rb +2 -2
- data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
- data/lib/aws-sdk-core/log.rb +10 -0
- data/lib/aws-sdk-core/param_validator.rb +1 -1
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -169
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
- data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +4 -3
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +5 -1
- data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -25
- data/lib/aws-sdk-core/plugins/retry_errors.rb +0 -1
- data/lib/aws-sdk-core/plugins/sign.rb +28 -12
- data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
- data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
- data/lib/aws-sdk-core/plugins/stub_responses.rb +52 -9
- data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
- data/lib/aws-sdk-core/plugins/user_agent.rb +48 -9
- data/lib/aws-sdk-core/plugins.rb +39 -0
- data/lib/aws-sdk-core/process_credentials.rb +3 -2
- data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
- data/lib/aws-sdk-core/query/handler.rb +4 -4
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rest/{request/content_type.rb → content_type_handler.rb} +1 -1
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +3 -3
- data/lib/aws-sdk-core/rest.rb +1 -1
- data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
- data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
- data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +85 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +98 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +78 -22
- data/lib/aws-sdk-core/shared_credentials.rb +1 -7
- data/lib/aws-sdk-core/sso_credentials.rb +4 -1
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
- data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
- data/lib/aws-sdk-core/stubbing.rb +22 -0
- data/lib/aws-sdk-core/telemetry/base.rb +177 -0
- data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
- data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
- data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
- data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
- data/lib/aws-sdk-core/telemetry.rb +78 -0
- data/lib/aws-sdk-core/waiters/poller.rb +9 -4
- data/lib/aws-sdk-core/xml/error_handler.rb +11 -37
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +82 -108
- data/lib/aws-sdk-sso/client.rb +100 -39
- data/lib/aws-sdk-sso/client_api.rb +7 -0
- data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-sso/endpoints.rb +2 -54
- data/lib/aws-sdk-sso/plugins/endpoints.rb +19 -20
- data/lib/aws-sdk-sso/types.rb +1 -0
- data/lib/aws-sdk-sso.rb +15 -11
- data/lib/aws-sdk-ssooidc/client.rb +137 -59
- data/lib/aws-sdk-ssooidc/client_api.rb +11 -0
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +19 -20
- data/lib/aws-sdk-ssooidc/types.rb +49 -16
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +308 -91
- data/lib/aws-sdk-sts/client_api.rb +36 -10
- data/lib/aws-sdk-sts/customizations.rb +5 -1
- data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
- data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
- data/lib/aws-sdk-sts/endpoints.rb +2 -118
- data/lib/aws-sdk-sts/errors.rb +16 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +19 -28
- data/lib/aws-sdk-sts/types.rb +171 -28
- data/lib/aws-sdk-sts.rb +15 -11
- data/lib/seahorse/client/async_base.rb +4 -5
- data/lib/seahorse/client/base.rb +17 -21
- data/lib/seahorse/client/h2/connection.rb +18 -28
- data/lib/seahorse/client/h2/handler.rb +13 -3
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/http/response.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +10 -2
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/networking_error.rb +1 -1
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/h2.rb +4 -4
- data/lib/seahorse/client/plugins/net_http.rb +9 -0
- data/lib/seahorse/client/request_context.rb +8 -1
- data/lib/seahorse/client/response.rb +2 -0
- data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
- data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
- data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
- data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
- data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
- data/sig/seahorse/client/async_base.rbs +18 -0
- metadata +80 -24
- /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -7,36 +7,35 @@
|
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
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/
|
36
|
-
require 'aws-sdk-core/plugins/
|
37
|
-
require 'aws-sdk-
|
38
|
-
|
39
|
-
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'
|
40
39
|
|
41
40
|
module Aws::STS
|
42
41
|
# An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
|
@@ -84,6 +83,7 @@ module Aws::STS
|
|
84
83
|
add_plugin(Aws::Plugins::RequestCompression)
|
85
84
|
add_plugin(Aws::Plugins::DefaultsMode)
|
86
85
|
add_plugin(Aws::Plugins::RecursionDetection)
|
86
|
+
add_plugin(Aws::Plugins::Telemetry)
|
87
87
|
add_plugin(Aws::Plugins::Sign)
|
88
88
|
add_plugin(Aws::Plugins::Protocols::Query)
|
89
89
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
@@ -91,6 +91,11 @@ module Aws::STS
|
|
91
91
|
|
92
92
|
# @overload initialize(options)
|
93
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
|
+
#
|
94
99
|
# @option options [required, Aws::CredentialProvider] :credentials
|
95
100
|
# Your AWS credentials. This can be an instance of any one of the
|
96
101
|
# following classes:
|
@@ -125,13 +130,15 @@ module Aws::STS
|
|
125
130
|
# locations will be searched for credentials:
|
126
131
|
#
|
127
132
|
# * `Aws.config[:credentials]`
|
128
|
-
# * The `:access_key_id`, `:secret_access_key`,
|
129
|
-
#
|
133
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
134
|
+
# `:account_id` options.
|
135
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
|
136
|
+
# ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
|
130
137
|
# * `~/.aws/credentials`
|
131
138
|
# * `~/.aws/config`
|
132
139
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
133
140
|
# are very aggressive. Construct and pass an instance of
|
134
|
-
# `Aws::
|
141
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
135
142
|
# enable retries and extended timeouts. Instance profile credential
|
136
143
|
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
137
144
|
# to true.
|
@@ -150,6 +157,8 @@ module Aws::STS
|
|
150
157
|
#
|
151
158
|
# @option options [String] :access_key_id
|
152
159
|
#
|
160
|
+
# @option options [String] :account_id
|
161
|
+
#
|
153
162
|
# @option options [Boolean] :active_endpoint_cache (false)
|
154
163
|
# When set to `true`, a thread polling for endpoints will be running in
|
155
164
|
# the background every 60 secs (default). Defaults to `false`.
|
@@ -193,8 +202,7 @@ module Aws::STS
|
|
193
202
|
# accepted modes and the configuration defaults that are included.
|
194
203
|
#
|
195
204
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
196
|
-
#
|
197
|
-
# to default service endpoint when available.
|
205
|
+
# When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
|
198
206
|
#
|
199
207
|
# @option options [Boolean] :disable_request_compression (false)
|
200
208
|
# When set to 'true' the request body will not be compressed
|
@@ -211,7 +219,6 @@ module Aws::STS
|
|
211
219
|
# 'https://example.com'
|
212
220
|
# 'http://example.com:123'
|
213
221
|
#
|
214
|
-
#
|
215
222
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
216
223
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
217
224
|
# for endpoint discovery enabled operations. Defaults to 1000.
|
@@ -251,11 +258,34 @@ module Aws::STS
|
|
251
258
|
# Used when loading credentials from the shared credentials file
|
252
259
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
253
260
|
#
|
261
|
+
# @option options [String] :request_checksum_calculation ("when_supported")
|
262
|
+
# Determines when a checksum will be calculated for request payloads. Values are:
|
263
|
+
#
|
264
|
+
# * `when_supported` - (default) When set, a checksum will be
|
265
|
+
# calculated for all request payloads of operations modeled with the
|
266
|
+
# `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
|
267
|
+
# `requestAlgorithmMember` is modeled.
|
268
|
+
# * `when_required` - When set, a checksum will only be calculated for
|
269
|
+
# request payloads of operations modeled with the `httpChecksum` trait where
|
270
|
+
# `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
|
271
|
+
# is modeled and supplied.
|
272
|
+
#
|
254
273
|
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
255
274
|
# The minimum size in bytes that triggers compression for request
|
256
275
|
# bodies. The value must be non-negative integer value between 0
|
257
276
|
# and 10485780 bytes inclusive.
|
258
277
|
#
|
278
|
+
# @option options [String] :response_checksum_validation ("when_supported")
|
279
|
+
# Determines when checksum validation will be performed on response payloads. Values are:
|
280
|
+
#
|
281
|
+
# * `when_supported` - (default) When set, checksum validation is performed on all
|
282
|
+
# response payloads of operations modeled with the `httpChecksum` trait where
|
283
|
+
# `responseAlgorithms` is modeled, except when no modeled checksum algorithms
|
284
|
+
# are supported.
|
285
|
+
# * `when_required` - When set, checksum validation is not performed on
|
286
|
+
# response payloads of operations unless the checksum algorithm is supported and
|
287
|
+
# the `requestValidationModeMember` member is set to `ENABLED`.
|
288
|
+
#
|
259
289
|
# @option options [Proc] :retry_backoff
|
260
290
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
261
291
|
# This option is only used in the `legacy` retry mode.
|
@@ -300,7 +330,6 @@ module Aws::STS
|
|
300
330
|
# throttling. This is a provisional mode that may change behavior
|
301
331
|
# in the future.
|
302
332
|
#
|
303
|
-
#
|
304
333
|
# @option options [String] :sdk_ua_app_id
|
305
334
|
# A unique and opaque application ID that is appended to the
|
306
335
|
# User-Agent header as app/sdk_ua_app_id. It should have a
|
@@ -311,6 +340,15 @@ module Aws::STS
|
|
311
340
|
#
|
312
341
|
# @option options [String] :session_token
|
313
342
|
#
|
343
|
+
# @option options [Array] :sigv4a_signing_region_set
|
344
|
+
# A list of regions that should be signed with SigV4a signing. When
|
345
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
346
|
+
# in the following locations:
|
347
|
+
#
|
348
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
349
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
350
|
+
# * `~/.aws/config`
|
351
|
+
#
|
314
352
|
# @option options [String] :sts_regional_endpoints ("regional")
|
315
353
|
# Passing in 'regional' to enable regional endpoint for STS for all supported
|
316
354
|
# regions (except 'aws-global'). Using 'legacy' mode will force all legacy
|
@@ -325,6 +363,16 @@ module Aws::STS
|
|
325
363
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
326
364
|
# requests are made, and retries are disabled.
|
327
365
|
#
|
366
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
367
|
+
# Allows you to provide a telemetry provider, which is used to
|
368
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
369
|
+
# will not record or emit any telemetry data. The SDK supports the
|
370
|
+
# following telemetry providers:
|
371
|
+
#
|
372
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
373
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
374
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
375
|
+
#
|
328
376
|
# @option options [Aws::TokenProvider] :token_provider
|
329
377
|
# A Bearer Token Provider. This can be an instance of any one of the
|
330
378
|
# following classes:
|
@@ -352,7 +400,9 @@ module Aws::STS
|
|
352
400
|
# sending the request.
|
353
401
|
#
|
354
402
|
# @option options [Aws::STS::EndpointProvider] :endpoint_provider
|
355
|
-
# The endpoint provider used to resolve endpoints. Any object that responds to
|
403
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
404
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
405
|
+
# `Aws::STS::EndpointParameters`.
|
356
406
|
#
|
357
407
|
# @option options [Float] :http_continue_timeout (1)
|
358
408
|
# The number of seconds to wait for a 100-continue response before sending the
|
@@ -408,6 +458,12 @@ module Aws::STS
|
|
408
458
|
# @option options [String] :ssl_ca_store
|
409
459
|
# Sets the X509::Store to verify peer certificate.
|
410
460
|
#
|
461
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
462
|
+
# Sets a client certificate when creating http connections.
|
463
|
+
#
|
464
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
465
|
+
# Sets a client key when creating http connections.
|
466
|
+
#
|
411
467
|
# @option options [Float] :ssl_timeout
|
412
468
|
# Sets the SSL timeout in seconds
|
413
469
|
#
|
@@ -426,8 +482,8 @@ module Aws::STS
|
|
426
482
|
# token. Typically, you use `AssumeRole` within your account or for
|
427
483
|
# cross-account access. For a comparison of `AssumeRole` with other API
|
428
484
|
# operations that produce temporary credentials, see [Requesting
|
429
|
-
# Temporary Security Credentials][1] and [
|
430
|
-
#
|
485
|
+
# Temporary Security Credentials][1] and [Compare STS credentials][2] in
|
486
|
+
# the *IAM User Guide*.
|
431
487
|
#
|
432
488
|
# **Permissions**
|
433
489
|
#
|
@@ -436,9 +492,9 @@ module Aws::STS
|
|
436
492
|
# following exception: You cannot call the Amazon Web Services STS
|
437
493
|
# `GetFederationToken` or `GetSessionToken` API operations.
|
438
494
|
#
|
439
|
-
# (Optional) You can pass inline or managed
|
440
|
-
#
|
441
|
-
#
|
495
|
+
# (Optional) You can pass inline or managed session policies to this
|
496
|
+
# operation. You can pass a single JSON policy document to use as an
|
497
|
+
# inline session policy. You can also specify up to 10 managed policy
|
442
498
|
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
443
499
|
# plaintext that you use for both inline and managed session policies
|
444
500
|
# can't exceed 2,048 characters. Passing policies to this operation
|
@@ -511,7 +567,7 @@ module Aws::STS
|
|
511
567
|
# denied. The condition in a trust policy that tests for MFA
|
512
568
|
# authentication might look like the following example.
|
513
569
|
#
|
514
|
-
# `"Condition":
|
570
|
+
# `"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}`
|
515
571
|
#
|
516
572
|
# For more information, see [Configuring MFA-Protected API Access][8] in
|
517
573
|
# the *IAM User Guide* guide.
|
@@ -524,7 +580,7 @@ module Aws::STS
|
|
524
580
|
#
|
525
581
|
#
|
526
582
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
527
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
583
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
528
584
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
529
585
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
530
586
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
@@ -547,11 +603,22 @@ module Aws::STS
|
|
547
603
|
# credentials will expose the role session name to the external account
|
548
604
|
# in their CloudTrail logs.
|
549
605
|
#
|
606
|
+
# For security purposes, administrators can view this field in
|
607
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
608
|
+
# Amazon Web Services. Your administrator might require that you specify
|
609
|
+
# your user name as the session name when you assume the role. For more
|
610
|
+
# information, see [ `sts:RoleSessionName` ][2].
|
611
|
+
#
|
550
612
|
# The regex used to validate this parameter is a string of characters
|
551
613
|
# consisting of upper- and lower-case alphanumeric characters with no
|
552
614
|
# spaces. You can also include underscores or any of the following
|
553
615
|
# characters: =,.@-
|
554
616
|
#
|
617
|
+
#
|
618
|
+
#
|
619
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
620
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
621
|
+
#
|
555
622
|
# @option params [Array<Types::PolicyDescriptorType>] :policy_arns
|
556
623
|
# The Amazon Resource Names (ARNs) of the IAM managed policies that you
|
557
624
|
# want to use as managed session policies. The policies must exist in
|
@@ -617,6 +684,9 @@ module Aws::STS
|
|
617
684
|
#
|
618
685
|
# </note>
|
619
686
|
#
|
687
|
+
# For more information about role session permissions, see [Session
|
688
|
+
# policies][1].
|
689
|
+
#
|
620
690
|
#
|
621
691
|
#
|
622
692
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
@@ -639,9 +709,8 @@ module Aws::STS
|
|
639
709
|
# depending on the maximum session duration setting for your role.
|
640
710
|
# However, if you assume a role using role chaining and provide a
|
641
711
|
# `DurationSeconds` parameter value greater than one hour, the operation
|
642
|
-
# fails. To learn how to view the maximum value for your role, see
|
643
|
-
# the
|
644
|
-
# Guide*.
|
712
|
+
# fails. To learn how to view the maximum value for your role, see
|
713
|
+
# [Update the maximum session duration for a role][1].
|
645
714
|
#
|
646
715
|
# By default, the value is set to `3600` seconds.
|
647
716
|
#
|
@@ -657,7 +726,7 @@ module Aws::STS
|
|
657
726
|
#
|
658
727
|
#
|
659
728
|
#
|
660
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
729
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
661
730
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
|
662
731
|
#
|
663
732
|
# @option params [Array<Types::Tag>] :tags
|
@@ -710,9 +779,8 @@ module Aws::STS
|
|
710
779
|
# passes to subsequent sessions in a role chain. For more information,
|
711
780
|
# see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
|
712
781
|
#
|
713
|
-
# This parameter is optional.
|
714
|
-
#
|
715
|
-
# affected.
|
782
|
+
# This parameter is optional. The transitive status of a session tag
|
783
|
+
# does not impact its packed binary size.
|
716
784
|
#
|
717
785
|
# If you choose not to specify a transitive tag key, then no tags are
|
718
786
|
# passed from this session to any subsequent sessions.
|
@@ -770,26 +838,29 @@ module Aws::STS
|
|
770
838
|
#
|
771
839
|
# @option params [String] :source_identity
|
772
840
|
# The source identity specified by the principal that is calling the
|
773
|
-
# `AssumeRole` operation.
|
841
|
+
# `AssumeRole` operation. The source identity value persists across
|
842
|
+
# [chained role][1] sessions.
|
774
843
|
#
|
775
844
|
# You can require users to specify a source identity when they assume a
|
776
|
-
# role. You do this by using the `sts:SourceIdentity` condition
|
777
|
-
# role trust policy. You can use source identity information in
|
845
|
+
# role. You do this by using the [ `sts:SourceIdentity` ][2] condition
|
846
|
+
# key in a role trust policy. You can use source identity information in
|
778
847
|
# CloudTrail logs to determine who took actions with a role. You can use
|
779
848
|
# the `aws:SourceIdentity` condition key to further control access to
|
780
849
|
# Amazon Web Services resources based on the value of source identity.
|
781
850
|
# For more information about using source identity, see [Monitor and
|
782
|
-
# control actions taken with assumed roles][
|
851
|
+
# control actions taken with assumed roles][3] in the *IAM User Guide*.
|
783
852
|
#
|
784
853
|
# The regex used to validate this parameter is a string of characters
|
785
854
|
# consisting of upper- and lower-case alphanumeric characters with no
|
786
855
|
# spaces. You can also include underscores or any of the following
|
787
|
-
# characters:
|
856
|
+
# characters: +=,.@-. You cannot use a value that begins with the text
|
788
857
|
# `aws:`. This prefix is reserved for Amazon Web Services internal use.
|
789
858
|
#
|
790
859
|
#
|
791
860
|
#
|
792
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
861
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
|
862
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
|
863
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
793
864
|
#
|
794
865
|
# @option params [Array<Types::ProvidedContext>] :provided_contexts
|
795
866
|
# A list of previously acquired trusted context assertions in the format
|
@@ -800,7 +871,7 @@ module Aws::STS
|
|
800
871
|
# a single trusted context assertion and the ARN of the context provider
|
801
872
|
# from which the trusted context assertion was generated.
|
802
873
|
#
|
803
|
-
# `[
|
874
|
+
# `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
|
804
875
|
#
|
805
876
|
# @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
806
877
|
#
|
@@ -910,8 +981,8 @@ module Aws::STS
|
|
910
981
|
# user-specific credentials or configuration. For a comparison of
|
911
982
|
# `AssumeRoleWithSAML` with the other API operations that produce
|
912
983
|
# temporary credentials, see [Requesting Temporary Security
|
913
|
-
# Credentials][1] and [
|
914
|
-
#
|
984
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
985
|
+
# Guide*.
|
915
986
|
#
|
916
987
|
# The temporary security credentials returned by this operation consist
|
917
988
|
# of an access key ID, a secret access key, and a security token.
|
@@ -1041,7 +1112,7 @@ module Aws::STS
|
|
1041
1112
|
#
|
1042
1113
|
#
|
1043
1114
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1044
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1115
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
1045
1116
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
1046
1117
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1047
1118
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
|
@@ -1129,6 +1200,9 @@ module Aws::STS
|
|
1129
1200
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1130
1201
|
# characters.
|
1131
1202
|
#
|
1203
|
+
# For more information about role session permissions, see [Session
|
1204
|
+
# policies][1].
|
1205
|
+
#
|
1132
1206
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1133
1207
|
# policy, managed policy ARNs, and session tags into a packed binary
|
1134
1208
|
# format that has a separate limit. Your request can fail for this limit
|
@@ -1283,8 +1357,8 @@ module Aws::STS
|
|
1283
1357
|
# a token from the web identity provider. For a comparison of
|
1284
1358
|
# `AssumeRoleWithWebIdentity` with the other API operations that produce
|
1285
1359
|
# temporary credentials, see [Requesting Temporary Security
|
1286
|
-
# Credentials][4] and [
|
1287
|
-
#
|
1360
|
+
# Credentials][4] and [Compare STS credentials][5] in the *IAM User
|
1361
|
+
# Guide*.
|
1288
1362
|
#
|
1289
1363
|
# The temporary security credentials returned by this API consist of an
|
1290
1364
|
# access key ID, a secret access key, and a security token. Applications
|
@@ -1299,9 +1373,9 @@ module Aws::STS
|
|
1299
1373
|
# your session. You can provide a value from 900 seconds (15 minutes) up
|
1300
1374
|
# to the maximum session duration setting for the role. This setting can
|
1301
1375
|
# have a value from 1 hour to 12 hours. To learn how to view the maximum
|
1302
|
-
# value for your role, see [
|
1303
|
-
#
|
1304
|
-
#
|
1376
|
+
# value for your role, see [Update the maximum session duration for a
|
1377
|
+
# role ][6] in the *IAM User Guide*. The maximum session duration limit
|
1378
|
+
# applies when you use the `AssumeRole*` API operations or the
|
1305
1379
|
# `assume-role*` CLI commands. However the limit does not apply when you
|
1306
1380
|
# use those operations to create a console URL. For more information,
|
1307
1381
|
# see [Using IAM Roles][7] in the *IAM User Guide*.
|
@@ -1379,35 +1453,26 @@ module Aws::STS
|
|
1379
1453
|
# instead use a GUID or a pairwise identifier, as [suggested in the OIDC
|
1380
1454
|
# specification][14].
|
1381
1455
|
#
|
1382
|
-
# For more information about how to use
|
1456
|
+
# For more information about how to use OIDC federation and the
|
1383
1457
|
# `AssumeRoleWithWebIdentity` API, see the following resources:
|
1384
1458
|
#
|
1385
1459
|
# * [Using Web Identity Federation API Operations for Mobile Apps][15]
|
1386
1460
|
# and [Federation Through a Web-based Identity Provider][16].
|
1387
1461
|
#
|
1388
|
-
# * [ Web Identity Federation Playground][17]. Walk through the process
|
1389
|
-
# of authenticating through Login with Amazon, Facebook, or Google,
|
1390
|
-
# getting temporary security credentials, and then using those
|
1391
|
-
# credentials to make a request to Amazon Web Services.
|
1392
|
-
#
|
1393
1462
|
# * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
|
1394
1463
|
# Services SDK for Android Developer Guide][3]. These toolkits contain
|
1395
1464
|
# sample apps that show how to invoke the identity providers. The
|
1396
1465
|
# toolkits then show how to use the information from these providers
|
1397
1466
|
# to get and use temporary security credentials.
|
1398
1467
|
#
|
1399
|
-
# * [Web Identity Federation with Mobile Applications][18]. This article
|
1400
|
-
# discusses web identity federation and shows an example of how to use
|
1401
|
-
# web identity federation to get access to content in Amazon S3.
|
1402
|
-
#
|
1403
1468
|
#
|
1404
1469
|
#
|
1405
1470
|
# [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
1406
1471
|
# [2]: http://aws.amazon.com/sdkforios/
|
1407
1472
|
# [3]: http://aws.amazon.com/sdkforandroid/
|
1408
1473
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1409
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1410
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1474
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
1475
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
1411
1476
|
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1412
1477
|
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
1413
1478
|
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
@@ -1418,13 +1483,29 @@ module Aws::STS
|
|
1418
1483
|
# [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
1419
1484
|
# [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
1420
1485
|
# [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
1421
|
-
# [17]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
|
1422
|
-
# [18]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
1423
1486
|
#
|
1424
1487
|
# @option params [required, String] :role_arn
|
1425
1488
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
1426
1489
|
# assuming.
|
1427
1490
|
#
|
1491
|
+
# <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools that
|
1492
|
+
# assume [cross-account IAM roles][1]. The trust policies of these roles
|
1493
|
+
# must accept the `cognito-identity.amazonaws.com` service principal and
|
1494
|
+
# must contain the `cognito-identity.amazonaws.com:aud` condition key to
|
1495
|
+
# restrict role assumption to users from your intended identity pools. A
|
1496
|
+
# policy that trusts Amazon Cognito identity pools without this
|
1497
|
+
# condition creates a risk that a user from an unintended identity pool
|
1498
|
+
# can assume the role. For more information, see [ Trust policies for
|
1499
|
+
# IAM roles in Basic (Classic) authentication ][2] in the *Amazon
|
1500
|
+
# Cognito Developer Guide*.
|
1501
|
+
#
|
1502
|
+
# </note>
|
1503
|
+
#
|
1504
|
+
#
|
1505
|
+
#
|
1506
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
|
1507
|
+
# [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
|
1508
|
+
#
|
1428
1509
|
# @option params [required, String] :role_session_name
|
1429
1510
|
# An identifier for the assumed role session. Typically, you pass the
|
1430
1511
|
# name or identifier that is associated with the user who is using your
|
@@ -1433,18 +1514,31 @@ module Aws::STS
|
|
1433
1514
|
# is included as part of the ARN and assumed role ID in the
|
1434
1515
|
# `AssumedRoleUser` response element.
|
1435
1516
|
#
|
1517
|
+
# For security purposes, administrators can view this field in
|
1518
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
1519
|
+
# Amazon Web Services. Your administrator might require that you specify
|
1520
|
+
# your user name as the session name when you assume the role. For more
|
1521
|
+
# information, see [ `sts:RoleSessionName` ][2].
|
1522
|
+
#
|
1436
1523
|
# The regex used to validate this parameter is a string of characters
|
1437
1524
|
# consisting of upper- and lower-case alphanumeric characters with no
|
1438
1525
|
# spaces. You can also include underscores or any of the following
|
1439
1526
|
# characters: =,.@-
|
1440
1527
|
#
|
1528
|
+
#
|
1529
|
+
#
|
1530
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
1531
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
1532
|
+
#
|
1441
1533
|
# @option params [required, String] :web_identity_token
|
1442
1534
|
# The OAuth 2.0 access token or OpenID Connect ID token that is provided
|
1443
1535
|
# by the identity provider. Your application must get this token by
|
1444
1536
|
# authenticating the user who is using your application with a web
|
1445
1537
|
# identity provider before the application makes an
|
1446
|
-
# `AssumeRoleWithWebIdentity` call.
|
1447
|
-
#
|
1538
|
+
# `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
|
1539
|
+
# formatted as either an integer or a long integer. Tokens must be
|
1540
|
+
# signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
|
1541
|
+
# (ES256, ES384, or ES512).
|
1448
1542
|
#
|
1449
1543
|
# @option params [String] :provider_id
|
1450
1544
|
# The fully qualified host component of the domain name of the OAuth 2.0
|
@@ -1513,6 +1607,9 @@ module Aws::STS
|
|
1513
1607
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1514
1608
|
# characters.
|
1515
1609
|
#
|
1610
|
+
# For more information about role session permissions, see [Session
|
1611
|
+
# policies][1].
|
1612
|
+
#
|
1516
1613
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1517
1614
|
# policy, managed policy ARNs, and session tags into a packed binary
|
1518
1615
|
# format that has a separate limit. Your request can fail for this limit
|
@@ -1633,6 +1730,121 @@ module Aws::STS
|
|
1633
1730
|
req.send_request(options)
|
1634
1731
|
end
|
1635
1732
|
|
1733
|
+
# Returns a set of short term credentials you can use to perform
|
1734
|
+
# privileged tasks on a member account in your organization.
|
1735
|
+
#
|
1736
|
+
# Before you can launch a privileged session, you must have centralized
|
1737
|
+
# root access in your organization. For steps to enable this feature,
|
1738
|
+
# see [Centralize root access for member accounts][1] in the *IAM User
|
1739
|
+
# Guide*.
|
1740
|
+
#
|
1741
|
+
# <note markdown="1"> The STS global endpoint is not supported for AssumeRoot. You must send
|
1742
|
+
# this request to a Regional STS endpoint. For more information, see
|
1743
|
+
# [Endpoints][2].
|
1744
|
+
#
|
1745
|
+
# </note>
|
1746
|
+
#
|
1747
|
+
# You can track AssumeRoot in CloudTrail logs to determine what actions
|
1748
|
+
# were performed in a session. For more information, see [Track
|
1749
|
+
# privileged tasks in CloudTrail][3] in the *IAM User Guide*.
|
1750
|
+
#
|
1751
|
+
#
|
1752
|
+
#
|
1753
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
|
1754
|
+
# [2]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
|
1755
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
|
1756
|
+
#
|
1757
|
+
# @option params [required, String] :target_principal
|
1758
|
+
# The member account principal ARN or account ID.
|
1759
|
+
#
|
1760
|
+
# @option params [required, Types::PolicyDescriptorType] :task_policy_arn
|
1761
|
+
# The identity based policy that scopes the session to the privileged
|
1762
|
+
# tasks that can be performed. You can use one of following Amazon Web
|
1763
|
+
# Services managed policies to scope root session actions.
|
1764
|
+
#
|
1765
|
+
# * [IAMAuditRootUserCredentials][1]
|
1766
|
+
#
|
1767
|
+
# * [IAMCreateRootUserPassword][2]
|
1768
|
+
#
|
1769
|
+
# * [IAMDeleteRootUserCredentials][3]
|
1770
|
+
#
|
1771
|
+
# * [S3UnlockBucketPolicy][4]
|
1772
|
+
#
|
1773
|
+
# * [SQSUnlockQueuePolicy][5]
|
1774
|
+
#
|
1775
|
+
#
|
1776
|
+
#
|
1777
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
|
1778
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
|
1779
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
|
1780
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
|
1781
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
|
1782
|
+
#
|
1783
|
+
# @option params [Integer] :duration_seconds
|
1784
|
+
# The duration, in seconds, of the privileged session. The value can
|
1785
|
+
# range from 0 seconds up to the maximum session duration of 900 seconds
|
1786
|
+
# (15 minutes). If you specify a value higher than this setting, the
|
1787
|
+
# operation fails.
|
1788
|
+
#
|
1789
|
+
# By default, the value is set to `900` seconds.
|
1790
|
+
#
|
1791
|
+
# @return [Types::AssumeRootResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1792
|
+
#
|
1793
|
+
# * {Types::AssumeRootResponse#credentials #credentials} => Types::Credentials
|
1794
|
+
# * {Types::AssumeRootResponse#source_identity #source_identity} => String
|
1795
|
+
#
|
1796
|
+
#
|
1797
|
+
# @example Example: To launch a privileged session
|
1798
|
+
#
|
1799
|
+
# # The following command retrieves a set of short-term credentials you can use to unlock an S3 bucket for a member account
|
1800
|
+
# # by removing the bucket policy.
|
1801
|
+
#
|
1802
|
+
# resp = client.assume_root({
|
1803
|
+
# duration_seconds: 900,
|
1804
|
+
# target_principal: "111122223333",
|
1805
|
+
# task_policy_arn: {
|
1806
|
+
# arn: "arn:aws:iam::aws:policy/root-task/S3UnlockBucketPolicy",
|
1807
|
+
# },
|
1808
|
+
# })
|
1809
|
+
#
|
1810
|
+
# resp.to_h outputs the following:
|
1811
|
+
# {
|
1812
|
+
# credentials: {
|
1813
|
+
# access_key_id: "ASIAJEXAMPLEXEG2JICEA",
|
1814
|
+
# expiration: Time.parse("2024-11-15T00:05:07Z"),
|
1815
|
+
# secret_access_key: "9drTJvcXLB89EXAMPLELB8923FB892xMFI",
|
1816
|
+
# session_token: "AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=",
|
1817
|
+
# },
|
1818
|
+
# source_identity: "Alice",
|
1819
|
+
# }
|
1820
|
+
#
|
1821
|
+
# @example Request syntax with placeholder values
|
1822
|
+
#
|
1823
|
+
# resp = client.assume_root({
|
1824
|
+
# target_principal: "TargetPrincipalType", # required
|
1825
|
+
# task_policy_arn: { # required
|
1826
|
+
# arn: "arnType",
|
1827
|
+
# },
|
1828
|
+
# duration_seconds: 1,
|
1829
|
+
# })
|
1830
|
+
#
|
1831
|
+
# @example Response structure
|
1832
|
+
#
|
1833
|
+
# resp.credentials.access_key_id #=> String
|
1834
|
+
# resp.credentials.secret_access_key #=> String
|
1835
|
+
# resp.credentials.session_token #=> String
|
1836
|
+
# resp.credentials.expiration #=> Time
|
1837
|
+
# resp.source_identity #=> String
|
1838
|
+
#
|
1839
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoot AWS API Documentation
|
1840
|
+
#
|
1841
|
+
# @overload assume_root(params = {})
|
1842
|
+
# @param [Hash] params ({})
|
1843
|
+
def assume_root(params = {}, options = {})
|
1844
|
+
req = build_request(:assume_root, params)
|
1845
|
+
req.send_request(options)
|
1846
|
+
end
|
1847
|
+
|
1636
1848
|
# Decodes additional information about the authorization status of a
|
1637
1849
|
# request from an encoded message returned in response to an Amazon Web
|
1638
1850
|
# Services request.
|
@@ -1871,8 +2083,8 @@ module Aws::STS
|
|
1871
2083
|
# usually in a server-based application. For a comparison of
|
1872
2084
|
# `GetFederationToken` with the other API operations that produce
|
1873
2085
|
# temporary credentials, see [Requesting Temporary Security
|
1874
|
-
# Credentials][1] and [
|
1875
|
-
#
|
2086
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
2087
|
+
# Guide*.
|
1876
2088
|
#
|
1877
2089
|
# Although it is possible to call `GetFederationToken` using the
|
1878
2090
|
# security credentials of an Amazon Web Services account root user
|
@@ -1969,7 +2181,7 @@ module Aws::STS
|
|
1969
2181
|
#
|
1970
2182
|
#
|
1971
2183
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1972
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
2184
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
1973
2185
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
1974
2186
|
# [4]: http://aws.amazon.com/cognito/
|
1975
2187
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
@@ -2221,8 +2433,8 @@ module Aws::STS
|
|
2221
2433
|
# An incorrect MFA code causes the API to return an access denied error.
|
2222
2434
|
# For a comparison of `GetSessionToken` with the other API operations
|
2223
2435
|
# that produce temporary credentials, see [Requesting Temporary Security
|
2224
|
-
# Credentials][1] and [
|
2225
|
-
#
|
2436
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
2437
|
+
# Guide*.
|
2226
2438
|
#
|
2227
2439
|
# <note markdown="1"> No permissions are required for users to perform this operation. The
|
2228
2440
|
# purpose of the `sts:GetSessionToken` operation is to authenticate the
|
@@ -2277,7 +2489,7 @@ module Aws::STS
|
|
2277
2489
|
#
|
2278
2490
|
#
|
2279
2491
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
2280
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
2492
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
2281
2493
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
|
2282
2494
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
2283
2495
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
|
@@ -2370,14 +2582,19 @@ module Aws::STS
|
|
2370
2582
|
# @api private
|
2371
2583
|
def build_request(operation_name, params = {})
|
2372
2584
|
handlers = @handlers.for(operation_name)
|
2585
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
2586
|
+
Aws::Telemetry.module_to_tracer_name('Aws::STS')
|
2587
|
+
)
|
2373
2588
|
context = Seahorse::Client::RequestContext.new(
|
2374
2589
|
operation_name: operation_name,
|
2375
2590
|
operation: config.api.operation(operation_name),
|
2376
2591
|
client: self,
|
2377
2592
|
params: params,
|
2378
|
-
config: config
|
2593
|
+
config: config,
|
2594
|
+
tracer: tracer
|
2595
|
+
)
|
2379
2596
|
context[:gem_name] = 'aws-sdk-core'
|
2380
|
-
context[:gem_version] = '3.
|
2597
|
+
context[:gem_version] = '3.225.1'
|
2381
2598
|
Seahorse::Client::Request.new(handlers, context)
|
2382
2599
|
end
|
2383
2600
|
|