aws-sdk-core 3.117.0 → 3.197.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +836 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +153 -0
- data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
- data/lib/aws-defaults.rb +3 -0
- data/lib/aws-sdk-core/arn.rb +13 -0
- data/lib/aws-sdk-core/assume_role_credentials.rb +21 -7
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -10
- data/lib/aws-sdk-core/binary/decode_handler.rb +0 -5
- data/lib/aws-sdk-core/binary/encode_handler.rb +12 -1
- data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
- data/lib/aws-sdk-core/client_stubs.rb +20 -13
- data/lib/aws-sdk-core/credential_provider.rb +4 -1
- data/lib/aws-sdk-core/credential_provider_chain.rb +8 -5
- data/lib/aws-sdk-core/ec2_metadata.rb +4 -3
- data/lib/aws-sdk-core/ecs_credentials.rb +187 -52
- data/lib/aws-sdk-core/endpoints/condition.rb +41 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +17 -0
- data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +75 -0
- data/lib/aws-sdk-core/endpoints/error_rule.rb +42 -0
- data/lib/aws-sdk-core/endpoints/function.rb +80 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +135 -0
- data/lib/aws-sdk-core/endpoints/reference.rb +31 -0
- data/lib/aws-sdk-core/endpoints/rule.rb +25 -0
- data/lib/aws-sdk-core/endpoints/rule_set.rb +52 -0
- data/lib/aws-sdk-core/endpoints/rules_provider.rb +37 -0
- data/lib/aws-sdk-core/endpoints/templater.rb +58 -0
- data/lib/aws-sdk-core/endpoints/tree_rule.rb +45 -0
- data/lib/aws-sdk-core/endpoints/url.rb +60 -0
- data/lib/aws-sdk-core/endpoints.rb +78 -0
- data/lib/aws-sdk-core/errors.rb +17 -4
- data/lib/aws-sdk-core/event_emitter.rb +0 -16
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +127 -33
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +30 -4
- data/lib/aws-sdk-core/json/handler.rb +8 -1
- data/lib/aws-sdk-core/json/json_engine.rb +10 -8
- data/lib/aws-sdk-core/json/oj_engine.rb +33 -6
- data/lib/aws-sdk-core/json/parser.rb +38 -2
- data/lib/aws-sdk-core/json.rb +8 -26
- data/lib/aws-sdk-core/log/formatter.rb +6 -0
- data/lib/aws-sdk-core/log/param_filter.rb +9 -1
- data/lib/aws-sdk-core/lru_cache.rb +75 -0
- data/lib/aws-sdk-core/pageable_response.rb +81 -32
- data/lib/aws-sdk-core/param_validator.rb +36 -2
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +67 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +342 -0
- 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 +29 -1
- data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +6 -2
- data/lib/aws-sdk-core/plugins/http_checksum.rb +9 -1
- data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
- data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +34 -6
- data/lib/aws-sdk-core/plugins/logging.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +17 -0
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +1 -2
- data/lib/aws-sdk-core/plugins/recursion_detection.rb +38 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +144 -17
- data/lib/aws-sdk-core/plugins/request_compression.rb +226 -0
- data/lib/aws-sdk-core/plugins/response_paging.rb +1 -1
- data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +7 -4
- data/lib/aws-sdk-core/plugins/retry_errors.rb +33 -7
- data/lib/aws-sdk-core/plugins/sign.rb +211 -0
- data/lib/aws-sdk-core/plugins/signature_v2.rb +1 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +28 -31
- data/lib/aws-sdk-core/plugins/stub_responses.rb +6 -1
- data/lib/aws-sdk-core/plugins/user_agent.rb +152 -14
- data/lib/aws-sdk-core/process_credentials.rb +50 -34
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
- data/lib/aws-sdk-core/query/param_builder.rb +2 -2
- data/lib/aws-sdk-core/refreshing_credentials.rb +49 -18
- data/lib/aws-sdk-core/refreshing_token.rb +71 -0
- data/lib/aws-sdk-core/rest/handler.rb +1 -1
- data/lib/aws-sdk-core/rest/request/body.rb +49 -4
- data/lib/aws-sdk-core/rest/request/content_type.rb +60 -0
- data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +23 -7
- 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 +10 -3
- data/lib/aws-sdk-core/rest.rb +1 -0
- data/lib/aws-sdk-core/shared_config.rb +112 -12
- data/lib/aws-sdk-core/sso_credentials.rb +92 -51
- data/lib/aws-sdk-core/sso_token_provider.rb +135 -0
- data/lib/aws-sdk-core/static_token_provider.rb +14 -0
- data/lib/aws-sdk-core/structure.rb +16 -5
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/token.rb +31 -0
- data/lib/aws-sdk-core/token_provider.rb +15 -0
- data/lib/aws-sdk-core/token_provider_chain.rb +51 -0
- data/lib/aws-sdk-core/util.rb +39 -0
- data/lib/aws-sdk-core/waiters/poller.rb +4 -2
- data/lib/aws-sdk-core/xml/builder.rb +17 -9
- data/lib/aws-sdk-core/xml/error_handler.rb +31 -8
- data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/engines/ox.rb +1 -1
- data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +0 -8
- data/lib/aws-sdk-core/xml/parser/frame.rb +27 -20
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core.rb +21 -0
- data/lib/aws-sdk-sso/client.rb +157 -50
- data/lib/aws-sdk-sso/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-sso/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-sso/endpoints.rb +72 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +78 -0
- data/lib/aws-sdk-sso/types.rb +8 -43
- data/lib/aws-sdk-sso.rb +5 -1
- data/lib/aws-sdk-ssooidc/client.rb +1008 -0
- data/lib/aws-sdk-ssooidc/client_api.rb +293 -0
- data/lib/aws-sdk-ssooidc/customizations.rb +1 -0
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-ssooidc/endpoints.rb +72 -0
- data/lib/aws-sdk-ssooidc/errors.rb +342 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +78 -0
- data/lib/aws-sdk-ssooidc/resource.rb +26 -0
- data/lib/aws-sdk-ssooidc/types.rb +823 -0
- data/lib/aws-sdk-ssooidc.rb +59 -0
- data/lib/aws-sdk-sts/client.rb +472 -398
- data/lib/aws-sdk-sts/client_api.rb +20 -9
- data/lib/aws-sdk-sts/endpoint_parameters.rb +78 -0
- data/lib/aws-sdk-sts/endpoint_provider.rb +112 -0
- data/lib/aws-sdk-sts/endpoints.rb +136 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +5 -1
- data/lib/aws-sdk-sts/presigner.rb +14 -10
- data/lib/aws-sdk-sts/types.rb +168 -227
- data/lib/aws-sdk-sts.rb +5 -1
- data/lib/seahorse/client/async_base.rb +1 -2
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +1 -0
- data/lib/seahorse/client/configuration.rb +5 -5
- data/lib/seahorse/client/h2/connection.rb +15 -16
- data/lib/seahorse/client/h2/handler.rb +5 -5
- data/lib/seahorse/client/net_http/connection_pool.rb +10 -9
- data/lib/seahorse/client/net_http/handler.rb +15 -7
- data/lib/seahorse/client/net_http/patches.rb +12 -86
- data/lib/seahorse/client/plugin.rb +9 -0
- data/lib/seahorse/client/plugins/content_length.rb +11 -5
- data/lib/seahorse/client/plugins/h2.rb +3 -3
- data/lib/seahorse/client/plugins/net_http.rb +73 -10
- data/lib/seahorse/client/plugins/request_callback.rb +40 -9
- data/lib/seahorse/client/response.rb +6 -0
- data/lib/seahorse/model/operation.rb +6 -0
- data/lib/seahorse/model/shapes.rb +27 -2
- data/lib/seahorse/util.rb +4 -0
- 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/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 +82 -17
- data/lib/aws-sdk-sso/plugins/content_type.rb +0 -25
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -22,12 +22,17 @@ 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'
|
28
29
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
30
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
|
-
require 'aws-sdk-core/plugins/
|
31
|
+
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
32
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
33
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
34
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
35
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
31
36
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
32
37
|
require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
|
33
38
|
|
@@ -69,14 +74,20 @@ module Aws::STS
|
|
69
74
|
add_plugin(Aws::Plugins::ResponsePaging)
|
70
75
|
add_plugin(Aws::Plugins::StubResponses)
|
71
76
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
77
|
+
add_plugin(Aws::Plugins::InvocationId)
|
72
78
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
73
79
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
74
80
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
75
81
|
add_plugin(Aws::Plugins::TransferEncoding)
|
76
82
|
add_plugin(Aws::Plugins::HttpChecksum)
|
77
|
-
add_plugin(Aws::Plugins::
|
83
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
84
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
85
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
86
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
87
|
+
add_plugin(Aws::Plugins::Sign)
|
78
88
|
add_plugin(Aws::Plugins::Protocols::Query)
|
79
89
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
90
|
+
add_plugin(Aws::STS::Plugins::Endpoints)
|
80
91
|
|
81
92
|
# @overload initialize(options)
|
82
93
|
# @param [Hash] options
|
@@ -121,7 +132,9 @@ module Aws::STS
|
|
121
132
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
122
133
|
# are very aggressive. Construct and pass an instance of
|
123
134
|
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
124
|
-
# enable retries and extended timeouts.
|
135
|
+
# enable retries and extended timeouts. Instance profile credential
|
136
|
+
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
137
|
+
# to true.
|
125
138
|
#
|
126
139
|
# @option options [required, String] :region
|
127
140
|
# The AWS region to connect to. The configured `:region` is
|
@@ -175,14 +188,29 @@ module Aws::STS
|
|
175
188
|
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
176
189
|
# a clock skew correction and retry requests with skewed client clocks.
|
177
190
|
#
|
191
|
+
# @option options [String] :defaults_mode ("legacy")
|
192
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
193
|
+
# accepted modes and the configuration defaults that are included.
|
194
|
+
#
|
178
195
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
179
196
|
# Set to true to disable SDK automatically adding host prefix
|
180
197
|
# to default service endpoint when available.
|
181
198
|
#
|
182
|
-
# @option options [
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
199
|
+
# @option options [Boolean] :disable_request_compression (false)
|
200
|
+
# When set to 'true' the request body will not be compressed
|
201
|
+
# for supported operations.
|
202
|
+
#
|
203
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
204
|
+
# Normally you should not configure the `:endpoint` option
|
205
|
+
# directly. This is normally constructed from the `:region`
|
206
|
+
# option. Configuring `:endpoint` is normally reserved for
|
207
|
+
# connecting to test or custom endpoints. The endpoint should
|
208
|
+
# be a URI formatted like:
|
209
|
+
#
|
210
|
+
# 'http://example.com'
|
211
|
+
# 'https://example.com'
|
212
|
+
# 'http://example.com:123'
|
213
|
+
#
|
186
214
|
#
|
187
215
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
188
216
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -199,6 +227,10 @@ module Aws::STS
|
|
199
227
|
# @option options [Boolean] :endpoint_discovery (false)
|
200
228
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
201
229
|
#
|
230
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
231
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
232
|
+
# variables and the shared configuration file.
|
233
|
+
#
|
202
234
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
203
235
|
# The log formatter.
|
204
236
|
#
|
@@ -219,6 +251,11 @@ module Aws::STS
|
|
219
251
|
# Used when loading credentials from the shared credentials file
|
220
252
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
221
253
|
#
|
254
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
255
|
+
# The minimum size in bytes that triggers compression for request
|
256
|
+
# bodies. The value must be non-negative integer value between 0
|
257
|
+
# and 10485780 bytes inclusive.
|
258
|
+
#
|
222
259
|
# @option options [Proc] :retry_backoff
|
223
260
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
224
261
|
# This option is only used in the `legacy` retry mode.
|
@@ -264,6 +301,12 @@ module Aws::STS
|
|
264
301
|
# in the future.
|
265
302
|
#
|
266
303
|
#
|
304
|
+
# @option options [String] :sdk_ua_app_id
|
305
|
+
# A unique and opaque application ID that is appended to the
|
306
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
307
|
+
# maximum length of 50. This variable is sourced from environment
|
308
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
309
|
+
#
|
267
310
|
# @option options [String] :secret_access_key
|
268
311
|
#
|
269
312
|
# @option options [String] :session_token
|
@@ -282,51 +325,94 @@ module Aws::STS
|
|
282
325
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
283
326
|
# requests are made, and retries are disabled.
|
284
327
|
#
|
328
|
+
# @option options [Aws::TokenProvider] :token_provider
|
329
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
330
|
+
# following classes:
|
331
|
+
#
|
332
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
333
|
+
# tokens.
|
334
|
+
#
|
335
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
336
|
+
# access token generated from `aws login`.
|
337
|
+
#
|
338
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
339
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
340
|
+
#
|
341
|
+
# @option options [Boolean] :use_dualstack_endpoint
|
342
|
+
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
343
|
+
# will be used if available.
|
344
|
+
#
|
345
|
+
# @option options [Boolean] :use_fips_endpoint
|
346
|
+
# When set to `true`, fips compatible endpoints will be used if available.
|
347
|
+
# When a `fips` region is used, the region is normalized and this config
|
348
|
+
# is set to `true`.
|
349
|
+
#
|
285
350
|
# @option options [Boolean] :validate_params (true)
|
286
351
|
# When `true`, request parameters are validated before
|
287
352
|
# sending the request.
|
288
353
|
#
|
289
|
-
# @option options [
|
290
|
-
#
|
354
|
+
# @option options [Aws::STS::EndpointProvider] :endpoint_provider
|
355
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::STS::EndpointParameters`
|
291
356
|
#
|
292
|
-
# @option options [Float] :
|
293
|
-
# seconds to wait
|
294
|
-
#
|
357
|
+
# @option options [Float] :http_continue_timeout (1)
|
358
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
359
|
+
# request body. This option has no effect unless the request has "Expect"
|
360
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
361
|
+
# behaviour. This value can safely be set per request on the session.
|
295
362
|
#
|
296
|
-
# @option options [
|
297
|
-
# number of seconds
|
298
|
-
#
|
363
|
+
# @option options [Float] :http_idle_timeout (5)
|
364
|
+
# The number of seconds a connection is allowed to sit idle before it
|
365
|
+
# is considered stale. Stale connections are closed and removed from the
|
366
|
+
# pool before making a request.
|
299
367
|
#
|
300
|
-
# @option options [Float] :
|
301
|
-
#
|
302
|
-
#
|
303
|
-
# from the pool before making a request.
|
368
|
+
# @option options [Float] :http_open_timeout (15)
|
369
|
+
# The default number of seconds to wait for response data.
|
370
|
+
# This value can safely be set per-request on the session.
|
304
371
|
#
|
305
|
-
# @option options [
|
306
|
-
#
|
307
|
-
# request body. This option has no effect unless the request has
|
308
|
-
# "Expect" header set to "100-continue". Defaults to `nil` which
|
309
|
-
# disables this behaviour. This value can safely be set per
|
310
|
-
# request on the session.
|
372
|
+
# @option options [URI::HTTP,String] :http_proxy
|
373
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
311
374
|
#
|
312
|
-
# @option options [
|
313
|
-
#
|
375
|
+
# @option options [Float] :http_read_timeout (60)
|
376
|
+
# The default number of seconds to wait for response data.
|
377
|
+
# This value can safely be set per-request on the session.
|
314
378
|
#
|
315
|
-
# @option options [Boolean] :
|
316
|
-
#
|
317
|
-
# connection.
|
379
|
+
# @option options [Boolean] :http_wire_trace (false)
|
380
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
318
381
|
#
|
319
|
-
# @option options [
|
320
|
-
#
|
321
|
-
#
|
322
|
-
#
|
323
|
-
#
|
382
|
+
# @option options [Proc] :on_chunk_received
|
383
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
384
|
+
# of the response body is received. It provides three arguments: the chunk,
|
385
|
+
# the number of bytes received, and the total number of
|
386
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
387
|
+
#
|
388
|
+
# @option options [Proc] :on_chunk_sent
|
389
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
390
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
391
|
+
# the number of bytes read from the body, and the total number of
|
392
|
+
# bytes in the body.
|
393
|
+
#
|
394
|
+
# @option options [Boolean] :raise_response_errors (true)
|
395
|
+
# When `true`, response errors are raised.
|
324
396
|
#
|
325
|
-
# @option options [String] :
|
326
|
-
#
|
397
|
+
# @option options [String] :ssl_ca_bundle
|
398
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
399
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
400
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
401
|
+
#
|
402
|
+
# @option options [String] :ssl_ca_directory
|
403
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
327
404
|
# authority files for verifying peer certificates. If you do
|
328
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
329
|
-
#
|
405
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
406
|
+
# default will be used if available.
|
407
|
+
#
|
408
|
+
# @option options [String] :ssl_ca_store
|
409
|
+
# Sets the X509::Store to verify peer certificate.
|
410
|
+
#
|
411
|
+
# @option options [Float] :ssl_timeout
|
412
|
+
# Sets the SSL timeout in seconds
|
413
|
+
#
|
414
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
415
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
330
416
|
#
|
331
417
|
def initialize(*args)
|
332
418
|
super
|
@@ -335,59 +421,67 @@ module Aws::STS
|
|
335
421
|
# @!group API Operations
|
336
422
|
|
337
423
|
# Returns a set of temporary security credentials that you can use to
|
338
|
-
# access Amazon Web Services resources
|
339
|
-
#
|
340
|
-
#
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
#
|
345
|
-
# User Guide*.
|
424
|
+
# access Amazon Web Services resources. These temporary credentials
|
425
|
+
# consist of an access key ID, a secret access key, and a security
|
426
|
+
# token. Typically, you use `AssumeRole` within your account or for
|
427
|
+
# cross-account access. For a comparison of `AssumeRole` with other API
|
428
|
+
# operations that produce temporary credentials, see [Requesting
|
429
|
+
# Temporary Security Credentials][1] and [Comparing the Amazon Web
|
430
|
+
# Services STS API operations][2] in the *IAM User Guide*.
|
346
431
|
#
|
347
432
|
# **Permissions**
|
348
433
|
#
|
349
434
|
# The temporary security credentials created by `AssumeRole` can be used
|
350
435
|
# to make API calls to any Amazon Web Services service with the
|
351
|
-
# following exception: You cannot call the
|
352
|
-
# `GetSessionToken` API operations.
|
436
|
+
# following exception: You cannot call the Amazon Web Services STS
|
437
|
+
# `GetFederationToken` or `GetSessionToken` API operations.
|
353
438
|
#
|
354
439
|
# (Optional) You can pass inline or managed [session policies][3] to
|
355
440
|
# this operation. You can pass a single JSON policy document to use as
|
356
|
-
# an inline session policy. You can also specify up to 10 managed
|
357
|
-
#
|
358
|
-
# use for both inline and managed session policies
|
359
|
-
# characters. Passing policies to this operation
|
360
|
-
# credentials. The resulting session's
|
361
|
-
# of the role's identity-based policy
|
362
|
-
# use the role's temporary
|
363
|
-
# Services API calls to access
|
364
|
-
# role. You cannot use session
|
365
|
-
#
|
366
|
-
#
|
367
|
-
# User Guide*.
|
368
|
-
#
|
369
|
-
#
|
370
|
-
#
|
371
|
-
#
|
372
|
-
#
|
441
|
+
# an inline session policy. You can also specify up to 10 managed policy
|
442
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
443
|
+
# plaintext that you use for both inline and managed session policies
|
444
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
445
|
+
# returns new temporary credentials. The resulting session's
|
446
|
+
# permissions are the intersection of the role's identity-based policy
|
447
|
+
# and the session policies. You can use the role's temporary
|
448
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
449
|
+
# resources in the account that owns the role. You cannot use session
|
450
|
+
# policies to grant more permissions than those allowed by the
|
451
|
+
# identity-based policy of the role that is being assumed. For more
|
452
|
+
# information, see [Session Policies][3] in the *IAM User Guide*.
|
453
|
+
#
|
454
|
+
# When you create a role, you create two policies: a role trust policy
|
455
|
+
# that specifies *who* can assume the role, and a permissions policy
|
456
|
+
# that specifies *what* can be done with the role. You specify the
|
457
|
+
# trusted principal that is allowed to assume the role in the role trust
|
458
|
+
# policy.
|
459
|
+
#
|
460
|
+
# To assume a role from a different account, your Amazon Web Services
|
461
|
+
# account must be trusted by the role. The trust relationship is defined
|
462
|
+
# in the role's trust policy when the role is created. That trust
|
463
|
+
# policy states which accounts are allowed to delegate that access to
|
464
|
+
# users in the account.
|
373
465
|
#
|
374
466
|
# A user who wants to access a role in a different account must also
|
375
|
-
# have permissions that are delegated from the
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
379
|
-
#
|
467
|
+
# have permissions that are delegated from the account administrator.
|
468
|
+
# The administrator must attach a policy that allows the user to call
|
469
|
+
# `AssumeRole` for the ARN of the role in the other account.
|
470
|
+
#
|
471
|
+
# To allow a user to assume a role in the same account, you can do
|
472
|
+
# either of the following:
|
380
473
|
#
|
381
|
-
# * Attach a policy to the user
|
382
|
-
#
|
474
|
+
# * Attach a policy to the user that allows the user to call
|
475
|
+
# `AssumeRole` (as long as the role's trust policy trusts the
|
476
|
+
# account).
|
383
477
|
#
|
384
478
|
# * Add the user as a principal directly in the role's trust policy.
|
385
479
|
#
|
386
|
-
#
|
387
|
-
#
|
388
|
-
#
|
389
|
-
#
|
390
|
-
# Guide*.
|
480
|
+
# You can do either because the role’s trust policy acts as an IAM
|
481
|
+
# resource-based policy. When a resource-based policy grants access to a
|
482
|
+
# principal in the same account, no additional identity-based policy is
|
483
|
+
# required. For more information about trust policies and resource-based
|
484
|
+
# policies, see [IAM Policies][4] in the *IAM User Guide*.
|
391
485
|
#
|
392
486
|
# **Tags**
|
393
487
|
#
|
@@ -469,12 +563,12 @@ module Aws::STS
|
|
469
563
|
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
470
564
|
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
471
565
|
#
|
472
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
473
|
-
#
|
474
|
-
# separate limit. Your request can fail for this limit
|
475
|
-
# plaintext meets the other requirements. The
|
476
|
-
# response element indicates by percentage how close
|
477
|
-
# tags for your request are to the upper size limit.
|
566
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
567
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
568
|
+
# format that has a separate limit. Your request can fail for this limit
|
569
|
+
# even if your plaintext meets the other requirements. The
|
570
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
571
|
+
# the policies and tags for your request are to the upper size limit.
|
478
572
|
#
|
479
573
|
# </note>
|
480
574
|
#
|
@@ -514,12 +608,12 @@ module Aws::STS
|
|
514
608
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
515
609
|
# characters.
|
516
610
|
#
|
517
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
518
|
-
#
|
519
|
-
# separate limit. Your request can fail for this limit
|
520
|
-
# plaintext meets the other requirements. The
|
521
|
-
# response element indicates by percentage how close
|
522
|
-
# tags for your request are to the upper size limit.
|
611
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
612
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
613
|
+
# format that has a separate limit. Your request can fail for this limit
|
614
|
+
# even if your plaintext meets the other requirements. The
|
615
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
616
|
+
# the policies and tags for your request are to the upper size limit.
|
523
617
|
#
|
524
618
|
# </note>
|
525
619
|
#
|
@@ -529,15 +623,25 @@ module Aws::STS
|
|
529
623
|
#
|
530
624
|
# @option params [Integer] :duration_seconds
|
531
625
|
# The duration, in seconds, of the role session. The value specified can
|
532
|
-
#
|
533
|
-
#
|
534
|
-
#
|
535
|
-
#
|
536
|
-
#
|
537
|
-
#
|
538
|
-
#
|
539
|
-
#
|
540
|
-
#
|
626
|
+
# range from 900 seconds (15 minutes) up to the maximum session duration
|
627
|
+
# set for the role. The maximum session duration setting can have a
|
628
|
+
# value from 1 hour to 12 hours. If you specify a value higher than this
|
629
|
+
# setting or the administrator setting (whichever is lower), the
|
630
|
+
# operation fails. For example, if you specify a session duration of 12
|
631
|
+
# hours, but your administrator set the maximum session duration to 6
|
632
|
+
# hours, your operation fails.
|
633
|
+
#
|
634
|
+
# Role chaining limits your Amazon Web Services CLI or Amazon Web
|
635
|
+
# Services API role session to a maximum of one hour. When you use the
|
636
|
+
# `AssumeRole` API operation to assume a role, you can specify the
|
637
|
+
# duration of your role session with the `DurationSeconds` parameter.
|
638
|
+
# You can specify a parameter value of up to 43200 seconds (12 hours),
|
639
|
+
# depending on the maximum session duration setting for your role.
|
640
|
+
# However, if you assume a role using role chaining and provide a
|
641
|
+
# `DurationSeconds` parameter value greater than one hour, the operation
|
642
|
+
# fails. To learn how to view the maximum value for your role, see [View
|
643
|
+
# the Maximum Session Duration Setting for a Role][1] in the *IAM User
|
644
|
+
# Guide*.
|
541
645
|
#
|
542
646
|
# By default, the value is set to `3600` seconds.
|
543
647
|
#
|
@@ -546,8 +650,8 @@ module Aws::STS
|
|
546
650
|
# The request to the federation endpoint for a console sign-in token
|
547
651
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
548
652
|
# of the console session. For more information, see [Creating a URL that
|
549
|
-
# Enables Federated Users to Access the
|
550
|
-
# *IAM User Guide*.
|
653
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
654
|
+
# Console][2] in the *IAM User Guide*.
|
551
655
|
#
|
552
656
|
# </note>
|
553
657
|
#
|
@@ -559,20 +663,20 @@ module Aws::STS
|
|
559
663
|
# @option params [Array<Types::Tag>] :tags
|
560
664
|
# A list of session tags that you want to pass. Each session tag
|
561
665
|
# consists of a key name and an associated value. For more information
|
562
|
-
# about session tags, see [Tagging STS Sessions][1]
|
563
|
-
# Guide*.
|
666
|
+
# about session tags, see [Tagging Amazon Web Services STS Sessions][1]
|
667
|
+
# in the *IAM User Guide*.
|
564
668
|
#
|
565
669
|
# This parameter is optional. You can pass up to 50 session tags. The
|
566
670
|
# plaintext session tag keys can’t exceed 128 characters, and the values
|
567
671
|
# can’t exceed 256 characters. For these and additional limits, see [IAM
|
568
672
|
# and STS Character Limits][2] in the *IAM User Guide*.
|
569
673
|
#
|
570
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
571
|
-
#
|
572
|
-
# separate limit. Your request can fail for this limit
|
573
|
-
# plaintext meets the other requirements. The
|
574
|
-
# response element indicates by percentage how close
|
575
|
-
# tags for your request are to the upper size limit.
|
674
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
675
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
676
|
+
# format that has a separate limit. Your request can fail for this limit
|
677
|
+
# even if your plaintext meets the other requirements. The
|
678
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
679
|
+
# the policies and tags for your request are to the upper size limit.
|
576
680
|
#
|
577
681
|
# </note>
|
578
682
|
#
|
@@ -598,7 +702,7 @@ module Aws::STS
|
|
598
702
|
#
|
599
703
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
600
704
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
601
|
-
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
705
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs
|
602
706
|
#
|
603
707
|
# @option params [Array<String>] :transitive_tag_keys
|
604
708
|
# A list of keys for session tags that you want to set as transitive. If
|
@@ -687,6 +791,17 @@ module Aws::STS
|
|
687
791
|
#
|
688
792
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
689
793
|
#
|
794
|
+
# @option params [Array<Types::ProvidedContext>] :provided_contexts
|
795
|
+
# A list of previously acquired trusted context assertions in the format
|
796
|
+
# of a JSON array. The trusted context assertion is signed and encrypted
|
797
|
+
# by Amazon Web Services STS.
|
798
|
+
#
|
799
|
+
# The following is an example of a `ProvidedContext` value that includes
|
800
|
+
# a single trusted context assertion and the ARN of the context provider
|
801
|
+
# from which the trusted context assertion was generated.
|
802
|
+
#
|
803
|
+
# `[\{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"\}]`
|
804
|
+
#
|
690
805
|
# @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
691
806
|
#
|
692
807
|
# * {Types::AssumeRoleResponse#credentials #credentials} => Types::Credentials
|
@@ -747,7 +862,7 @@ module Aws::STS
|
|
747
862
|
# arn: "arnType",
|
748
863
|
# },
|
749
864
|
# ],
|
750
|
-
# policy: "
|
865
|
+
# policy: "unrestrictedSessionPolicyDocumentType",
|
751
866
|
# duration_seconds: 1,
|
752
867
|
# tags: [
|
753
868
|
# {
|
@@ -760,6 +875,12 @@ module Aws::STS
|
|
760
875
|
# serial_number: "serialNumberType",
|
761
876
|
# token_code: "tokenCodeType",
|
762
877
|
# source_identity: "sourceIdentityType",
|
878
|
+
# provided_contexts: [
|
879
|
+
# {
|
880
|
+
# provider_arn: "arnType",
|
881
|
+
# context_assertion: "contextAssertionType",
|
882
|
+
# },
|
883
|
+
# ],
|
763
884
|
# })
|
764
885
|
#
|
765
886
|
# @example Response structure
|
@@ -789,8 +910,8 @@ module Aws::STS
|
|
789
910
|
# user-specific credentials or configuration. For a comparison of
|
790
911
|
# `AssumeRoleWithSAML` with the other API operations that produce
|
791
912
|
# temporary credentials, see [Requesting Temporary Security
|
792
|
-
# Credentials][1] and [Comparing the
|
793
|
-
# User Guide*.
|
913
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
914
|
+
# operations][2] in the *IAM User Guide*.
|
794
915
|
#
|
795
916
|
# The temporary security credentials returned by this operation consist
|
796
917
|
# of an access key ID, a secret access key, and a security token.
|
@@ -835,18 +956,18 @@ module Aws::STS
|
|
835
956
|
#
|
836
957
|
# (Optional) You can pass inline or managed [session policies][6] to
|
837
958
|
# this operation. You can pass a single JSON policy document to use as
|
838
|
-
# an inline session policy. You can also specify up to 10 managed
|
839
|
-
#
|
840
|
-
# use for both inline and managed session policies
|
841
|
-
# characters. Passing policies to this operation
|
842
|
-
# credentials. The resulting session's
|
843
|
-
# of the role's identity-based policy
|
844
|
-
# use the role's temporary
|
845
|
-
# Services API calls to access
|
846
|
-
# role. You cannot use session
|
847
|
-
#
|
848
|
-
#
|
849
|
-
# User Guide*.
|
959
|
+
# an inline session policy. You can also specify up to 10 managed policy
|
960
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
961
|
+
# plaintext that you use for both inline and managed session policies
|
962
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
963
|
+
# returns new temporary credentials. The resulting session's
|
964
|
+
# permissions are the intersection of the role's identity-based policy
|
965
|
+
# and the session policies. You can use the role's temporary
|
966
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
967
|
+
# resources in the account that owns the role. You cannot use session
|
968
|
+
# policies to grant more permissions than those allowed by the
|
969
|
+
# identity-based policy of the role that is being assumed. For more
|
970
|
+
# information, see [Session Policies][6] in the *IAM User Guide*.
|
850
971
|
#
|
851
972
|
# Calling `AssumeRoleWithSAML` does not require the use of Amazon Web
|
852
973
|
# Services security credentials. The identity of the caller is validated
|
@@ -872,12 +993,12 @@ module Aws::STS
|
|
872
993
|
# characters. For these and additional limits, see [IAM and STS
|
873
994
|
# Character Limits][8] in the *IAM User Guide*.
|
874
995
|
#
|
875
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
876
|
-
#
|
877
|
-
# separate limit. Your request can fail for this limit
|
878
|
-
# plaintext meets the other requirements. The
|
879
|
-
# response element indicates by percentage how close
|
880
|
-
# tags for your request are to the upper size limit.
|
996
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
997
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
998
|
+
# format that has a separate limit. Your request can fail for this limit
|
999
|
+
# even if your plaintext meets the other requirements. The
|
1000
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1001
|
+
# the policies and tags for your request are to the upper size limit.
|
881
1002
|
#
|
882
1003
|
# </note>
|
883
1004
|
#
|
@@ -963,12 +1084,12 @@ module Aws::STS
|
|
963
1084
|
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
964
1085
|
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
965
1086
|
#
|
966
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
967
|
-
#
|
968
|
-
# separate limit. Your request can fail for this limit
|
969
|
-
# plaintext meets the other requirements. The
|
970
|
-
# response element indicates by percentage how close
|
971
|
-
# tags for your request are to the upper size limit.
|
1087
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1088
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1089
|
+
# format that has a separate limit. Your request can fail for this limit
|
1090
|
+
# even if your plaintext meets the other requirements. The
|
1091
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1092
|
+
# the policies and tags for your request are to the upper size limit.
|
972
1093
|
#
|
973
1094
|
# </note>
|
974
1095
|
#
|
@@ -1008,12 +1129,12 @@ module Aws::STS
|
|
1008
1129
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1009
1130
|
# characters.
|
1010
1131
|
#
|
1011
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1012
|
-
#
|
1013
|
-
# separate limit. Your request can fail for this limit
|
1014
|
-
# plaintext meets the other requirements. The
|
1015
|
-
# response element indicates by percentage how close
|
1016
|
-
# tags for your request are to the upper size limit.
|
1132
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1133
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1134
|
+
# format that has a separate limit. Your request can fail for this limit
|
1135
|
+
# even if your plaintext meets the other requirements. The
|
1136
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1137
|
+
# the policies and tags for your request are to the upper size limit.
|
1017
1138
|
#
|
1018
1139
|
# </note>
|
1019
1140
|
#
|
@@ -1042,8 +1163,8 @@ module Aws::STS
|
|
1042
1163
|
# The request to the federation endpoint for a console sign-in token
|
1043
1164
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
1044
1165
|
# of the console session. For more information, see [Creating a URL that
|
1045
|
-
# Enables Federated Users to Access the
|
1046
|
-
# *IAM User Guide*.
|
1166
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
1167
|
+
# Console][2] in the *IAM User Guide*.
|
1047
1168
|
#
|
1048
1169
|
# </note>
|
1049
1170
|
#
|
@@ -1136,20 +1257,19 @@ module Aws::STS
|
|
1136
1257
|
|
1137
1258
|
# Returns a set of temporary security credentials for users who have
|
1138
1259
|
# been authenticated in a mobile or web application with a web identity
|
1139
|
-
# provider. Example providers include
|
1140
|
-
# Facebook,
|
1260
|
+
# provider. Example providers include the OAuth 2.0 providers Login with
|
1261
|
+
# Amazon and Facebook, or any OpenID Connect-compatible identity
|
1262
|
+
# provider such as Google or [Amazon Cognito federated identities][1].
|
1141
1263
|
#
|
1142
1264
|
# <note markdown="1"> For mobile applications, we recommend that you use Amazon Cognito. You
|
1143
1265
|
# can use Amazon Cognito with the [Amazon Web Services SDK for iOS
|
1144
|
-
# Developer Guide][
|
1145
|
-
# Developer Guide][
|
1266
|
+
# Developer Guide][2] and the [Amazon Web Services SDK for Android
|
1267
|
+
# Developer Guide][3] to uniquely identify a user. You can also supply
|
1146
1268
|
# the user with a consistent identity throughout the lifetime of an
|
1147
1269
|
# application.
|
1148
1270
|
#
|
1149
|
-
# To learn more about Amazon Cognito, see [Amazon Cognito
|
1150
|
-
# in *Amazon
|
1151
|
-
# Cognito Overview][4] in the *Amazon Web Services SDK for iOS Developer
|
1152
|
-
# Guide*.
|
1271
|
+
# To learn more about Amazon Cognito, see [Amazon Cognito identity
|
1272
|
+
# pools][1] in *Amazon Cognito Developer Guide*.
|
1153
1273
|
#
|
1154
1274
|
# </note>
|
1155
1275
|
#
|
@@ -1163,8 +1283,8 @@ module Aws::STS
|
|
1163
1283
|
# a token from the web identity provider. For a comparison of
|
1164
1284
|
# `AssumeRoleWithWebIdentity` with the other API operations that produce
|
1165
1285
|
# temporary credentials, see [Requesting Temporary Security
|
1166
|
-
# Credentials][
|
1167
|
-
# User Guide*.
|
1286
|
+
# Credentials][4] and [Comparing the Amazon Web Services STS API
|
1287
|
+
# operations][5] in the *IAM User Guide*.
|
1168
1288
|
#
|
1169
1289
|
# The temporary security credentials returned by this API consist of an
|
1170
1290
|
# access key ID, a secret access key, and a security token. Applications
|
@@ -1180,11 +1300,11 @@ module Aws::STS
|
|
1180
1300
|
# to the maximum session duration setting for the role. This setting can
|
1181
1301
|
# have a value from 1 hour to 12 hours. To learn how to view the maximum
|
1182
1302
|
# value for your role, see [View the Maximum Session Duration Setting
|
1183
|
-
# for a Role][
|
1303
|
+
# for a Role][6] in the *IAM User Guide*. The maximum session duration
|
1184
1304
|
# limit applies when you use the `AssumeRole*` API operations or the
|
1185
1305
|
# `assume-role*` CLI commands. However the limit does not apply when you
|
1186
1306
|
# use those operations to create a console URL. For more information,
|
1187
|
-
# see [Using IAM Roles][
|
1307
|
+
# see [Using IAM Roles][7] in the *IAM User Guide*.
|
1188
1308
|
#
|
1189
1309
|
# **Permissions**
|
1190
1310
|
#
|
@@ -1193,39 +1313,39 @@ module Aws::STS
|
|
1193
1313
|
# Amazon Web Services service with the following exception: you cannot
|
1194
1314
|
# call the STS `GetFederationToken` or `GetSessionToken` API operations.
|
1195
1315
|
#
|
1196
|
-
# (Optional) You can pass inline or managed [session policies][
|
1316
|
+
# (Optional) You can pass inline or managed [session policies][8] to
|
1197
1317
|
# this operation. You can pass a single JSON policy document to use as
|
1198
|
-
# an inline session policy. You can also specify up to 10 managed
|
1199
|
-
#
|
1200
|
-
# use for both inline and managed session policies
|
1201
|
-
# characters. Passing policies to this operation
|
1202
|
-
# credentials. The resulting session's
|
1203
|
-
# of the role's identity-based policy
|
1204
|
-
# use the role's temporary
|
1205
|
-
# Services API calls to access
|
1206
|
-
# role. You cannot use session
|
1207
|
-
#
|
1208
|
-
#
|
1209
|
-
# User Guide*.
|
1318
|
+
# an inline session policy. You can also specify up to 10 managed policy
|
1319
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
1320
|
+
# plaintext that you use for both inline and managed session policies
|
1321
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
1322
|
+
# returns new temporary credentials. The resulting session's
|
1323
|
+
# permissions are the intersection of the role's identity-based policy
|
1324
|
+
# and the session policies. You can use the role's temporary
|
1325
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
1326
|
+
# resources in the account that owns the role. You cannot use session
|
1327
|
+
# policies to grant more permissions than those allowed by the
|
1328
|
+
# identity-based policy of the role that is being assumed. For more
|
1329
|
+
# information, see [Session Policies][8] in the *IAM User Guide*.
|
1210
1330
|
#
|
1211
1331
|
# **Tags**
|
1212
1332
|
#
|
1213
1333
|
# (Optional) You can configure your IdP to pass attributes into your web
|
1214
1334
|
# identity token as session tags. Each session tag consists of a key
|
1215
1335
|
# name and an associated value. For more information about session tags,
|
1216
|
-
# see [Passing Session Tags in STS][
|
1336
|
+
# see [Passing Session Tags in STS][9] in the *IAM User Guide*.
|
1217
1337
|
#
|
1218
1338
|
# You can pass up to 50 session tags. The plaintext session tag keys
|
1219
1339
|
# can’t exceed 128 characters and the values can’t exceed 256
|
1220
1340
|
# characters. For these and additional limits, see [IAM and STS
|
1221
|
-
# Character Limits][
|
1341
|
+
# Character Limits][10] in the *IAM User Guide*.
|
1222
1342
|
#
|
1223
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1224
|
-
#
|
1225
|
-
# separate limit. Your request can fail for this limit
|
1226
|
-
# plaintext meets the other requirements. The
|
1227
|
-
# response element indicates by percentage how close
|
1228
|
-
# tags for your request are to the upper size limit.
|
1343
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1344
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1345
|
+
# format that has a separate limit. Your request can fail for this limit
|
1346
|
+
# even if your plaintext meets the other requirements. The
|
1347
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1348
|
+
# the policies and tags for your request are to the upper size limit.
|
1229
1349
|
#
|
1230
1350
|
# </note>
|
1231
1351
|
#
|
@@ -1236,12 +1356,12 @@ module Aws::STS
|
|
1236
1356
|
# An administrator must grant you the permissions necessary to pass
|
1237
1357
|
# session tags. The administrator can also create granular permissions
|
1238
1358
|
# to allow you to pass only specific session tags. For more information,
|
1239
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
1359
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][11] in
|
1240
1360
|
# the *IAM User Guide*.
|
1241
1361
|
#
|
1242
1362
|
# You can set the session tags as transitive. Transitive tags persist
|
1243
1363
|
# during role chaining. For more information, see [Chaining Roles with
|
1244
|
-
# Session Tags][
|
1364
|
+
# Session Tags][12] in the *IAM User Guide*.
|
1245
1365
|
#
|
1246
1366
|
# **Identities**
|
1247
1367
|
#
|
@@ -1253,54 +1373,53 @@ module Aws::STS
|
|
1253
1373
|
# specified in the role's trust policy.
|
1254
1374
|
#
|
1255
1375
|
# Calling `AssumeRoleWithWebIdentity` can result in an entry in your
|
1256
|
-
# CloudTrail logs. The entry includes the [Subject][
|
1376
|
+
# CloudTrail logs. The entry includes the [Subject][13] of the provided
|
1257
1377
|
# web identity token. We recommend that you avoid using any personally
|
1258
1378
|
# identifiable information (PII) in this field. For example, you could
|
1259
1379
|
# instead use a GUID or a pairwise identifier, as [suggested in the OIDC
|
1260
|
-
# specification][
|
1380
|
+
# specification][14].
|
1261
1381
|
#
|
1262
1382
|
# For more information about how to use web identity federation and the
|
1263
1383
|
# `AssumeRoleWithWebIdentity` API, see the following resources:
|
1264
1384
|
#
|
1265
|
-
# * [Using Web Identity Federation API Operations for Mobile Apps][
|
1266
|
-
# and [Federation Through a Web-based Identity Provider][
|
1385
|
+
# * [Using Web Identity Federation API Operations for Mobile Apps][15]
|
1386
|
+
# and [Federation Through a Web-based Identity Provider][16].
|
1267
1387
|
#
|
1268
|
-
# * [ Web Identity Federation Playground][
|
1388
|
+
# * [ Web Identity Federation Playground][17]. Walk through the process
|
1269
1389
|
# of authenticating through Login with Amazon, Facebook, or Google,
|
1270
1390
|
# getting temporary security credentials, and then using those
|
1271
1391
|
# credentials to make a request to Amazon Web Services.
|
1272
1392
|
#
|
1273
|
-
# * [Amazon Web Services SDK for iOS Developer Guide][
|
1274
|
-
# Services SDK for Android Developer Guide][
|
1393
|
+
# * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
|
1394
|
+
# Services SDK for Android Developer Guide][3]. These toolkits contain
|
1275
1395
|
# sample apps that show how to invoke the identity providers. The
|
1276
1396
|
# toolkits then show how to use the information from these providers
|
1277
1397
|
# to get and use temporary security credentials.
|
1278
1398
|
#
|
1279
|
-
# * [Web Identity Federation with Mobile Applications][
|
1399
|
+
# * [Web Identity Federation with Mobile Applications][18]. This article
|
1280
1400
|
# discusses web identity federation and shows an example of how to use
|
1281
1401
|
# web identity federation to get access to content in Amazon S3.
|
1282
1402
|
#
|
1283
1403
|
#
|
1284
1404
|
#
|
1285
|
-
# [1]:
|
1286
|
-
# [2]: http://aws.amazon.com/
|
1287
|
-
# [3]:
|
1288
|
-
# [4]: https://docs.aws.amazon.com/
|
1289
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1290
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1291
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1292
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1293
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1294
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1295
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1296
|
-
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1297
|
-
# [13]:
|
1298
|
-
# [14]: http://openid.net/specs/openid-connect-core-1_0.html#
|
1299
|
-
# [15]:
|
1300
|
-
# [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1301
|
-
# [17]: https://
|
1302
|
-
# [18]:
|
1303
|
-
# [19]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
1405
|
+
# [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
1406
|
+
# [2]: http://aws.amazon.com/sdkforios/
|
1407
|
+
# [3]: http://aws.amazon.com/sdkforandroid/
|
1408
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1409
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
1410
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
1411
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1412
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
1413
|
+
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
1414
|
+
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
1415
|
+
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
1416
|
+
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
1417
|
+
# [13]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
|
1418
|
+
# [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
1419
|
+
# [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
1420
|
+
# [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
|
1304
1423
|
#
|
1305
1424
|
# @option params [required, String] :role_arn
|
1306
1425
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
@@ -1324,16 +1443,17 @@ module Aws::STS
|
|
1324
1443
|
# by the identity provider. Your application must get this token by
|
1325
1444
|
# authenticating the user who is using your application with a web
|
1326
1445
|
# identity provider before the application makes an
|
1327
|
-
# `AssumeRoleWithWebIdentity` call.
|
1446
|
+
# `AssumeRoleWithWebIdentity` call. Only tokens with RSA algorithms
|
1447
|
+
# (RS256) are supported.
|
1328
1448
|
#
|
1329
1449
|
# @option params [String] :provider_id
|
1330
|
-
# The fully qualified host component of the domain name of the
|
1331
|
-
# provider.
|
1450
|
+
# The fully qualified host component of the domain name of the OAuth 2.0
|
1451
|
+
# identity provider. Do not specify this value for an OpenID Connect
|
1452
|
+
# identity provider.
|
1332
1453
|
#
|
1333
|
-
#
|
1334
|
-
#
|
1335
|
-
#
|
1336
|
-
# schemes and port numbers.
|
1454
|
+
# Currently `www.amazon.com` and `graph.facebook.com` are the only
|
1455
|
+
# supported identity providers for OAuth 2.0 access tokens. Do not
|
1456
|
+
# include URL schemes and port numbers.
|
1337
1457
|
#
|
1338
1458
|
# Do not specify this value for OpenID Connect ID tokens.
|
1339
1459
|
#
|
@@ -1348,12 +1468,12 @@ module Aws::STS
|
|
1348
1468
|
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
1349
1469
|
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
1350
1470
|
#
|
1351
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1352
|
-
#
|
1353
|
-
# separate limit. Your request can fail for this limit
|
1354
|
-
# plaintext meets the other requirements. The
|
1355
|
-
# response element indicates by percentage how close
|
1356
|
-
# tags for your request are to the upper size limit.
|
1471
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1472
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1473
|
+
# format that has a separate limit. Your request can fail for this limit
|
1474
|
+
# even if your plaintext meets the other requirements. The
|
1475
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1476
|
+
# the policies and tags for your request are to the upper size limit.
|
1357
1477
|
#
|
1358
1478
|
# </note>
|
1359
1479
|
#
|
@@ -1393,12 +1513,12 @@ module Aws::STS
|
|
1393
1513
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1394
1514
|
# characters.
|
1395
1515
|
#
|
1396
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1397
|
-
#
|
1398
|
-
# separate limit. Your request can fail for this limit
|
1399
|
-
# plaintext meets the other requirements. The
|
1400
|
-
# response element indicates by percentage how close
|
1401
|
-
# tags for your request are to the upper size limit.
|
1516
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1517
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1518
|
+
# format that has a separate limit. Your request can fail for this limit
|
1519
|
+
# even if your plaintext meets the other requirements. The
|
1520
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1521
|
+
# the policies and tags for your request are to the upper size limit.
|
1402
1522
|
#
|
1403
1523
|
# </note>
|
1404
1524
|
#
|
@@ -1424,8 +1544,8 @@ module Aws::STS
|
|
1424
1544
|
# The request to the federation endpoint for a console sign-in token
|
1425
1545
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
1426
1546
|
# of the console session. For more information, see [Creating a URL that
|
1427
|
-
# Enables Federated Users to Access the
|
1428
|
-
# *IAM User Guide*.
|
1547
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
1548
|
+
# Console][2] in the *IAM User Guide*.
|
1429
1549
|
#
|
1430
1550
|
# </note>
|
1431
1551
|
#
|
@@ -1531,17 +1651,17 @@ module Aws::STS
|
|
1531
1651
|
# </note>
|
1532
1652
|
#
|
1533
1653
|
# The message is encoded because the details of the authorization status
|
1534
|
-
# can
|
1654
|
+
# can contain privileged information that the user who requested the
|
1535
1655
|
# operation should not see. To decode an authorization status message, a
|
1536
|
-
# user must be granted permissions
|
1537
|
-
# `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
|
1656
|
+
# user must be granted permissions through an IAM [policy][1] to request
|
1657
|
+
# the `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
|
1538
1658
|
# action.
|
1539
1659
|
#
|
1540
1660
|
# The decoded message includes the following type of information:
|
1541
1661
|
#
|
1542
1662
|
# * Whether the request was denied due to an explicit deny or due to the
|
1543
1663
|
# absence of an explicit allow. For more information, see [Determining
|
1544
|
-
# Whether a Request is Allowed or Denied][
|
1664
|
+
# Whether a Request is Allowed or Denied][2] in the *IAM User Guide*.
|
1545
1665
|
#
|
1546
1666
|
# * The principal who made the request.
|
1547
1667
|
#
|
@@ -1553,7 +1673,8 @@ module Aws::STS
|
|
1553
1673
|
#
|
1554
1674
|
#
|
1555
1675
|
#
|
1556
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1676
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
1677
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
|
1557
1678
|
#
|
1558
1679
|
# @option params [required, String] :encoded_message
|
1559
1680
|
# The encoded message that was returned with the response.
|
@@ -1658,11 +1779,11 @@ module Aws::STS
|
|
1658
1779
|
# to call the operation.
|
1659
1780
|
#
|
1660
1781
|
# <note markdown="1"> No permissions are required to perform this operation. If an
|
1661
|
-
# administrator
|
1782
|
+
# administrator attaches a policy to your identity that explicitly
|
1662
1783
|
# denies access to the `sts:GetCallerIdentity` action, you can still
|
1663
1784
|
# perform this operation. Permissions are not required because the same
|
1664
|
-
# information is returned when
|
1665
|
-
#
|
1785
|
+
# information is returned when access is denied. To view an example
|
1786
|
+
# response, see [I Am Not Authorized to Perform:
|
1666
1787
|
# iam:DeleteVirtualMFADevice][1] in the *IAM User Guide*.
|
1667
1788
|
#
|
1668
1789
|
# </note>
|
@@ -1739,60 +1860,63 @@ module Aws::STS
|
|
1739
1860
|
end
|
1740
1861
|
|
1741
1862
|
# Returns a set of temporary security credentials (consisting of an
|
1742
|
-
# access key ID, a secret access key, and a security token) for a
|
1743
|
-
#
|
1744
|
-
#
|
1745
|
-
#
|
1746
|
-
#
|
1747
|
-
#
|
1748
|
-
#
|
1749
|
-
#
|
1750
|
-
#
|
1751
|
-
#
|
1752
|
-
#
|
1863
|
+
# access key ID, a secret access key, and a security token) for a user.
|
1864
|
+
# A typical use is in a proxy application that gets temporary security
|
1865
|
+
# credentials on behalf of distributed applications inside a corporate
|
1866
|
+
# network.
|
1867
|
+
#
|
1868
|
+
# You must call the `GetFederationToken` operation using the long-term
|
1869
|
+
# security credentials of an IAM user. As a result, this call is
|
1870
|
+
# appropriate in contexts where those credentials can be safeguarded,
|
1871
|
+
# usually in a server-based application. For a comparison of
|
1872
|
+
# `GetFederationToken` with the other API operations that produce
|
1873
|
+
# temporary credentials, see [Requesting Temporary Security
|
1874
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
1875
|
+
# operations][2] in the *IAM User Guide*.
|
1876
|
+
#
|
1877
|
+
# Although it is possible to call `GetFederationToken` using the
|
1878
|
+
# security credentials of an Amazon Web Services account root user
|
1879
|
+
# rather than an IAM user that you create for the purpose of a proxy
|
1880
|
+
# application, we do not recommend it. For more information, see
|
1881
|
+
# [Safeguard your root user credentials and don't use them for everyday
|
1882
|
+
# tasks][3] in the *IAM User Guide*.
|
1753
1883
|
#
|
1754
1884
|
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
1755
1885
|
# authenticate users using a web identity provider like Login with
|
1756
1886
|
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
1757
|
-
# provider. In this case, we recommend that you use [Amazon Cognito][
|
1887
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][4]
|
1758
1888
|
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
1759
|
-
# Through a Web-based Identity Provider][
|
1889
|
+
# Through a Web-based Identity Provider][5] in the *IAM User Guide*.
|
1760
1890
|
#
|
1761
1891
|
# </note>
|
1762
1892
|
#
|
1763
|
-
# You can also call `GetFederationToken` using the security credentials
|
1764
|
-
# of an Amazon Web Services account root user, but we do not recommend
|
1765
|
-
# it. Instead, we recommend that you create an IAM user for the purpose
|
1766
|
-
# of the proxy application. Then attach a policy to the IAM user that
|
1767
|
-
# limits federated users to only the actions and resources that they
|
1768
|
-
# need to access. For more information, see [IAM Best Practices][5] in
|
1769
|
-
# the *IAM User Guide*.
|
1770
|
-
#
|
1771
1893
|
# **Session duration**
|
1772
1894
|
#
|
1773
1895
|
# The temporary credentials are valid for the specified duration, from
|
1774
1896
|
# 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
|
1775
1897
|
# hours). The default session duration is 43,200 seconds (12 hours).
|
1776
|
-
# Temporary credentials
|
1777
|
-
#
|
1778
|
-
# (1 hour).
|
1898
|
+
# Temporary credentials obtained by using the root user credentials have
|
1899
|
+
# a maximum duration of 3,600 seconds (1 hour).
|
1779
1900
|
#
|
1780
1901
|
# **Permissions**
|
1781
1902
|
#
|
1782
1903
|
# You can use the temporary credentials created by `GetFederationToken`
|
1783
|
-
# in any Amazon Web Services service
|
1904
|
+
# in any Amazon Web Services service with the following exceptions:
|
1784
1905
|
#
|
1785
1906
|
# * You cannot call any IAM operations using the CLI or the Amazon Web
|
1786
|
-
# Services API.
|
1907
|
+
# Services API. This limitation does not apply to console sessions.
|
1787
1908
|
#
|
1788
1909
|
# * You cannot call any STS operations except `GetCallerIdentity`.
|
1789
1910
|
#
|
1911
|
+
# You can use temporary credentials for single sign-on (SSO) to the
|
1912
|
+
# console.
|
1913
|
+
#
|
1790
1914
|
# You must pass an inline or managed [session policy][6] to this
|
1791
1915
|
# operation. You can pass a single JSON policy document to use as an
|
1792
|
-
# inline session policy. You can also specify up to 10 managed
|
1793
|
-
# to use as managed session policies. The
|
1794
|
-
# both inline and managed session policies
|
1795
|
-
# characters.
|
1916
|
+
# inline session policy. You can also specify up to 10 managed policy
|
1917
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
1918
|
+
# plaintext that you use for both inline and managed session policies
|
1919
|
+
# can't exceed 2,048 characters.
|
1796
1920
|
#
|
1797
1921
|
# Though the session policy parameters are optional, if you do not pass
|
1798
1922
|
# a policy, then the resulting federated user session has no
|
@@ -1822,71 +1946,12 @@ module Aws::STS
|
|
1822
1946
|
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
1823
1947
|
# authenticate users using a web identity provider like Login with
|
1824
1948
|
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
1825
|
-
# provider. In this case, we recommend that you use [Amazon Cognito][
|
1949
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][4]
|
1826
1950
|
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
1827
|
-
# Through a Web-based Identity Provider][
|
1951
|
+
# Through a Web-based Identity Provider][5] in the *IAM User Guide*.
|
1828
1952
|
#
|
1829
1953
|
# </note>
|
1830
1954
|
#
|
1831
|
-
# You can also call `GetFederationToken` using the security credentials
|
1832
|
-
# of an Amazon Web Services account root user, but we do not recommend
|
1833
|
-
# it. Instead, we recommend that you create an IAM user for the purpose
|
1834
|
-
# of the proxy application. Then attach a policy to the IAM user that
|
1835
|
-
# limits federated users to only the actions and resources that they
|
1836
|
-
# need to access. For more information, see [IAM Best Practices][5] in
|
1837
|
-
# the *IAM User Guide*.
|
1838
|
-
#
|
1839
|
-
# **Session duration**
|
1840
|
-
#
|
1841
|
-
# The temporary credentials are valid for the specified duration, from
|
1842
|
-
# 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
|
1843
|
-
# hours). The default session duration is 43,200 seconds (12 hours).
|
1844
|
-
# Temporary credentials that are obtained by using Amazon Web Services
|
1845
|
-
# account root user credentials have a maximum duration of 3,600 seconds
|
1846
|
-
# (1 hour).
|
1847
|
-
#
|
1848
|
-
# **Permissions**
|
1849
|
-
#
|
1850
|
-
# You can use the temporary credentials created by `GetFederationToken`
|
1851
|
-
# in any Amazon Web Services service except the following:
|
1852
|
-
#
|
1853
|
-
# * You cannot call any IAM operations using the CLI or the Amazon Web
|
1854
|
-
# Services API.
|
1855
|
-
#
|
1856
|
-
# * You cannot call any STS operations except `GetCallerIdentity`.
|
1857
|
-
#
|
1858
|
-
# You must pass an inline or managed [session policy][6] to this
|
1859
|
-
# operation. You can pass a single JSON policy document to use as an
|
1860
|
-
# inline session policy. You can also specify up to 10 managed policies
|
1861
|
-
# to use as managed session policies. The plain text that you use for
|
1862
|
-
# both inline and managed session policies can't exceed 2,048
|
1863
|
-
# characters.
|
1864
|
-
#
|
1865
|
-
# Though the session policy parameters are optional, if you do not pass
|
1866
|
-
# a policy, then the resulting federated user session has no
|
1867
|
-
# permissions. When you pass session policies, the session permissions
|
1868
|
-
# are the intersection of the IAM user policies and the session policies
|
1869
|
-
# that you pass. This gives you a way to further restrict the
|
1870
|
-
# permissions for a federated user. You cannot use session policies to
|
1871
|
-
# grant more permissions than those that are defined in the permissions
|
1872
|
-
# policy of the IAM user. For more information, see [Session
|
1873
|
-
# Policies][6] in the *IAM User Guide*. For information about using
|
1874
|
-
# `GetFederationToken` to create temporary security credentials, see
|
1875
|
-
# [GetFederationToken—Federation Through a Custom Identity Broker][7].
|
1876
|
-
#
|
1877
|
-
# You can use the credentials to access a resource that has a
|
1878
|
-
# resource-based policy. If that policy specifically references the
|
1879
|
-
# federated user session in the `Principal` element of the policy, the
|
1880
|
-
# session has the permissions allowed by the policy. These permissions
|
1881
|
-
# are granted in addition to the permissions granted by the session
|
1882
|
-
# policies.
|
1883
|
-
#
|
1884
|
-
# **Tags**
|
1885
|
-
#
|
1886
|
-
# (Optional) You can pass tag key-value pairs to your session. These are
|
1887
|
-
# called session tags. For more information about session tags, see
|
1888
|
-
# [Passing Session Tags in STS][8] in the *IAM User Guide*.
|
1889
|
-
#
|
1890
1955
|
# An administrator must grant you the permissions necessary to pass
|
1891
1956
|
# session tags. The administrator can also create granular permissions
|
1892
1957
|
# to allow you to pass only specific session tags. For more information,
|
@@ -1905,9 +1970,9 @@ module Aws::STS
|
|
1905
1970
|
#
|
1906
1971
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1907
1972
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
1908
|
-
# [3]:
|
1909
|
-
# [4]:
|
1910
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1973
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
1974
|
+
# [4]: http://aws.amazon.com/cognito/
|
1975
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
1911
1976
|
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
1912
1977
|
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
|
1913
1978
|
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
@@ -1930,8 +1995,8 @@ module Aws::STS
|
|
1930
1995
|
#
|
1931
1996
|
# You must pass an inline or managed [session policy][1] to this
|
1932
1997
|
# operation. You can pass a single JSON policy document to use as an
|
1933
|
-
# inline session policy. You can also specify up to 10 managed
|
1934
|
-
# to use as managed session policies.
|
1998
|
+
# inline session policy. You can also specify up to 10 managed policy
|
1999
|
+
# Amazon Resource Names (ARNs) to use as managed session policies.
|
1935
2000
|
#
|
1936
2001
|
# This parameter is optional. However, if you do not pass any session
|
1937
2002
|
# policies, then the resulting federated user session has no
|
@@ -1959,12 +2024,12 @@ module Aws::STS
|
|
1959
2024
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1960
2025
|
# characters.
|
1961
2026
|
#
|
1962
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1963
|
-
#
|
1964
|
-
# separate limit. Your request can fail for this limit
|
1965
|
-
# plaintext meets the other requirements. The
|
1966
|
-
# response element indicates by percentage how close
|
1967
|
-
# tags for your request are to the upper size limit.
|
2027
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
2028
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
2029
|
+
# format that has a separate limit. Your request can fail for this limit
|
2030
|
+
# even if your plaintext meets the other requirements. The
|
2031
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
2032
|
+
# the policies and tags for your request are to the upper size limit.
|
1968
2033
|
#
|
1969
2034
|
# </note>
|
1970
2035
|
#
|
@@ -1979,13 +2044,13 @@ module Aws::STS
|
|
1979
2044
|
#
|
1980
2045
|
# You must pass an inline or managed [session policy][1] to this
|
1981
2046
|
# operation. You can pass a single JSON policy document to use as an
|
1982
|
-
# inline session policy. You can also specify up to 10 managed
|
1983
|
-
# to use as managed session policies. The
|
1984
|
-
# both inline and managed session policies
|
1985
|
-
# characters. You can provide up to 10 managed
|
1986
|
-
# information about ARNs, see [Amazon Resource
|
1987
|
-
# Web Services Service Namespaces][2] in the
|
1988
|
-
# Reference.
|
2047
|
+
# inline session policy. You can also specify up to 10 managed policy
|
2048
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
2049
|
+
# plaintext that you use for both inline and managed session policies
|
2050
|
+
# can't exceed 2,048 characters. You can provide up to 10 managed
|
2051
|
+
# policy ARNs. For more information about ARNs, see [Amazon Resource
|
2052
|
+
# Names (ARNs) and Amazon Web Services Service Namespaces][2] in the
|
2053
|
+
# Amazon Web Services General Reference.
|
1989
2054
|
#
|
1990
2055
|
# This parameter is optional. However, if you do not pass any session
|
1991
2056
|
# policies, then the resulting federated user session has no
|
@@ -2006,12 +2071,12 @@ module Aws::STS
|
|
2006
2071
|
# are granted in addition to the permissions that are granted by the
|
2007
2072
|
# session policies.
|
2008
2073
|
#
|
2009
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
2010
|
-
#
|
2011
|
-
# separate limit. Your request can fail for this limit
|
2012
|
-
# plaintext meets the other requirements. The
|
2013
|
-
# response element indicates by percentage how close
|
2014
|
-
# tags for your request are to the upper size limit.
|
2074
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
2075
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
2076
|
+
# format that has a separate limit. Your request can fail for this limit
|
2077
|
+
# even if your plaintext meets the other requirements. The
|
2078
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
2079
|
+
# the policies and tags for your request are to the upper size limit.
|
2015
2080
|
#
|
2016
2081
|
# </note>
|
2017
2082
|
#
|
@@ -2024,10 +2089,10 @@ module Aws::STS
|
|
2024
2089
|
# The duration, in seconds, that the session should last. Acceptable
|
2025
2090
|
# durations for federation sessions range from 900 seconds (15 minutes)
|
2026
2091
|
# to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
|
2027
|
-
# default. Sessions obtained using
|
2028
|
-
#
|
2029
|
-
#
|
2030
|
-
#
|
2092
|
+
# default. Sessions obtained using root user credentials are restricted
|
2093
|
+
# to a maximum of 3,600 seconds (one hour). If the specified duration is
|
2094
|
+
# longer than one hour, the session obtained by using root user
|
2095
|
+
# credentials defaults to one hour.
|
2031
2096
|
#
|
2032
2097
|
# @option params [Array<Types::Tag>] :tags
|
2033
2098
|
# A list of session tags. Each session tag consists of a key name and an
|
@@ -2039,12 +2104,12 @@ module Aws::STS
|
|
2039
2104
|
# can’t exceed 256 characters. For these and additional limits, see [IAM
|
2040
2105
|
# and STS Character Limits][2] in the *IAM User Guide*.
|
2041
2106
|
#
|
2042
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
2043
|
-
#
|
2044
|
-
# separate limit. Your request can fail for this limit
|
2045
|
-
# plaintext meets the other requirements. The
|
2046
|
-
# response element indicates by percentage how close
|
2047
|
-
# tags for your request are to the upper size limit.
|
2107
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
2108
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
2109
|
+
# format that has a separate limit. Your request can fail for this limit
|
2110
|
+
# even if your plaintext meets the other requirements. The
|
2111
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
2112
|
+
# the policies and tags for your request are to the upper size limit.
|
2048
2113
|
#
|
2049
2114
|
# </note>
|
2050
2115
|
#
|
@@ -2147,27 +2212,36 @@ module Aws::STS
|
|
2147
2212
|
# secret access key, and a security token. Typically, you use
|
2148
2213
|
# `GetSessionToken` if you want to use MFA to protect programmatic calls
|
2149
2214
|
# to specific Amazon Web Services API operations like Amazon EC2
|
2150
|
-
# `StopInstances`.
|
2151
|
-
#
|
2152
|
-
# MFA
|
2153
|
-
#
|
2154
|
-
#
|
2155
|
-
#
|
2156
|
-
#
|
2157
|
-
#
|
2158
|
-
#
|
2159
|
-
#
|
2215
|
+
# `StopInstances`.
|
2216
|
+
#
|
2217
|
+
# MFA-enabled IAM users must call `GetSessionToken` and submit an MFA
|
2218
|
+
# code that is associated with their MFA device. Using the temporary
|
2219
|
+
# security credentials that the call returns, IAM users can then make
|
2220
|
+
# programmatic calls to API operations that require MFA authentication.
|
2221
|
+
# An incorrect MFA code causes the API to return an access denied error.
|
2222
|
+
# For a comparison of `GetSessionToken` with the other API operations
|
2223
|
+
# that produce temporary credentials, see [Requesting Temporary Security
|
2224
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
2225
|
+
# operations][2] in the *IAM User Guide*.
|
2226
|
+
#
|
2227
|
+
# <note markdown="1"> No permissions are required for users to perform this operation. The
|
2228
|
+
# purpose of the `sts:GetSessionToken` operation is to authenticate the
|
2229
|
+
# user using MFA. You cannot use policies to control authentication
|
2230
|
+
# operations. For more information, see [Permissions for
|
2231
|
+
# GetSessionToken][3] in the *IAM User Guide*.
|
2232
|
+
#
|
2233
|
+
# </note>
|
2160
2234
|
#
|
2161
2235
|
# **Session Duration**
|
2162
2236
|
#
|
2163
2237
|
# The `GetSessionToken` operation must be called by using the long-term
|
2164
|
-
# Amazon Web Services security credentials of
|
2165
|
-
#
|
2166
|
-
#
|
2167
|
-
#
|
2168
|
-
# (
|
2169
|
-
#
|
2170
|
-
#
|
2238
|
+
# Amazon Web Services security credentials of an IAM user. Credentials
|
2239
|
+
# that are created by IAM users are valid for the duration that you
|
2240
|
+
# specify. This duration can range from 900 seconds (15 minutes) up to a
|
2241
|
+
# maximum of 129,600 seconds (36 hours), with a default of 43,200
|
2242
|
+
# seconds (12 hours). Credentials based on account credentials can range
|
2243
|
+
# from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a
|
2244
|
+
# default of 1 hour.
|
2171
2245
|
#
|
2172
2246
|
# **Permissions**
|
2173
2247
|
#
|
@@ -2181,32 +2255,32 @@ module Aws::STS
|
|
2181
2255
|
# * You cannot call any STS API *except* `AssumeRole` or
|
2182
2256
|
# `GetCallerIdentity`.
|
2183
2257
|
#
|
2184
|
-
#
|
2185
|
-
#
|
2186
|
-
#
|
2187
|
-
#
|
2188
|
-
# with Amazon Web Services.
|
2258
|
+
# The credentials that `GetSessionToken` returns are based on
|
2259
|
+
# permissions associated with the IAM user whose credentials were used
|
2260
|
+
# to call the operation. The temporary credentials have the same
|
2261
|
+
# permissions as the IAM user.
|
2189
2262
|
#
|
2190
|
-
#
|
2263
|
+
# <note markdown="1"> Although it is possible to call `GetSessionToken` using the security
|
2264
|
+
# credentials of an Amazon Web Services account root user rather than an
|
2265
|
+
# IAM user, we do not recommend it. If `GetSessionToken` is called using
|
2266
|
+
# root user credentials, the temporary credentials have root user
|
2267
|
+
# permissions. For more information, see [Safeguard your root user
|
2268
|
+
# credentials and don't use them for everyday tasks][4] in the *IAM
|
2269
|
+
# User Guide*
|
2191
2270
|
#
|
2192
|
-
#
|
2193
|
-
# permissions associated with the user whose credentials were used to
|
2194
|
-
# call the operation. If `GetSessionToken` is called using Amazon Web
|
2195
|
-
# Services account root user credentials, the temporary credentials have
|
2196
|
-
# root user permissions. Similarly, if `GetSessionToken` is called using
|
2197
|
-
# the credentials of an IAM user, the temporary credentials have the
|
2198
|
-
# same permissions as the IAM user.
|
2271
|
+
# </note>
|
2199
2272
|
#
|
2200
2273
|
# For more information about using `GetSessionToken` to create temporary
|
2201
|
-
# credentials,
|
2202
|
-
# Environments][
|
2274
|
+
# credentials, see [Temporary Credentials for Users in Untrusted
|
2275
|
+
# Environments][5] in the *IAM User Guide*.
|
2203
2276
|
#
|
2204
2277
|
#
|
2205
2278
|
#
|
2206
2279
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
2207
2280
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
2208
|
-
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
2209
|
-
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
2281
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
|
2282
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
2283
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
|
2210
2284
|
#
|
2211
2285
|
# @option params [Integer] :duration_seconds
|
2212
2286
|
# The duration, in seconds, that the credentials should remain valid.
|
@@ -2224,8 +2298,8 @@ module Aws::STS
|
|
2224
2298
|
# The value is either the serial number for a hardware device (such as
|
2225
2299
|
# `GAHT12345678`) or an Amazon Resource Name (ARN) for a virtual device
|
2226
2300
|
# (such as `arn:aws:iam::123456789012:mfa/user`). You can find the
|
2227
|
-
# device for an IAM user by going to the
|
2228
|
-
# the user's security credentials.
|
2301
|
+
# device for an IAM user by going to the Amazon Web Services Management
|
2302
|
+
# Console and viewing the user's security credentials.
|
2229
2303
|
#
|
2230
2304
|
# The regex used to validate this parameter is a string of characters
|
2231
2305
|
# consisting of upper- and lower-case alphanumeric characters with no
|
@@ -2303,7 +2377,7 @@ module Aws::STS
|
|
2303
2377
|
params: params,
|
2304
2378
|
config: config)
|
2305
2379
|
context[:gem_name] = 'aws-sdk-core'
|
2306
|
-
context[:gem_version] = '3.
|
2380
|
+
context[:gem_version] = '3.197.2'
|
2307
2381
|
Seahorse::Client::Request.new(handlers, context)
|
2308
2382
|
end
|
2309
2383
|
|