aws-sdk-core 3.185.1 → 3.214.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +409 -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/assume_role_credentials.rb +12 -5
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
- data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
- data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
- 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 +310 -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 +23 -19
- data/lib/aws-sdk-core/credential_provider.rb +1 -1
- data/lib/aws-sdk-core/credential_provider_chain.rb +13 -6
- data/lib/aws-sdk-core/credentials.rb +13 -6
- data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +78 -11
- data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
- data/lib/aws-sdk-core/endpoints/matchers.rb +6 -9
- 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/event_emitter.rb +0 -16
- data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +17 -11
- data/lib/aws-sdk-core/json/handler.rb +13 -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 +32 -2
- 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.rb +10 -0
- data/lib/aws-sdk-core/lru_cache.rb +75 -0
- data/lib/aws-sdk-core/pageable_response.rb +1 -1
- data/lib/aws-sdk-core/param_validator.rb +7 -2
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +6 -3
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +9 -3
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
- data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
- data/lib/aws-sdk-core/plugins/logging.rb +2 -0
- 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 +3 -15
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
- 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/request_compression.rb +11 -2
- data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
- data/lib/aws-sdk-core/plugins/sign.rb +27 -15
- 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 +30 -2
- 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 +70 -26
- data/lib/aws-sdk-core/plugins.rb +39 -0
- data/lib/aws-sdk-core/process_credentials.rb +47 -28
- data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
- data/lib/aws-sdk-core/query/handler.rb +4 -4
- data/lib/aws-sdk-core/query/param_builder.rb +2 -2
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/refreshing_credentials.rb +12 -6
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/body.rb +32 -5
- data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +14 -6
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
- data/lib/aws-sdk-core/rest/response/body.rb +15 -1
- data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
- data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
- data/lib/aws-sdk-core/rest.rb +1 -0
- 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 +90 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +7 -2
- data/lib/aws-sdk-core/shared_credentials.rb +0 -7
- data/lib/aws-sdk-core/sso_credentials.rb +2 -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/util.rb +39 -0
- data/lib/aws-sdk-core/waiters/poller.rb +10 -5
- data/lib/aws-sdk-core/xml/builder.rb +17 -9
- data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
- data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +82 -107
- data/lib/aws-sdk-sso/client.rb +119 -55
- 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/endpoints.rb +2 -54
- data/lib/aws-sdk-sso/plugins/endpoints.rb +23 -22
- data/lib/aws-sdk-sso/types.rb +1 -0
- data/lib/aws-sdk-sso.rb +15 -11
- data/lib/aws-sdk-ssooidc/client.rb +504 -83
- data/lib/aws-sdk-ssooidc/client_api.rb +83 -1
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +2 -2
- data/lib/aws-sdk-ssooidc/endpoints.rb +2 -40
- data/lib/aws-sdk-ssooidc/errors.rb +52 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +23 -20
- data/lib/aws-sdk-ssooidc/types.rb +373 -51
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +334 -105
- 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 +2 -2
- data/lib/aws-sdk-sts/endpoints.rb +2 -118
- data/lib/aws-sdk-sts/plugins/endpoints.rb +23 -30
- data/lib/aws-sdk-sts/presigner.rb +1 -1
- data/lib/aws-sdk-sts/types.rb +188 -30
- data/lib/aws-sdk-sts.rb +15 -11
- data/lib/seahorse/client/async_base.rb +1 -1
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +18 -7
- data/lib/seahorse/client/h2/handler.rb +14 -3
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +11 -11
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/net_http/patches.rb +1 -4
- data/lib/seahorse/client/plugin.rb +9 -0
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/h2.rb +3 -3
- data/lib/seahorse/client/plugins/net_http.rb +57 -16
- data/lib/seahorse/client/request_context.rb +8 -1
- data/lib/seahorse/model/shapes.rb +2 -2
- data/sig/aws-sdk-core/client_stubs.rbs +10 -0
- data/sig/aws-sdk-core/errors.rbs +22 -0
- data/sig/aws-sdk-core/resources/collection.rbs +21 -0
- data/sig/aws-sdk-core/structure.rbs +4 -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/aws-sdk-core/waiters/errors.rbs +20 -0
- data/sig/aws-sdk-core.rbs +7 -0
- data/sig/seahorse/client/base.rbs +25 -0
- data/sig/seahorse/client/handler_builder.rbs +16 -0
- data/sig/seahorse/client/response.rbs +61 -0
- metadata +61 -19
- /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
@@ -22,6 +22,7 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
|
22
22
|
require 'aws-sdk-core/plugins/response_paging.rb'
|
23
23
|
require 'aws-sdk-core/plugins/stub_responses.rb'
|
24
24
|
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id.rb'
|
25
26
|
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
26
27
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
27
28
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
@@ -31,12 +32,11 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
|
31
32
|
require 'aws-sdk-core/plugins/request_compression.rb'
|
32
33
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
33
34
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
35
|
+
require 'aws-sdk-core/plugins/telemetry.rb'
|
34
36
|
require 'aws-sdk-core/plugins/sign.rb'
|
35
37
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
36
38
|
require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
|
37
39
|
|
38
|
-
Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
|
39
|
-
|
40
40
|
module Aws::STS
|
41
41
|
# An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
|
42
42
|
#
|
@@ -73,6 +73,7 @@ module Aws::STS
|
|
73
73
|
add_plugin(Aws::Plugins::ResponsePaging)
|
74
74
|
add_plugin(Aws::Plugins::StubResponses)
|
75
75
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
76
|
+
add_plugin(Aws::Plugins::InvocationId)
|
76
77
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
77
78
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
78
79
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
@@ -82,6 +83,7 @@ module Aws::STS
|
|
82
83
|
add_plugin(Aws::Plugins::RequestCompression)
|
83
84
|
add_plugin(Aws::Plugins::DefaultsMode)
|
84
85
|
add_plugin(Aws::Plugins::RecursionDetection)
|
86
|
+
add_plugin(Aws::Plugins::Telemetry)
|
85
87
|
add_plugin(Aws::Plugins::Sign)
|
86
88
|
add_plugin(Aws::Plugins::Protocols::Query)
|
87
89
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
@@ -89,6 +91,11 @@ module Aws::STS
|
|
89
91
|
|
90
92
|
# @overload initialize(options)
|
91
93
|
# @param [Hash] options
|
94
|
+
#
|
95
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
96
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
97
|
+
# class name or an instance of a plugin class.
|
98
|
+
#
|
92
99
|
# @option options [required, Aws::CredentialProvider] :credentials
|
93
100
|
# Your AWS credentials. This can be an instance of any one of the
|
94
101
|
# following classes:
|
@@ -123,13 +130,15 @@ module Aws::STS
|
|
123
130
|
# locations will be searched for credentials:
|
124
131
|
#
|
125
132
|
# * `Aws.config[:credentials]`
|
126
|
-
# * The `:access_key_id`, `:secret_access_key`,
|
127
|
-
#
|
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']
|
128
137
|
# * `~/.aws/credentials`
|
129
138
|
# * `~/.aws/config`
|
130
139
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
131
140
|
# are very aggressive. Construct and pass an instance of
|
132
|
-
# `Aws::
|
141
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
133
142
|
# enable retries and extended timeouts. Instance profile credential
|
134
143
|
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
135
144
|
# to true.
|
@@ -148,6 +157,8 @@ module Aws::STS
|
|
148
157
|
#
|
149
158
|
# @option options [String] :access_key_id
|
150
159
|
#
|
160
|
+
# @option options [String] :account_id
|
161
|
+
#
|
151
162
|
# @option options [Boolean] :active_endpoint_cache (false)
|
152
163
|
# When set to `true`, a thread polling for endpoints will be running in
|
153
164
|
# the background every 60 secs (default). Defaults to `false`.
|
@@ -198,10 +209,16 @@ module Aws::STS
|
|
198
209
|
# When set to 'true' the request body will not be compressed
|
199
210
|
# for supported operations.
|
200
211
|
#
|
201
|
-
# @option options [String] :endpoint
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
212
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
213
|
+
# Normally you should not configure the `:endpoint` option
|
214
|
+
# directly. This is normally constructed from the `:region`
|
215
|
+
# option. Configuring `:endpoint` is normally reserved for
|
216
|
+
# connecting to test or custom endpoints. The endpoint should
|
217
|
+
# be a URI formatted like:
|
218
|
+
#
|
219
|
+
# 'http://example.com'
|
220
|
+
# 'https://example.com'
|
221
|
+
# 'http://example.com:123'
|
205
222
|
#
|
206
223
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
207
224
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -291,16 +308,25 @@ module Aws::STS
|
|
291
308
|
# throttling. This is a provisional mode that may change behavior
|
292
309
|
# in the future.
|
293
310
|
#
|
294
|
-
#
|
295
311
|
# @option options [String] :sdk_ua_app_id
|
296
312
|
# A unique and opaque application ID that is appended to the
|
297
|
-
# User-Agent header as app
|
298
|
-
# maximum length of 50.
|
313
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
314
|
+
# maximum length of 50. This variable is sourced from environment
|
315
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
299
316
|
#
|
300
317
|
# @option options [String] :secret_access_key
|
301
318
|
#
|
302
319
|
# @option options [String] :session_token
|
303
320
|
#
|
321
|
+
# @option options [Array] :sigv4a_signing_region_set
|
322
|
+
# A list of regions that should be signed with SigV4a signing. When
|
323
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
324
|
+
# in the following locations:
|
325
|
+
#
|
326
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
327
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
328
|
+
# * `~/.aws/config`
|
329
|
+
#
|
304
330
|
# @option options [String] :sts_regional_endpoints ("regional")
|
305
331
|
# Passing in 'regional' to enable regional endpoint for STS for all supported
|
306
332
|
# regions (except 'aws-global'). Using 'legacy' mode will force all legacy
|
@@ -315,6 +341,16 @@ module Aws::STS
|
|
315
341
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
316
342
|
# requests are made, and retries are disabled.
|
317
343
|
#
|
344
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
345
|
+
# Allows you to provide a telemetry provider, which is used to
|
346
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
347
|
+
# will not record or emit any telemetry data. The SDK supports the
|
348
|
+
# following telemetry providers:
|
349
|
+
#
|
350
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
351
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
352
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
353
|
+
#
|
318
354
|
# @option options [Aws::TokenProvider] :token_provider
|
319
355
|
# A Bearer Token Provider. This can be an instance of any one of the
|
320
356
|
# following classes:
|
@@ -342,52 +378,75 @@ module Aws::STS
|
|
342
378
|
# sending the request.
|
343
379
|
#
|
344
380
|
# @option options [Aws::STS::EndpointProvider] :endpoint_provider
|
345
|
-
# The endpoint provider used to resolve endpoints. Any object that responds to
|
346
|
-
#
|
347
|
-
#
|
348
|
-
#
|
349
|
-
#
|
350
|
-
#
|
351
|
-
#
|
352
|
-
# `
|
353
|
-
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
#
|
358
|
-
#
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
381
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
382
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
383
|
+
# `Aws::STS::EndpointParameters`.
|
384
|
+
#
|
385
|
+
# @option options [Float] :http_continue_timeout (1)
|
386
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
387
|
+
# request body. This option has no effect unless the request has "Expect"
|
388
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
389
|
+
# behaviour. This value can safely be set per request on the session.
|
390
|
+
#
|
391
|
+
# @option options [Float] :http_idle_timeout (5)
|
392
|
+
# The number of seconds a connection is allowed to sit idle before it
|
393
|
+
# is considered stale. Stale connections are closed and removed from the
|
394
|
+
# pool before making a request.
|
395
|
+
#
|
396
|
+
# @option options [Float] :http_open_timeout (15)
|
397
|
+
# The default number of seconds to wait for response data.
|
398
|
+
# This value can safely be set per-request on the session.
|
399
|
+
#
|
400
|
+
# @option options [URI::HTTP,String] :http_proxy
|
401
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
402
|
+
#
|
403
|
+
# @option options [Float] :http_read_timeout (60)
|
404
|
+
# The default number of seconds to wait for response data.
|
405
|
+
# This value can safely be set per-request on the session.
|
406
|
+
#
|
407
|
+
# @option options [Boolean] :http_wire_trace (false)
|
408
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
409
|
+
#
|
410
|
+
# @option options [Proc] :on_chunk_received
|
411
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
412
|
+
# of the response body is received. It provides three arguments: the chunk,
|
413
|
+
# the number of bytes received, and the total number of
|
414
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
415
|
+
#
|
416
|
+
# @option options [Proc] :on_chunk_sent
|
417
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
418
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
419
|
+
# the number of bytes read from the body, and the total number of
|
420
|
+
# bytes in the body.
|
421
|
+
#
|
422
|
+
# @option options [Boolean] :raise_response_errors (true)
|
423
|
+
# When `true`, response errors are raised.
|
424
|
+
#
|
425
|
+
# @option options [String] :ssl_ca_bundle
|
426
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
427
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
428
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
429
|
+
#
|
430
|
+
# @option options [String] :ssl_ca_directory
|
431
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
432
|
+
# authority files for verifying peer certificates. If you do
|
433
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
434
|
+
# default will be used if available.
|
362
435
|
#
|
363
|
-
# @option options [
|
364
|
-
#
|
365
|
-
# request body. This option has no effect unless the request has
|
366
|
-
# "Expect" header set to "100-continue". Defaults to `nil` which
|
367
|
-
# disables this behaviour. This value can safely be set per
|
368
|
-
# request on the session.
|
436
|
+
# @option options [String] :ssl_ca_store
|
437
|
+
# Sets the X509::Store to verify peer certificate.
|
369
438
|
#
|
370
|
-
# @option options [
|
371
|
-
#
|
439
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
440
|
+
# Sets a client certificate when creating http connections.
|
372
441
|
#
|
373
|
-
# @option options [
|
374
|
-
#
|
442
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
443
|
+
# Sets a client key when creating http connections.
|
375
444
|
#
|
376
|
-
# @option options [
|
377
|
-
#
|
378
|
-
# connection.
|
445
|
+
# @option options [Float] :ssl_timeout
|
446
|
+
# Sets the SSL timeout in seconds
|
379
447
|
#
|
380
|
-
# @option options [
|
381
|
-
#
|
382
|
-
# verifying peer certificates. If you do not pass
|
383
|
-
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
384
|
-
# will be used if available.
|
385
|
-
#
|
386
|
-
# @option options [String] :ssl_ca_directory Full path of the
|
387
|
-
# directory that contains the unbundled SSL certificate
|
388
|
-
# authority files for verifying peer certificates. If you do
|
389
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
390
|
-
# system default will be used if available.
|
448
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
449
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
391
450
|
#
|
392
451
|
def initialize(*args)
|
393
452
|
super
|
@@ -401,8 +460,8 @@ module Aws::STS
|
|
401
460
|
# token. Typically, you use `AssumeRole` within your account or for
|
402
461
|
# cross-account access. For a comparison of `AssumeRole` with other API
|
403
462
|
# operations that produce temporary credentials, see [Requesting
|
404
|
-
# Temporary Security Credentials][1] and [
|
405
|
-
#
|
463
|
+
# Temporary Security Credentials][1] and [Compare STS credentials][2] in
|
464
|
+
# the *IAM User Guide*.
|
406
465
|
#
|
407
466
|
# **Permissions**
|
408
467
|
#
|
@@ -411,9 +470,9 @@ module Aws::STS
|
|
411
470
|
# following exception: You cannot call the Amazon Web Services STS
|
412
471
|
# `GetFederationToken` or `GetSessionToken` API operations.
|
413
472
|
#
|
414
|
-
# (Optional) You can pass inline or managed
|
415
|
-
#
|
416
|
-
#
|
473
|
+
# (Optional) You can pass inline or managed session policies to this
|
474
|
+
# operation. You can pass a single JSON policy document to use as an
|
475
|
+
# inline session policy. You can also specify up to 10 managed policy
|
417
476
|
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
418
477
|
# plaintext that you use for both inline and managed session policies
|
419
478
|
# can't exceed 2,048 characters. Passing policies to this operation
|
@@ -486,7 +545,7 @@ module Aws::STS
|
|
486
545
|
# denied. The condition in a trust policy that tests for MFA
|
487
546
|
# authentication might look like the following example.
|
488
547
|
#
|
489
|
-
# `"Condition":
|
548
|
+
# `"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}`
|
490
549
|
#
|
491
550
|
# For more information, see [Configuring MFA-Protected API Access][8] in
|
492
551
|
# the *IAM User Guide* guide.
|
@@ -499,7 +558,7 @@ module Aws::STS
|
|
499
558
|
#
|
500
559
|
#
|
501
560
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
502
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
561
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
503
562
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
504
563
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
505
564
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
@@ -522,11 +581,22 @@ module Aws::STS
|
|
522
581
|
# credentials will expose the role session name to the external account
|
523
582
|
# in their CloudTrail logs.
|
524
583
|
#
|
584
|
+
# For security purposes, administrators can view this field in
|
585
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
586
|
+
# Amazon Web Services. Your administrator might require that you specify
|
587
|
+
# your user name as the session name when you assume the role. For more
|
588
|
+
# information, see [ `sts:RoleSessionName` ][2].
|
589
|
+
#
|
525
590
|
# The regex used to validate this parameter is a string of characters
|
526
591
|
# consisting of upper- and lower-case alphanumeric characters with no
|
527
592
|
# spaces. You can also include underscores or any of the following
|
528
593
|
# characters: =,.@-
|
529
594
|
#
|
595
|
+
#
|
596
|
+
#
|
597
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
598
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
599
|
+
#
|
530
600
|
# @option params [Array<Types::PolicyDescriptorType>] :policy_arns
|
531
601
|
# The Amazon Resource Names (ARNs) of the IAM managed policies that you
|
532
602
|
# want to use as managed session policies. The policies must exist in
|
@@ -592,6 +662,9 @@ module Aws::STS
|
|
592
662
|
#
|
593
663
|
# </note>
|
594
664
|
#
|
665
|
+
# For more information about role session permissions, see [Session
|
666
|
+
# policies][1].
|
667
|
+
#
|
595
668
|
#
|
596
669
|
#
|
597
670
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
@@ -614,9 +687,8 @@ module Aws::STS
|
|
614
687
|
# depending on the maximum session duration setting for your role.
|
615
688
|
# However, if you assume a role using role chaining and provide a
|
616
689
|
# `DurationSeconds` parameter value greater than one hour, the operation
|
617
|
-
# fails. To learn how to view the maximum value for your role, see
|
618
|
-
# the
|
619
|
-
# Guide*.
|
690
|
+
# fails. To learn how to view the maximum value for your role, see
|
691
|
+
# [Update the maximum session duration for a role][1].
|
620
692
|
#
|
621
693
|
# By default, the value is set to `3600` seconds.
|
622
694
|
#
|
@@ -632,7 +704,7 @@ module Aws::STS
|
|
632
704
|
#
|
633
705
|
#
|
634
706
|
#
|
635
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
707
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
636
708
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
|
637
709
|
#
|
638
710
|
# @option params [Array<Types::Tag>] :tags
|
@@ -685,9 +757,8 @@ module Aws::STS
|
|
685
757
|
# passes to subsequent sessions in a role chain. For more information,
|
686
758
|
# see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
|
687
759
|
#
|
688
|
-
# This parameter is optional.
|
689
|
-
#
|
690
|
-
# affected.
|
760
|
+
# This parameter is optional. The transitive status of a session tag
|
761
|
+
# does not impact its packed binary size.
|
691
762
|
#
|
692
763
|
# If you choose not to specify a transitive tag key, then no tags are
|
693
764
|
# passed from this session to any subsequent sessions.
|
@@ -745,16 +816,17 @@ module Aws::STS
|
|
745
816
|
#
|
746
817
|
# @option params [String] :source_identity
|
747
818
|
# The source identity specified by the principal that is calling the
|
748
|
-
# `AssumeRole` operation.
|
819
|
+
# `AssumeRole` operation. The source identity value persists across
|
820
|
+
# [chained role][1] sessions.
|
749
821
|
#
|
750
822
|
# You can require users to specify a source identity when they assume a
|
751
|
-
# role. You do this by using the `sts:SourceIdentity` condition
|
752
|
-
# role trust policy. You can use source identity information in
|
823
|
+
# role. You do this by using the [ `sts:SourceIdentity` ][2] condition
|
824
|
+
# key in a role trust policy. You can use source identity information in
|
753
825
|
# CloudTrail logs to determine who took actions with a role. You can use
|
754
826
|
# the `aws:SourceIdentity` condition key to further control access to
|
755
827
|
# Amazon Web Services resources based on the value of source identity.
|
756
828
|
# For more information about using source identity, see [Monitor and
|
757
|
-
# control actions taken with assumed roles][
|
829
|
+
# control actions taken with assumed roles][3] in the *IAM User Guide*.
|
758
830
|
#
|
759
831
|
# The regex used to validate this parameter is a string of characters
|
760
832
|
# consisting of upper- and lower-case alphanumeric characters with no
|
@@ -764,10 +836,20 @@ module Aws::STS
|
|
764
836
|
#
|
765
837
|
#
|
766
838
|
#
|
767
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
839
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
|
840
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
|
841
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
768
842
|
#
|
769
843
|
# @option params [Array<Types::ProvidedContext>] :provided_contexts
|
770
|
-
#
|
844
|
+
# A list of previously acquired trusted context assertions in the format
|
845
|
+
# of a JSON array. The trusted context assertion is signed and encrypted
|
846
|
+
# by Amazon Web Services STS.
|
847
|
+
#
|
848
|
+
# The following is an example of a `ProvidedContext` value that includes
|
849
|
+
# a single trusted context assertion and the ARN of the context provider
|
850
|
+
# from which the trusted context assertion was generated.
|
851
|
+
#
|
852
|
+
# `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
|
771
853
|
#
|
772
854
|
# @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
773
855
|
#
|
@@ -877,8 +959,8 @@ module Aws::STS
|
|
877
959
|
# user-specific credentials or configuration. For a comparison of
|
878
960
|
# `AssumeRoleWithSAML` with the other API operations that produce
|
879
961
|
# temporary credentials, see [Requesting Temporary Security
|
880
|
-
# Credentials][1] and [
|
881
|
-
#
|
962
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
963
|
+
# Guide*.
|
882
964
|
#
|
883
965
|
# The temporary security credentials returned by this operation consist
|
884
966
|
# of an access key ID, a secret access key, and a security token.
|
@@ -1008,7 +1090,7 @@ module Aws::STS
|
|
1008
1090
|
#
|
1009
1091
|
#
|
1010
1092
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1011
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1093
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
1012
1094
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
1013
1095
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1014
1096
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
|
@@ -1096,6 +1178,9 @@ module Aws::STS
|
|
1096
1178
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1097
1179
|
# characters.
|
1098
1180
|
#
|
1181
|
+
# For more information about role session permissions, see [Session
|
1182
|
+
# policies][1].
|
1183
|
+
#
|
1099
1184
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1100
1185
|
# policy, managed policy ARNs, and session tags into a packed binary
|
1101
1186
|
# format that has a separate limit. Your request can fail for this limit
|
@@ -1250,8 +1335,8 @@ module Aws::STS
|
|
1250
1335
|
# a token from the web identity provider. For a comparison of
|
1251
1336
|
# `AssumeRoleWithWebIdentity` with the other API operations that produce
|
1252
1337
|
# temporary credentials, see [Requesting Temporary Security
|
1253
|
-
# Credentials][4] and [
|
1254
|
-
#
|
1338
|
+
# Credentials][4] and [Compare STS credentials][5] in the *IAM User
|
1339
|
+
# Guide*.
|
1255
1340
|
#
|
1256
1341
|
# The temporary security credentials returned by this API consist of an
|
1257
1342
|
# access key ID, a secret access key, and a security token. Applications
|
@@ -1266,9 +1351,9 @@ module Aws::STS
|
|
1266
1351
|
# your session. You can provide a value from 900 seconds (15 minutes) up
|
1267
1352
|
# to the maximum session duration setting for the role. This setting can
|
1268
1353
|
# have a value from 1 hour to 12 hours. To learn how to view the maximum
|
1269
|
-
# value for your role, see [
|
1270
|
-
#
|
1271
|
-
#
|
1354
|
+
# value for your role, see [Update the maximum session duration for a
|
1355
|
+
# role ][6] in the *IAM User Guide*. The maximum session duration limit
|
1356
|
+
# applies when you use the `AssumeRole*` API operations or the
|
1272
1357
|
# `assume-role*` CLI commands. However the limit does not apply when you
|
1273
1358
|
# use those operations to create a console URL. For more information,
|
1274
1359
|
# see [Using IAM Roles][7] in the *IAM User Guide*.
|
@@ -1346,35 +1431,26 @@ module Aws::STS
|
|
1346
1431
|
# instead use a GUID or a pairwise identifier, as [suggested in the OIDC
|
1347
1432
|
# specification][14].
|
1348
1433
|
#
|
1349
|
-
# For more information about how to use
|
1434
|
+
# For more information about how to use OIDC federation and the
|
1350
1435
|
# `AssumeRoleWithWebIdentity` API, see the following resources:
|
1351
1436
|
#
|
1352
1437
|
# * [Using Web Identity Federation API Operations for Mobile Apps][15]
|
1353
1438
|
# and [Federation Through a Web-based Identity Provider][16].
|
1354
1439
|
#
|
1355
|
-
# * [ Web Identity Federation Playground][17]. Walk through the process
|
1356
|
-
# of authenticating through Login with Amazon, Facebook, or Google,
|
1357
|
-
# getting temporary security credentials, and then using those
|
1358
|
-
# credentials to make a request to Amazon Web Services.
|
1359
|
-
#
|
1360
1440
|
# * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
|
1361
1441
|
# Services SDK for Android Developer Guide][3]. These toolkits contain
|
1362
1442
|
# sample apps that show how to invoke the identity providers. The
|
1363
1443
|
# toolkits then show how to use the information from these providers
|
1364
1444
|
# to get and use temporary security credentials.
|
1365
1445
|
#
|
1366
|
-
# * [Web Identity Federation with Mobile Applications][18]. This article
|
1367
|
-
# discusses web identity federation and shows an example of how to use
|
1368
|
-
# web identity federation to get access to content in Amazon S3.
|
1369
|
-
#
|
1370
1446
|
#
|
1371
1447
|
#
|
1372
1448
|
# [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
1373
1449
|
# [2]: http://aws.amazon.com/sdkforios/
|
1374
1450
|
# [3]: http://aws.amazon.com/sdkforandroid/
|
1375
1451
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1376
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1377
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1452
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
1453
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
1378
1454
|
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1379
1455
|
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
1380
1456
|
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
@@ -1385,13 +1461,29 @@ module Aws::STS
|
|
1385
1461
|
# [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
1386
1462
|
# [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
1387
1463
|
# [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
1388
|
-
# [17]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
|
1389
|
-
# [18]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
1390
1464
|
#
|
1391
1465
|
# @option params [required, String] :role_arn
|
1392
1466
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
1393
1467
|
# assuming.
|
1394
1468
|
#
|
1469
|
+
# <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools that
|
1470
|
+
# assume [cross-account IAM roles][1]. The trust policies of these roles
|
1471
|
+
# must accept the `cognito-identity.amazonaws.com` service principal and
|
1472
|
+
# must contain the `cognito-identity.amazonaws.com:aud` condition key to
|
1473
|
+
# restrict role assumption to users from your intended identity pools. A
|
1474
|
+
# policy that trusts Amazon Cognito identity pools without this
|
1475
|
+
# condition creates a risk that a user from an unintended identity pool
|
1476
|
+
# can assume the role. For more information, see [ Trust policies for
|
1477
|
+
# IAM roles in Basic (Classic) authentication ][2] in the *Amazon
|
1478
|
+
# Cognito Developer Guide*.
|
1479
|
+
#
|
1480
|
+
# </note>
|
1481
|
+
#
|
1482
|
+
#
|
1483
|
+
#
|
1484
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
|
1485
|
+
# [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
|
1486
|
+
#
|
1395
1487
|
# @option params [required, String] :role_session_name
|
1396
1488
|
# An identifier for the assumed role session. Typically, you pass the
|
1397
1489
|
# name or identifier that is associated with the user who is using your
|
@@ -1400,18 +1492,30 @@ module Aws::STS
|
|
1400
1492
|
# is included as part of the ARN and assumed role ID in the
|
1401
1493
|
# `AssumedRoleUser` response element.
|
1402
1494
|
#
|
1495
|
+
# For security purposes, administrators can view this field in
|
1496
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
1497
|
+
# Amazon Web Services. Your administrator might require that you specify
|
1498
|
+
# your user name as the session name when you assume the role. For more
|
1499
|
+
# information, see [ `sts:RoleSessionName` ][2].
|
1500
|
+
#
|
1403
1501
|
# The regex used to validate this parameter is a string of characters
|
1404
1502
|
# consisting of upper- and lower-case alphanumeric characters with no
|
1405
1503
|
# spaces. You can also include underscores or any of the following
|
1406
1504
|
# characters: =,.@-
|
1407
1505
|
#
|
1506
|
+
#
|
1507
|
+
#
|
1508
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
1509
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
1510
|
+
#
|
1408
1511
|
# @option params [required, String] :web_identity_token
|
1409
1512
|
# The OAuth 2.0 access token or OpenID Connect ID token that is provided
|
1410
1513
|
# by the identity provider. Your application must get this token by
|
1411
1514
|
# authenticating the user who is using your application with a web
|
1412
1515
|
# identity provider before the application makes an
|
1413
|
-
# `AssumeRoleWithWebIdentity` call.
|
1414
|
-
#
|
1516
|
+
# `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
|
1517
|
+
# formatted as either an integer or a long integer. Only tokens with RSA
|
1518
|
+
# algorithms (RS256) are supported.
|
1415
1519
|
#
|
1416
1520
|
# @option params [String] :provider_id
|
1417
1521
|
# The fully qualified host component of the domain name of the OAuth 2.0
|
@@ -1480,6 +1584,9 @@ module Aws::STS
|
|
1480
1584
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1481
1585
|
# characters.
|
1482
1586
|
#
|
1587
|
+
# For more information about role session permissions, see [Session
|
1588
|
+
# policies][1].
|
1589
|
+
#
|
1483
1590
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1484
1591
|
# policy, managed policy ARNs, and session tags into a packed binary
|
1485
1592
|
# format that has a separate limit. Your request can fail for this limit
|
@@ -1600,6 +1707,123 @@ module Aws::STS
|
|
1600
1707
|
req.send_request(options)
|
1601
1708
|
end
|
1602
1709
|
|
1710
|
+
# Returns a set of short term credentials you can use to perform
|
1711
|
+
# privileged tasks in a member account.
|
1712
|
+
#
|
1713
|
+
# Before you can launch a privileged session, you must have enabled
|
1714
|
+
# centralized root access in your organization. For steps to enable this
|
1715
|
+
# feature, see [Centralize root access for member accounts][1] in the
|
1716
|
+
# *IAM User Guide*.
|
1717
|
+
#
|
1718
|
+
# <note markdown="1"> The global endpoint is not supported for AssumeRoot. You must send
|
1719
|
+
# this request to a Regional STS endpoint. For more information, see
|
1720
|
+
# [Endpoints][2].
|
1721
|
+
#
|
1722
|
+
# </note>
|
1723
|
+
#
|
1724
|
+
# You can track AssumeRoot in CloudTrail logs to determine what actions
|
1725
|
+
# were performed in a session. For more information, see [Track
|
1726
|
+
# privileged tasks in CloudTrail][3] in the *IAM User Guide*.
|
1727
|
+
#
|
1728
|
+
#
|
1729
|
+
#
|
1730
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
|
1731
|
+
# [2]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
|
1732
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
|
1733
|
+
#
|
1734
|
+
# @option params [required, String] :target_principal
|
1735
|
+
# The member account principal ARN or account ID.
|
1736
|
+
#
|
1737
|
+
# @option params [required, Types::PolicyDescriptorType] :task_policy_arn
|
1738
|
+
# The identity based policy that scopes the session to the privileged
|
1739
|
+
# tasks that can be performed. You can use one of following Amazon Web
|
1740
|
+
# Services managed policies to scope root session actions. You can add
|
1741
|
+
# additional customer managed policies to further limit the permissions
|
1742
|
+
# for the root session.
|
1743
|
+
#
|
1744
|
+
# * [IAMAuditRootUserCredentials][1]
|
1745
|
+
#
|
1746
|
+
# * [IAMCreateRootUserPassword][2]
|
1747
|
+
#
|
1748
|
+
# * [IAMDeleteRootUserCredentials][3]
|
1749
|
+
#
|
1750
|
+
# * [S3UnlockBucketPolicy][4]
|
1751
|
+
#
|
1752
|
+
# * [SQSUnlockQueuePolicy][5]
|
1753
|
+
#
|
1754
|
+
#
|
1755
|
+
#
|
1756
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
|
1757
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
|
1758
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
|
1759
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
|
1760
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
|
1761
|
+
#
|
1762
|
+
# @option params [Integer] :duration_seconds
|
1763
|
+
# The duration, in seconds, of the privileged session. The value can
|
1764
|
+
# range from 0 seconds up to the maximum session duration of 900 seconds
|
1765
|
+
# (15 minutes). If you specify a value higher than this setting, the
|
1766
|
+
# operation fails.
|
1767
|
+
#
|
1768
|
+
# By default, the value is set to `900` seconds.
|
1769
|
+
#
|
1770
|
+
# @return [Types::AssumeRootResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1771
|
+
#
|
1772
|
+
# * {Types::AssumeRootResponse#credentials #credentials} => Types::Credentials
|
1773
|
+
# * {Types::AssumeRootResponse#source_identity #source_identity} => String
|
1774
|
+
#
|
1775
|
+
#
|
1776
|
+
# @example Example: To launch a privileged session
|
1777
|
+
#
|
1778
|
+
# # The following command retrieves a set of short-term credentials you can use to unlock an S3 bucket for a member account
|
1779
|
+
# # by removing the bucket policy.
|
1780
|
+
#
|
1781
|
+
# resp = client.assume_root({
|
1782
|
+
# duration_seconds: 900,
|
1783
|
+
# target_principal: "111122223333",
|
1784
|
+
# task_policy_arn: {
|
1785
|
+
# arn: "arn:aws:iam::aws:policy/root-task/S3UnlockBucketPolicy",
|
1786
|
+
# },
|
1787
|
+
# })
|
1788
|
+
#
|
1789
|
+
# resp.to_h outputs the following:
|
1790
|
+
# {
|
1791
|
+
# credentials: {
|
1792
|
+
# access_key_id: "ASIAJEXAMPLEXEG2JICEA",
|
1793
|
+
# expiration: Time.parse("2024-11-15T00:05:07Z"),
|
1794
|
+
# secret_access_key: "9drTJvcXLB89EXAMPLELB8923FB892xMFI",
|
1795
|
+
# session_token: "AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=",
|
1796
|
+
# },
|
1797
|
+
# source_identity: "Alice",
|
1798
|
+
# }
|
1799
|
+
#
|
1800
|
+
# @example Request syntax with placeholder values
|
1801
|
+
#
|
1802
|
+
# resp = client.assume_root({
|
1803
|
+
# target_principal: "TargetPrincipalType", # required
|
1804
|
+
# task_policy_arn: { # required
|
1805
|
+
# arn: "arnType",
|
1806
|
+
# },
|
1807
|
+
# duration_seconds: 1,
|
1808
|
+
# })
|
1809
|
+
#
|
1810
|
+
# @example Response structure
|
1811
|
+
#
|
1812
|
+
# resp.credentials.access_key_id #=> String
|
1813
|
+
# resp.credentials.secret_access_key #=> String
|
1814
|
+
# resp.credentials.session_token #=> String
|
1815
|
+
# resp.credentials.expiration #=> Time
|
1816
|
+
# resp.source_identity #=> String
|
1817
|
+
#
|
1818
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoot AWS API Documentation
|
1819
|
+
#
|
1820
|
+
# @overload assume_root(params = {})
|
1821
|
+
# @param [Hash] params ({})
|
1822
|
+
def assume_root(params = {}, options = {})
|
1823
|
+
req = build_request(:assume_root, params)
|
1824
|
+
req.send_request(options)
|
1825
|
+
end
|
1826
|
+
|
1603
1827
|
# Decodes additional information about the authorization status of a
|
1604
1828
|
# request from an encoded message returned in response to an Amazon Web
|
1605
1829
|
# Services request.
|
@@ -1838,8 +2062,8 @@ module Aws::STS
|
|
1838
2062
|
# usually in a server-based application. For a comparison of
|
1839
2063
|
# `GetFederationToken` with the other API operations that produce
|
1840
2064
|
# temporary credentials, see [Requesting Temporary Security
|
1841
|
-
# Credentials][1] and [
|
1842
|
-
#
|
2065
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
2066
|
+
# Guide*.
|
1843
2067
|
#
|
1844
2068
|
# Although it is possible to call `GetFederationToken` using the
|
1845
2069
|
# security credentials of an Amazon Web Services account root user
|
@@ -1936,7 +2160,7 @@ module Aws::STS
|
|
1936
2160
|
#
|
1937
2161
|
#
|
1938
2162
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1939
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
2163
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
1940
2164
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
1941
2165
|
# [4]: http://aws.amazon.com/cognito/
|
1942
2166
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
@@ -2188,8 +2412,8 @@ module Aws::STS
|
|
2188
2412
|
# An incorrect MFA code causes the API to return an access denied error.
|
2189
2413
|
# For a comparison of `GetSessionToken` with the other API operations
|
2190
2414
|
# that produce temporary credentials, see [Requesting Temporary Security
|
2191
|
-
# Credentials][1] and [
|
2192
|
-
#
|
2415
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
2416
|
+
# Guide*.
|
2193
2417
|
#
|
2194
2418
|
# <note markdown="1"> No permissions are required for users to perform this operation. The
|
2195
2419
|
# purpose of the `sts:GetSessionToken` operation is to authenticate the
|
@@ -2244,7 +2468,7 @@ module Aws::STS
|
|
2244
2468
|
#
|
2245
2469
|
#
|
2246
2470
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
2247
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
2471
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
2248
2472
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
|
2249
2473
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
2250
2474
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
|
@@ -2337,14 +2561,19 @@ module Aws::STS
|
|
2337
2561
|
# @api private
|
2338
2562
|
def build_request(operation_name, params = {})
|
2339
2563
|
handlers = @handlers.for(operation_name)
|
2564
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
2565
|
+
Aws::Telemetry.module_to_tracer_name('Aws::STS')
|
2566
|
+
)
|
2340
2567
|
context = Seahorse::Client::RequestContext.new(
|
2341
2568
|
operation_name: operation_name,
|
2342
2569
|
operation: config.api.operation(operation_name),
|
2343
2570
|
client: self,
|
2344
2571
|
params: params,
|
2345
|
-
config: config
|
2572
|
+
config: config,
|
2573
|
+
tracer: tracer
|
2574
|
+
)
|
2346
2575
|
context[:gem_name] = 'aws-sdk-core'
|
2347
|
-
context[:gem_version] = '3.
|
2576
|
+
context[:gem_version] = '3.214.0'
|
2348
2577
|
Seahorse::Client::Request.new(handlers, context)
|
2349
2578
|
end
|
2350
2579
|
|