aws-sdk-core 3.103.0 → 3.130.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 +1304 -0
- data/LICENSE.txt +202 -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 +20 -1
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +9 -4
- data/lib/aws-sdk-core/client_stubs.rb +5 -1
- data/lib/aws-sdk-core/credential_provider_chain.rb +21 -1
- data/lib/aws-sdk-core/ec2_metadata.rb +238 -0
- data/lib/aws-sdk-core/ecs_credentials.rb +8 -4
- data/lib/aws-sdk-core/errors.rb +9 -2
- data/lib/aws-sdk-core/instance_profile_credentials.rb +122 -22
- 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 +8 -0
- data/lib/aws-sdk-core/json.rb +8 -26
- data/lib/aws-sdk-core/log/formatter.rb +1 -1
- data/lib/aws-sdk-core/log/param_filter.rb +11 -3
- data/lib/aws-sdk-core/pageable_response.rb +80 -32
- data/lib/aws-sdk-core/pager.rb +3 -0
- data/lib/aws-sdk-core/param_validator.rb +52 -4
- data/lib/aws-sdk-core/plugins/api_key.rb +3 -1
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +340 -0
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +24 -7
- data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +6 -6
- data/lib/aws-sdk-core/plugins/http_checksum.rb +8 -1
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +17 -0
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +16 -1
- data/lib/aws-sdk-core/plugins/recursion_detection.rb +27 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +48 -2
- data/lib/aws-sdk-core/plugins/response_paging.rb +1 -1
- data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +5 -3
- data/lib/aws-sdk-core/plugins/retry_errors.rb +25 -8
- data/lib/aws-sdk-core/plugins/signature_v4.rb +15 -24
- data/lib/aws-sdk-core/plugins/stub_responses.rb +7 -1
- data/lib/aws-sdk-core/process_credentials.rb +5 -4
- data/lib/aws-sdk-core/refreshing_credentials.rb +42 -11
- data/lib/aws-sdk-core/rest/request/body.rb +19 -1
- data/lib/aws-sdk-core/rest/request/headers.rb +18 -6
- data/lib/aws-sdk-core/rest/response/headers.rb +4 -3
- data/lib/aws-sdk-core/shared_config.rb +60 -8
- data/lib/aws-sdk-core/shared_credentials.rb +7 -1
- data/lib/aws-sdk-core/sso_credentials.rb +141 -0
- data/lib/aws-sdk-core/structure.rb +10 -1
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +1 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +1 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +1 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +0 -2
- data/lib/aws-sdk-core/xml/builder.rb +2 -2
- data/lib/aws-sdk-core/xml/doc_builder.rb +6 -1
- data/lib/aws-sdk-core/xml/parser/engines/ox.rb +1 -1
- data/lib/aws-sdk-core/xml/parser/frame.rb +23 -0
- data/lib/aws-sdk-core/xml/parser.rb +5 -0
- data/lib/aws-sdk-core.rb +13 -3
- data/lib/aws-sdk-sso/client.rb +570 -0
- data/lib/aws-sdk-sso/client_api.rb +190 -0
- data/lib/aws-sdk-sso/customizations.rb +1 -0
- data/lib/aws-sdk-sso/errors.rb +102 -0
- data/lib/aws-sdk-sso/resource.rb +26 -0
- data/lib/aws-sdk-sso/types.rb +352 -0
- data/lib/aws-sdk-sso.rb +55 -0
- data/lib/aws-sdk-sts/client.rb +536 -435
- data/lib/aws-sdk-sts/client_api.rb +7 -1
- data/lib/aws-sdk-sts/errors.rb +1 -1
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +5 -1
- data/lib/aws-sdk-sts/presigner.rb +7 -1
- data/lib/aws-sdk-sts/resource.rb +1 -1
- data/lib/aws-sdk-sts/types.rb +332 -193
- data/lib/aws-sdk-sts.rb +8 -3
- data/lib/seahorse/client/base.rb +1 -0
- data/lib/seahorse/client/block_io.rb +3 -2
- data/lib/seahorse/client/configuration.rb +4 -0
- data/lib/seahorse/client/h2/connection.rb +15 -13
- data/lib/seahorse/client/h2/handler.rb +4 -5
- data/lib/seahorse/client/http/response.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +10 -4
- data/lib/seahorse/client/net_http/handler.rb +17 -8
- data/lib/seahorse/client/net_http/patches.rb +13 -84
- data/lib/seahorse/client/plugins/content_length.rb +11 -5
- data/lib/seahorse/client/plugins/h2.rb +4 -1
- data/lib/seahorse/client/plugins/net_http.rb +37 -3
- data/lib/seahorse/client/plugins/request_callback.rb +110 -0
- data/lib/seahorse/client/plugins/response_target.rb +3 -4
- data/lib/seahorse/model/operation.rb +3 -0
- data/lib/seahorse/model/shapes.rb +25 -0
- data/lib/seahorse/util.rb +6 -1
- data/lib/seahorse.rb +1 -0
- metadata +26 -9
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
4
4
|
#
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
@@ -27,6 +27,9 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
27
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
|
+
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
30
33
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
31
34
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
32
35
|
require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
|
@@ -74,6 +77,9 @@ module Aws::STS
|
|
74
77
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
75
78
|
add_plugin(Aws::Plugins::TransferEncoding)
|
76
79
|
add_plugin(Aws::Plugins::HttpChecksum)
|
80
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
81
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
82
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
77
83
|
add_plugin(Aws::Plugins::SignatureV4)
|
78
84
|
add_plugin(Aws::Plugins::Protocols::Query)
|
79
85
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
@@ -87,13 +93,28 @@ module Aws::STS
|
|
87
93
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
88
94
|
# credentials.
|
89
95
|
#
|
96
|
+
# * `Aws::SharedCredentials` - Used for loading static credentials from a
|
97
|
+
# shared file, such as `~/.aws/config`.
|
98
|
+
#
|
99
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
100
|
+
#
|
101
|
+
# * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
|
102
|
+
# assume a role after providing credentials via the web.
|
103
|
+
#
|
104
|
+
# * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
|
105
|
+
# access token generated from `aws login`.
|
106
|
+
#
|
107
|
+
# * `Aws::ProcessCredentials` - Used for loading credentials from a
|
108
|
+
# process that outputs to stdout.
|
109
|
+
#
|
90
110
|
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
91
111
|
# from an EC2 IMDS on an EC2 instance.
|
92
112
|
#
|
93
|
-
# * `Aws::
|
94
|
-
#
|
113
|
+
# * `Aws::ECSCredentials` - Used for loading credentials from
|
114
|
+
# instances running in ECS.
|
95
115
|
#
|
96
|
-
# * `Aws::
|
116
|
+
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
117
|
+
# from the Cognito Identity service.
|
97
118
|
#
|
98
119
|
# When `:credentials` are not configured directly, the following
|
99
120
|
# locations will be searched for credentials:
|
@@ -103,10 +124,12 @@ module Aws::STS
|
|
103
124
|
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
104
125
|
# * `~/.aws/credentials`
|
105
126
|
# * `~/.aws/config`
|
106
|
-
# * EC2 IMDS instance profile - When used by default, the timeouts
|
107
|
-
# very aggressive. Construct and pass an instance of
|
108
|
-
# `Aws::InstanceProfileCredentails`
|
109
|
-
# timeouts.
|
127
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
128
|
+
# are very aggressive. Construct and pass an instance of
|
129
|
+
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
130
|
+
# enable retries and extended timeouts. Instance profile credential
|
131
|
+
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
132
|
+
# to true.
|
110
133
|
#
|
111
134
|
# @option options [required, String] :region
|
112
135
|
# The AWS region to connect to. The configured `:region` is
|
@@ -160,6 +183,10 @@ module Aws::STS
|
|
160
183
|
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
161
184
|
# a clock skew correction and retry requests with skewed client clocks.
|
162
185
|
#
|
186
|
+
# @option options [String] :defaults_mode ("legacy")
|
187
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
188
|
+
# accepted modes and the configuration defaults that are included.
|
189
|
+
#
|
163
190
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
164
191
|
# Set to true to disable SDK automatically adding host prefix
|
165
192
|
# to default service endpoint when available.
|
@@ -267,6 +294,15 @@ module Aws::STS
|
|
267
294
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
268
295
|
# requests are made, and retries are disabled.
|
269
296
|
#
|
297
|
+
# @option options [Boolean] :use_dualstack_endpoint
|
298
|
+
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
299
|
+
# will be used if available.
|
300
|
+
#
|
301
|
+
# @option options [Boolean] :use_fips_endpoint
|
302
|
+
# When set to `true`, fips compatible endpoints will be used if available.
|
303
|
+
# When a `fips` region is used, the region is normalized and this config
|
304
|
+
# is set to `true`.
|
305
|
+
#
|
270
306
|
# @option options [Boolean] :validate_params (true)
|
271
307
|
# When `true`, request parameters are validated before
|
272
308
|
# sending the request.
|
@@ -278,7 +314,7 @@ module Aws::STS
|
|
278
314
|
# seconds to wait when opening a HTTP session before raising a
|
279
315
|
# `Timeout::Error`.
|
280
316
|
#
|
281
|
-
# @option options [
|
317
|
+
# @option options [Float] :http_read_timeout (60) The default
|
282
318
|
# number of seconds to wait for response data. This value can
|
283
319
|
# safely be set per-request on the session.
|
284
320
|
#
|
@@ -294,6 +330,9 @@ module Aws::STS
|
|
294
330
|
# disables this behaviour. This value can safely be set per
|
295
331
|
# request on the session.
|
296
332
|
#
|
333
|
+
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
334
|
+
# in seconds.
|
335
|
+
#
|
297
336
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
298
337
|
# HTTP debug output will be sent to the `:logger`.
|
299
338
|
#
|
@@ -320,119 +359,101 @@ module Aws::STS
|
|
320
359
|
# @!group API Operations
|
321
360
|
|
322
361
|
# Returns a set of temporary security credentials that you can use to
|
323
|
-
# access
|
324
|
-
# temporary credentials consist of an access key ID, a
|
325
|
-
# key, and a security token. Typically, you use
|
326
|
-
# account or for cross-account access. For a
|
327
|
-
# with other API operations that produce
|
328
|
-
# [Requesting Temporary Security
|
329
|
-
#
|
330
|
-
#
|
331
|
-
# You cannot use AWS account root user credentials to call `AssumeRole`.
|
332
|
-
# You must use credentials for an IAM user or an IAM role to call
|
333
|
-
# `AssumeRole`.
|
334
|
-
#
|
335
|
-
# For cross-account access, imagine that you own multiple accounts and
|
336
|
-
# need to access resources in each account. You could create long-term
|
337
|
-
# credentials in each account to access those resources. However,
|
338
|
-
# managing all those credentials and remembering which one can access
|
339
|
-
# which account can be time consuming. Instead, you can create one set
|
340
|
-
# of long-term credentials in one account. Then use temporary security
|
341
|
-
# credentials to access all the other accounts by assuming roles in
|
342
|
-
# those accounts. For more information about roles, see [IAM Roles][3]
|
343
|
-
# in the *IAM User Guide*.
|
344
|
-
#
|
345
|
-
# **Session Duration**
|
346
|
-
#
|
347
|
-
# By default, the temporary security credentials created by `AssumeRole`
|
348
|
-
# last for one hour. However, you can use the optional `DurationSeconds`
|
349
|
-
# parameter to specify the duration of your session. You can provide a
|
350
|
-
# value from 900 seconds (15 minutes) up to the maximum session duration
|
351
|
-
# setting for the role. This setting can have a value from 1 hour to 12
|
352
|
-
# hours. To learn how to view the maximum value for your role, see [View
|
353
|
-
# the Maximum Session Duration Setting for a Role][4] in the *IAM User
|
354
|
-
# Guide*. The maximum session duration limit applies when you use the
|
355
|
-
# `AssumeRole*` API operations or the `assume-role*` CLI commands.
|
356
|
-
# However the limit does not apply when you use those operations to
|
357
|
-
# create a console URL. For more information, see [Using IAM Roles][5]
|
358
|
-
# in the *IAM User Guide*.
|
362
|
+
# access Amazon Web Services resources that you might not normally have
|
363
|
+
# access to. These temporary credentials consist of an access key ID, a
|
364
|
+
# secret access key, and a security token. Typically, you use
|
365
|
+
# `AssumeRole` within your account or for cross-account access. For a
|
366
|
+
# comparison of `AssumeRole` with other API operations that produce
|
367
|
+
# temporary credentials, see [Requesting Temporary Security
|
368
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
369
|
+
# operations][2] in the *IAM User Guide*.
|
359
370
|
#
|
360
371
|
# **Permissions**
|
361
372
|
#
|
362
373
|
# The temporary security credentials created by `AssumeRole` can be used
|
363
|
-
# to make API calls to any
|
364
|
-
# cannot call the
|
365
|
-
# operations.
|
374
|
+
# to make API calls to any Amazon Web Services service with the
|
375
|
+
# following exception: You cannot call the Amazon Web Services STS
|
376
|
+
# `GetFederationToken` or `GetSessionToken` API operations.
|
366
377
|
#
|
367
|
-
# (Optional) You can pass inline or managed [session policies][
|
378
|
+
# (Optional) You can pass inline or managed [session policies][3] to
|
368
379
|
# this operation. You can pass a single JSON policy document to use as
|
369
380
|
# an inline session policy. You can also specify up to 10 managed
|
370
|
-
# policies to use as managed session policies. The
|
381
|
+
# policies to use as managed session policies. The plaintext that you
|
371
382
|
# use for both inline and managed session policies can't exceed 2,048
|
372
383
|
# characters. Passing policies to this operation returns new temporary
|
373
384
|
# credentials. The resulting session's permissions are the intersection
|
374
385
|
# of the role's identity-based policy and the session policies. You can
|
375
|
-
# use the role's temporary credentials in subsequent
|
376
|
-
# access resources in the account that owns the
|
377
|
-
# session policies to grant more permissions than
|
378
|
-
# identity-based policy of the role that is being
|
379
|
-
# information, see [Session Policies][
|
386
|
+
# use the role's temporary credentials in subsequent Amazon Web
|
387
|
+
# Services API calls to access resources in the account that owns the
|
388
|
+
# role. You cannot use session policies to grant more permissions than
|
389
|
+
# those allowed by the identity-based policy of the role that is being
|
390
|
+
# assumed. For more information, see [Session Policies][3] in the *IAM
|
391
|
+
# User Guide*.
|
392
|
+
#
|
393
|
+
# When you create a role, you create two policies: A role trust policy
|
394
|
+
# that specifies *who* can assume the role and a permissions policy that
|
395
|
+
# specifies *what* can be done with the role. You specify the trusted
|
396
|
+
# principal who is allowed to assume the role in the role trust policy.
|
380
397
|
#
|
381
|
-
# To assume a role from a different account, your
|
382
|
-
# trusted by the role. The trust relationship is defined
|
383
|
-
# trust policy when the role is created. That trust
|
384
|
-
# accounts are allowed to delegate that access to
|
398
|
+
# To assume a role from a different account, your Amazon Web Services
|
399
|
+
# account must be trusted by the role. The trust relationship is defined
|
400
|
+
# in the role's trust policy when the role is created. That trust
|
401
|
+
# policy states which accounts are allowed to delegate that access to
|
402
|
+
# users in the account.
|
385
403
|
#
|
386
404
|
# A user who wants to access a role in a different account must also
|
387
405
|
# have permissions that are delegated from the user account
|
388
406
|
# administrator. The administrator must attach a policy that allows the
|
389
407
|
# user to call `AssumeRole` for the ARN of the role in the other
|
390
|
-
# account.
|
391
|
-
# do either of the following:
|
408
|
+
# account.
|
392
409
|
#
|
393
|
-
#
|
394
|
-
#
|
410
|
+
# To allow a user to assume a role in the same account, you can do
|
411
|
+
# either of the following:
|
412
|
+
#
|
413
|
+
# * Attach a policy to the user that allows the user to call
|
414
|
+
# `AssumeRole` (as long as the role's trust policy trusts the
|
415
|
+
# account).
|
395
416
|
#
|
396
417
|
# * Add the user as a principal directly in the role's trust policy.
|
397
418
|
#
|
398
|
-
#
|
399
|
-
#
|
400
|
-
#
|
401
|
-
#
|
402
|
-
# Guide*.
|
419
|
+
# You can do either because the role’s trust policy acts as an IAM
|
420
|
+
# resource-based policy. When a resource-based policy grants access to a
|
421
|
+
# principal in the same account, no additional identity-based policy is
|
422
|
+
# required. For more information about trust policies and resource-based
|
423
|
+
# policies, see [IAM Policies][4] in the *IAM User Guide*.
|
403
424
|
#
|
404
425
|
# **Tags**
|
405
426
|
#
|
406
427
|
# (Optional) You can pass tag key-value pairs to your session. These
|
407
428
|
# tags are called session tags. For more information about session tags,
|
408
|
-
# see [Passing Session Tags in STS][
|
429
|
+
# see [Passing Session Tags in STS][5] in the *IAM User Guide*.
|
409
430
|
#
|
410
431
|
# An administrator must grant you the permissions necessary to pass
|
411
432
|
# session tags. The administrator can also create granular permissions
|
412
433
|
# to allow you to pass only specific session tags. For more information,
|
413
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
434
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][6] in
|
414
435
|
# the *IAM User Guide*.
|
415
436
|
#
|
416
437
|
# You can set the session tags as transitive. Transitive tags persist
|
417
438
|
# during role chaining. For more information, see [Chaining Roles with
|
418
|
-
# Session Tags][
|
439
|
+
# Session Tags][7] in the *IAM User Guide*.
|
419
440
|
#
|
420
441
|
# **Using MFA with AssumeRole**
|
421
442
|
#
|
422
443
|
# (Optional) You can include multi-factor authentication (MFA)
|
423
444
|
# information when you call `AssumeRole`. This is useful for
|
424
445
|
# cross-account scenarios to ensure that the user that assumes the role
|
425
|
-
# has been authenticated with an
|
426
|
-
# trust policy of the role being assumed includes a
|
427
|
-
# for MFA authentication. If the caller does not
|
428
|
-
# information, the request to assume the role is
|
429
|
-
# in a trust policy that tests for MFA
|
430
|
-
# the following example.
|
446
|
+
# has been authenticated with an Amazon Web Services MFA device. In that
|
447
|
+
# scenario, the trust policy of the role being assumed includes a
|
448
|
+
# condition that tests for MFA authentication. If the caller does not
|
449
|
+
# include valid MFA information, the request to assume the role is
|
450
|
+
# denied. The condition in a trust policy that tests for MFA
|
451
|
+
# authentication might look like the following example.
|
431
452
|
#
|
432
453
|
# `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
|
433
454
|
#
|
434
|
-
# For more information, see [Configuring MFA-Protected API Access][
|
435
|
-
#
|
455
|
+
# For more information, see [Configuring MFA-Protected API Access][8] in
|
456
|
+
# the *IAM User Guide* guide.
|
436
457
|
#
|
437
458
|
# To use MFA with `AssumeRole`, you pass values for the `SerialNumber`
|
438
459
|
# and `TokenCode` parameters. The `SerialNumber` value identifies the
|
@@ -443,15 +464,12 @@ module Aws::STS
|
|
443
464
|
#
|
444
465
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
445
466
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
446
|
-
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
447
|
-
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
448
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
449
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
450
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
451
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
452
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
453
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
454
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
|
467
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
468
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
469
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
470
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
471
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
472
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
|
455
473
|
#
|
456
474
|
# @option params [required, String] :role_arn
|
457
475
|
# The Amazon Resource Name (ARN) of the role to assume.
|
@@ -466,7 +484,7 @@ module Aws::STS
|
|
466
484
|
# also used in the ARN of the assumed role principal. This means that
|
467
485
|
# subsequent cross-account API requests that use the temporary security
|
468
486
|
# credentials will expose the role session name to the external account
|
469
|
-
# in their
|
487
|
+
# in their CloudTrail logs.
|
470
488
|
#
|
471
489
|
# The regex used to validate this parameter is a string of characters
|
472
490
|
# consisting of upper- and lower-case alphanumeric characters with no
|
@@ -479,28 +497,29 @@ module Aws::STS
|
|
479
497
|
# the same account as the role.
|
480
498
|
#
|
481
499
|
# This parameter is optional. You can provide up to 10 managed policy
|
482
|
-
# ARNs. However, the
|
500
|
+
# ARNs. However, the plaintext that you use for both inline and managed
|
483
501
|
# session policies can't exceed 2,048 characters. For more information
|
484
|
-
# about ARNs, see [Amazon Resource Names (ARNs) and
|
485
|
-
# Namespaces][1] in the
|
502
|
+
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
503
|
+
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
486
504
|
#
|
487
|
-
# <note markdown="1"> An
|
488
|
-
# tags into a packed binary format that has a
|
489
|
-
# request can fail for this limit even if your
|
490
|
-
# other requirements. The `PackedPolicySize`
|
491
|
-
# by percentage how close the policies and
|
492
|
-
# the upper size limit.
|
505
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
506
|
+
# policies and session tags into a packed binary format that has a
|
507
|
+
# separate limit. Your request can fail for this limit even if your
|
508
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
509
|
+
# response element indicates by percentage how close the policies and
|
510
|
+
# tags for your request are to the upper size limit.
|
493
511
|
#
|
494
512
|
# </note>
|
495
513
|
#
|
496
514
|
# Passing policies to this operation returns new temporary credentials.
|
497
515
|
# The resulting session's permissions are the intersection of the
|
498
516
|
# role's identity-based policy and the session policies. You can use
|
499
|
-
# the role's temporary credentials in subsequent
|
500
|
-
# access resources in the account that owns the role. You
|
501
|
-
# session policies to grant more permissions than those
|
502
|
-
# identity-based policy of the role that is being
|
503
|
-
# information, see [Session Policies][2] in the *IAM
|
517
|
+
# the role's temporary credentials in subsequent Amazon Web Services
|
518
|
+
# API calls to access resources in the account that owns the role. You
|
519
|
+
# cannot use session policies to grant more permissions than those
|
520
|
+
# allowed by the identity-based policy of the role that is being
|
521
|
+
# assumed. For more information, see [Session Policies][2] in the *IAM
|
522
|
+
# User Guide*.
|
504
523
|
#
|
505
524
|
#
|
506
525
|
#
|
@@ -515,25 +534,25 @@ module Aws::STS
|
|
515
534
|
# new temporary credentials. The resulting session's permissions are
|
516
535
|
# the intersection of the role's identity-based policy and the session
|
517
536
|
# policies. You can use the role's temporary credentials in subsequent
|
518
|
-
#
|
519
|
-
# You cannot use session policies to grant more
|
520
|
-
# allowed by the identity-based policy of the
|
521
|
-
# assumed. For more information, see [Session
|
522
|
-
# User Guide*.
|
537
|
+
# Amazon Web Services API calls to access resources in the account that
|
538
|
+
# owns the role. You cannot use session policies to grant more
|
539
|
+
# permissions than those allowed by the identity-based policy of the
|
540
|
+
# role that is being assumed. For more information, see [Session
|
541
|
+
# Policies][1] in the *IAM User Guide*.
|
523
542
|
#
|
524
|
-
# The
|
543
|
+
# The plaintext that you use for both inline and managed session
|
525
544
|
# policies can't exceed 2,048 characters. The JSON policy characters
|
526
545
|
# can be any ASCII character from the space character to the end of the
|
527
546
|
# valid character list (\\u0020 through \\u00FF). It can also include
|
528
547
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
529
548
|
# characters.
|
530
549
|
#
|
531
|
-
# <note markdown="1"> An
|
532
|
-
# tags into a packed binary format that has a
|
533
|
-
# request can fail for this limit even if your
|
534
|
-
# other requirements. The `PackedPolicySize`
|
535
|
-
# by percentage how close the policies and
|
536
|
-
# the upper size limit.
|
550
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
551
|
+
# policies and session tags into a packed binary format that has a
|
552
|
+
# separate limit. Your request can fail for this limit even if your
|
553
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
554
|
+
# response element indicates by percentage how close the policies and
|
555
|
+
# tags for your request are to the upper size limit.
|
537
556
|
#
|
538
557
|
# </note>
|
539
558
|
#
|
@@ -542,15 +561,26 @@ module Aws::STS
|
|
542
561
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
543
562
|
#
|
544
563
|
# @option params [Integer] :duration_seconds
|
545
|
-
# The duration, in seconds, of the role session. The value can
|
546
|
-
# from 900 seconds (15 minutes) up to the maximum session duration
|
547
|
-
#
|
548
|
-
# hours. If you specify a value higher than this
|
549
|
-
#
|
550
|
-
#
|
551
|
-
#
|
552
|
-
#
|
553
|
-
#
|
564
|
+
# The duration, in seconds, of the role session. The value specified can
|
565
|
+
# range from 900 seconds (15 minutes) up to the maximum session duration
|
566
|
+
# set for the role. The maximum session duration setting can have a
|
567
|
+
# value from 1 hour to 12 hours. If you specify a value higher than this
|
568
|
+
# setting or the administrator setting (whichever is lower), the
|
569
|
+
# operation fails. For example, if you specify a session duration of 12
|
570
|
+
# hours, but your administrator set the maximum session duration to 6
|
571
|
+
# hours, your operation fails.
|
572
|
+
#
|
573
|
+
# Role chaining limits your Amazon Web Services CLI or Amazon Web
|
574
|
+
# Services API role session to a maximum of one hour. When you use the
|
575
|
+
# `AssumeRole` API operation to assume a role, you can specify the
|
576
|
+
# duration of your role session with the `DurationSeconds` parameter.
|
577
|
+
# You can specify a parameter value of up to 43200 seconds (12 hours),
|
578
|
+
# depending on the maximum session duration setting for your role.
|
579
|
+
# However, if you assume a role using role chaining and provide a
|
580
|
+
# `DurationSeconds` parameter value greater than one hour, the operation
|
581
|
+
# fails. To learn how to view the maximum value for your role, see [View
|
582
|
+
# the Maximum Session Duration Setting for a Role][1] in the *IAM User
|
583
|
+
# Guide*.
|
554
584
|
#
|
555
585
|
# By default, the value is set to `3600` seconds.
|
556
586
|
#
|
@@ -559,8 +589,8 @@ module Aws::STS
|
|
559
589
|
# The request to the federation endpoint for a console sign-in token
|
560
590
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
561
591
|
# of the console session. For more information, see [Creating a URL that
|
562
|
-
# Enables Federated Users to Access the
|
563
|
-
# the *IAM User Guide*.
|
592
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
593
|
+
# Console][2] in the *IAM User Guide*.
|
564
594
|
#
|
565
595
|
# </note>
|
566
596
|
#
|
@@ -572,20 +602,20 @@ module Aws::STS
|
|
572
602
|
# @option params [Array<Types::Tag>] :tags
|
573
603
|
# A list of session tags that you want to pass. Each session tag
|
574
604
|
# consists of a key name and an associated value. For more information
|
575
|
-
# about session tags, see [Tagging
|
576
|
-
# Guide*.
|
605
|
+
# about session tags, see [Tagging Amazon Web Services STS Sessions][1]
|
606
|
+
# in the *IAM User Guide*.
|
577
607
|
#
|
578
608
|
# This parameter is optional. You can pass up to 50 session tags. The
|
579
|
-
#
|
580
|
-
#
|
581
|
-
#
|
609
|
+
# plaintext session tag keys can’t exceed 128 characters, and the values
|
610
|
+
# can’t exceed 256 characters. For these and additional limits, see [IAM
|
611
|
+
# and STS Character Limits][2] in the *IAM User Guide*.
|
582
612
|
#
|
583
|
-
# <note markdown="1"> An
|
584
|
-
# tags into a packed binary format that has a
|
585
|
-
# request can fail for this limit even if your
|
586
|
-
# other requirements. The `PackedPolicySize`
|
587
|
-
# by percentage how close the policies and
|
588
|
-
# the upper size limit.
|
613
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
614
|
+
# policies and session tags into a packed binary format that has a
|
615
|
+
# separate limit. Your request can fail for this limit even if your
|
616
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
617
|
+
# response element indicates by percentage how close the policies and
|
618
|
+
# tags for your request are to the upper size limit.
|
589
619
|
#
|
590
620
|
# </note>
|
591
621
|
#
|
@@ -604,14 +634,14 @@ module Aws::STS
|
|
604
634
|
# operation, the new session inherits any transitive session tags from
|
605
635
|
# the calling session. If you pass a session tag with the same key as an
|
606
636
|
# inherited tag, the operation fails. To view the inherited tags for a
|
607
|
-
# session, see the
|
608
|
-
#
|
637
|
+
# session, see the CloudTrail logs. For more information, see [Viewing
|
638
|
+
# Session Tags in CloudTrail][3] in the *IAM User Guide*.
|
609
639
|
#
|
610
640
|
#
|
611
641
|
#
|
612
642
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
613
643
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
614
|
-
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
644
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs
|
615
645
|
#
|
616
646
|
# @option params [Array<String>] :transitive_tag_keys
|
617
647
|
# A list of keys for session tags that you want to set as transitive. If
|
@@ -641,7 +671,8 @@ module Aws::STS
|
|
641
671
|
# trusted account. That way, only someone with the ID can assume the
|
642
672
|
# role, rather than everyone in the account. For more information about
|
643
673
|
# the external ID, see [How to Use an External ID When Granting Access
|
644
|
-
# to Your
|
674
|
+
# to Your Amazon Web Services Resources to a Third Party][1] in the *IAM
|
675
|
+
# User Guide*.
|
645
676
|
#
|
646
677
|
# The regex used to validate this parameter is a string of characters
|
647
678
|
# consisting of upper- and lower-case alphanumeric characters with no
|
@@ -668,7 +699,7 @@ module Aws::STS
|
|
668
699
|
#
|
669
700
|
# @option params [String] :token_code
|
670
701
|
# The value provided by the MFA device, if the trust policy of the role
|
671
|
-
# being assumed requires MFA (
|
702
|
+
# being assumed requires MFA. (In other words, if the policy includes a
|
672
703
|
# condition that tests for MFA). If the role being assumed requires MFA
|
673
704
|
# and if the `TokenCode` value is missing or expired, the `AssumeRole`
|
674
705
|
# call returns an "access denied" error.
|
@@ -676,11 +707,35 @@ module Aws::STS
|
|
676
707
|
# The format for this parameter, as described by its regex pattern, is a
|
677
708
|
# sequence of six numeric digits.
|
678
709
|
#
|
710
|
+
# @option params [String] :source_identity
|
711
|
+
# The source identity specified by the principal that is calling the
|
712
|
+
# `AssumeRole` operation.
|
713
|
+
#
|
714
|
+
# You can require users to specify a source identity when they assume a
|
715
|
+
# role. You do this by using the `sts:SourceIdentity` condition key in a
|
716
|
+
# role trust policy. You can use source identity information in
|
717
|
+
# CloudTrail logs to determine who took actions with a role. You can use
|
718
|
+
# the `aws:SourceIdentity` condition key to further control access to
|
719
|
+
# Amazon Web Services resources based on the value of source identity.
|
720
|
+
# For more information about using source identity, see [Monitor and
|
721
|
+
# control actions taken with assumed roles][1] in the *IAM User Guide*.
|
722
|
+
#
|
723
|
+
# The regex used to validate this parameter is a string of characters
|
724
|
+
# consisting of upper- and lower-case alphanumeric characters with no
|
725
|
+
# spaces. You can also include underscores or any of the following
|
726
|
+
# characters: =,.@-. You cannot use a value that begins with the text
|
727
|
+
# `aws:`. This prefix is reserved for Amazon Web Services internal use.
|
728
|
+
#
|
729
|
+
#
|
730
|
+
#
|
731
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
732
|
+
#
|
679
733
|
# @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
680
734
|
#
|
681
735
|
# * {Types::AssumeRoleResponse#credentials #credentials} => Types::Credentials
|
682
736
|
# * {Types::AssumeRoleResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser
|
683
737
|
# * {Types::AssumeRoleResponse#packed_policy_size #packed_policy_size} => Integer
|
738
|
+
# * {Types::AssumeRoleResponse#source_identity #source_identity} => String
|
684
739
|
#
|
685
740
|
#
|
686
741
|
# @example Example: To assume a role
|
@@ -747,6 +802,7 @@ module Aws::STS
|
|
747
802
|
# external_id: "externalIdType",
|
748
803
|
# serial_number: "serialNumberType",
|
749
804
|
# token_code: "tokenCodeType",
|
805
|
+
# source_identity: "sourceIdentityType",
|
750
806
|
# })
|
751
807
|
#
|
752
808
|
# @example Response structure
|
@@ -758,6 +814,7 @@ module Aws::STS
|
|
758
814
|
# resp.assumed_role_user.assumed_role_id #=> String
|
759
815
|
# resp.assumed_role_user.arn #=> String
|
760
816
|
# resp.packed_policy_size #=> Integer
|
817
|
+
# resp.source_identity #=> String
|
761
818
|
#
|
762
819
|
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole AWS API Documentation
|
763
820
|
#
|
@@ -771,16 +828,17 @@ module Aws::STS
|
|
771
828
|
# Returns a set of temporary security credentials for users who have
|
772
829
|
# been authenticated via a SAML authentication response. This operation
|
773
830
|
# provides a mechanism for tying an enterprise identity store or
|
774
|
-
# directory to role-based
|
775
|
-
# or configuration. For a comparison of
|
776
|
-
# other API operations that produce
|
777
|
-
# [Requesting Temporary Security
|
778
|
-
#
|
831
|
+
# directory to role-based Amazon Web Services access without
|
832
|
+
# user-specific credentials or configuration. For a comparison of
|
833
|
+
# `AssumeRoleWithSAML` with the other API operations that produce
|
834
|
+
# temporary credentials, see [Requesting Temporary Security
|
835
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
836
|
+
# operations][2] in the *IAM User Guide*.
|
779
837
|
#
|
780
838
|
# The temporary security credentials returned by this operation consist
|
781
839
|
# of an access key ID, a secret access key, and a security token.
|
782
840
|
# Applications can use these temporary security credentials to sign
|
783
|
-
# calls to
|
841
|
+
# calls to Amazon Web Services services.
|
784
842
|
#
|
785
843
|
# **Session Duration**
|
786
844
|
#
|
@@ -800,37 +858,49 @@ module Aws::STS
|
|
800
858
|
# use those operations to create a console URL. For more information,
|
801
859
|
# see [Using IAM Roles][4] in the *IAM User Guide*.
|
802
860
|
#
|
861
|
+
# <note markdown="1"> [Role chaining][5] limits your CLI or Amazon Web Services API role
|
862
|
+
# session to a maximum of one hour. When you use the `AssumeRole` API
|
863
|
+
# operation to assume a role, you can specify the duration of your role
|
864
|
+
# session with the `DurationSeconds` parameter. You can specify a
|
865
|
+
# parameter value of up to 43200 seconds (12 hours), depending on the
|
866
|
+
# maximum session duration setting for your role. However, if you assume
|
867
|
+
# a role using role chaining and provide a `DurationSeconds` parameter
|
868
|
+
# value greater than one hour, the operation fails.
|
869
|
+
#
|
870
|
+
# </note>
|
871
|
+
#
|
803
872
|
# **Permissions**
|
804
873
|
#
|
805
874
|
# The temporary security credentials created by `AssumeRoleWithSAML` can
|
806
|
-
# be used to make API calls to any
|
807
|
-
# exception: you cannot call the STS `GetFederationToken` or
|
875
|
+
# be used to make API calls to any Amazon Web Services service with the
|
876
|
+
# following exception: you cannot call the STS `GetFederationToken` or
|
808
877
|
# `GetSessionToken` API operations.
|
809
878
|
#
|
810
|
-
# (Optional) You can pass inline or managed [session policies][
|
879
|
+
# (Optional) You can pass inline or managed [session policies][6] to
|
811
880
|
# this operation. You can pass a single JSON policy document to use as
|
812
881
|
# an inline session policy. You can also specify up to 10 managed
|
813
|
-
# policies to use as managed session policies. The
|
882
|
+
# policies to use as managed session policies. The plaintext that you
|
814
883
|
# use for both inline and managed session policies can't exceed 2,048
|
815
884
|
# characters. Passing policies to this operation returns new temporary
|
816
885
|
# credentials. The resulting session's permissions are the intersection
|
817
886
|
# of the role's identity-based policy and the session policies. You can
|
818
|
-
# use the role's temporary credentials in subsequent
|
819
|
-
# access resources in the account that owns the
|
820
|
-
# session policies to grant more permissions than
|
821
|
-
# identity-based policy of the role that is being
|
822
|
-
# information, see [Session Policies][
|
823
|
-
#
|
824
|
-
#
|
825
|
-
#
|
826
|
-
#
|
827
|
-
# for
|
828
|
-
#
|
829
|
-
#
|
830
|
-
#
|
831
|
-
#
|
832
|
-
#
|
833
|
-
#
|
887
|
+
# use the role's temporary credentials in subsequent Amazon Web
|
888
|
+
# Services API calls to access resources in the account that owns the
|
889
|
+
# role. You cannot use session policies to grant more permissions than
|
890
|
+
# those allowed by the identity-based policy of the role that is being
|
891
|
+
# assumed. For more information, see [Session Policies][6] in the *IAM
|
892
|
+
# User Guide*.
|
893
|
+
#
|
894
|
+
# Calling `AssumeRoleWithSAML` does not require the use of Amazon Web
|
895
|
+
# Services security credentials. The identity of the caller is validated
|
896
|
+
# by using keys in the metadata document that is uploaded for the SAML
|
897
|
+
# provider entity for your identity provider.
|
898
|
+
#
|
899
|
+
# Calling `AssumeRoleWithSAML` can result in an entry in your CloudTrail
|
900
|
+
# logs. The entry includes the value in the `NameID` element of the SAML
|
901
|
+
# assertion. We recommend that you use a `NameIDType` that is not
|
902
|
+
# associated with any personally identifiable information (PII). For
|
903
|
+
# example, you could instead use the persistent identifier
|
834
904
|
# (`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`).
|
835
905
|
#
|
836
906
|
# **Tags**
|
@@ -838,19 +908,19 @@ module Aws::STS
|
|
838
908
|
# (Optional) You can configure your IdP to pass attributes into your
|
839
909
|
# SAML assertion as session tags. Each session tag consists of a key
|
840
910
|
# name and an associated value. For more information about session tags,
|
841
|
-
# see [Passing Session Tags in STS][
|
911
|
+
# see [Passing Session Tags in STS][7] in the *IAM User Guide*.
|
842
912
|
#
|
843
|
-
# You can pass up to 50 session tags. The
|
913
|
+
# You can pass up to 50 session tags. The plaintext session tag keys
|
844
914
|
# can’t exceed 128 characters and the values can’t exceed 256
|
845
915
|
# characters. For these and additional limits, see [IAM and STS
|
846
|
-
# Character Limits][
|
916
|
+
# Character Limits][8] in the *IAM User Guide*.
|
847
917
|
#
|
848
|
-
# <note markdown="1"> An
|
849
|
-
# tags into a packed binary format that has a
|
850
|
-
# request can fail for this limit even if your
|
851
|
-
# other requirements. The `PackedPolicySize`
|
852
|
-
# by percentage how close the policies and
|
853
|
-
# the upper size limit.
|
918
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
919
|
+
# policies and session tags into a packed binary format that has a
|
920
|
+
# separate limit. Your request can fail for this limit even if your
|
921
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
922
|
+
# response element indicates by percentage how close the policies and
|
923
|
+
# tags for your request are to the upper size limit.
|
854
924
|
#
|
855
925
|
# </note>
|
856
926
|
#
|
@@ -861,32 +931,33 @@ module Aws::STS
|
|
861
931
|
# An administrator must grant you the permissions necessary to pass
|
862
932
|
# session tags. The administrator can also create granular permissions
|
863
933
|
# to allow you to pass only specific session tags. For more information,
|
864
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
934
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][9] in
|
865
935
|
# the *IAM User Guide*.
|
866
936
|
#
|
867
937
|
# You can set the session tags as transitive. Transitive tags persist
|
868
938
|
# during role chaining. For more information, see [Chaining Roles with
|
869
|
-
# Session Tags][
|
939
|
+
# Session Tags][10] in the *IAM User Guide*.
|
870
940
|
#
|
871
941
|
# **SAML Configuration**
|
872
942
|
#
|
873
943
|
# Before your application can call `AssumeRoleWithSAML`, you must
|
874
944
|
# configure your SAML identity provider (IdP) to issue the claims
|
875
|
-
# required by
|
876
|
-
# Management (IAM) to create a SAML provider entity in your
|
877
|
-
# that represents your identity provider.
|
878
|
-
# role that specifies this SAML provider in
|
945
|
+
# required by Amazon Web Services. Additionally, you must use Identity
|
946
|
+
# and Access Management (IAM) to create a SAML provider entity in your
|
947
|
+
# Amazon Web Services account that represents your identity provider.
|
948
|
+
# You must also create an IAM role that specifies this SAML provider in
|
949
|
+
# its trust policy.
|
879
950
|
#
|
880
951
|
# For more information, see the following resources:
|
881
952
|
#
|
882
|
-
# * [About SAML 2.0-based Federation][
|
953
|
+
# * [About SAML 2.0-based Federation][11] in the *IAM User Guide*.
|
883
954
|
#
|
884
|
-
# * [Creating SAML Identity Providers][
|
955
|
+
# * [Creating SAML Identity Providers][12] in the *IAM User Guide*.
|
885
956
|
#
|
886
|
-
# * [Configuring a Relying Party and Claims][
|
957
|
+
# * [Configuring a Relying Party and Claims][13] in the *IAM User
|
887
958
|
# Guide*.
|
888
959
|
#
|
889
|
-
# * [Creating a Role for SAML 2.0 Federation][
|
960
|
+
# * [Creating a Role for SAML 2.0 Federation][14] in the *IAM User
|
890
961
|
# Guide*.
|
891
962
|
#
|
892
963
|
#
|
@@ -895,15 +966,16 @@ module Aws::STS
|
|
895
966
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
896
967
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
897
968
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
898
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
899
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
900
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
901
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
902
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
903
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
904
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
905
|
-
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
906
|
-
# [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
969
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
|
970
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
971
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
972
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
973
|
+
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
974
|
+
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
975
|
+
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
|
976
|
+
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
|
977
|
+
# [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
|
978
|
+
# [14]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
|
907
979
|
#
|
908
980
|
# @option params [required, String] :role_arn
|
909
981
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
@@ -914,7 +986,7 @@ module Aws::STS
|
|
914
986
|
# describes the IdP.
|
915
987
|
#
|
916
988
|
# @option params [required, String] :saml_assertion
|
917
|
-
# The
|
989
|
+
# The base64 encoded SAML authentication response provided by the IdP.
|
918
990
|
#
|
919
991
|
# For more information, see [Configuring a Relying Party and Adding
|
920
992
|
# Claims][1] in the *IAM User Guide*.
|
@@ -929,28 +1001,29 @@ module Aws::STS
|
|
929
1001
|
# the same account as the role.
|
930
1002
|
#
|
931
1003
|
# This parameter is optional. You can provide up to 10 managed policy
|
932
|
-
# ARNs. However, the
|
1004
|
+
# ARNs. However, the plaintext that you use for both inline and managed
|
933
1005
|
# session policies can't exceed 2,048 characters. For more information
|
934
|
-
# about ARNs, see [Amazon Resource Names (ARNs) and
|
935
|
-
# Namespaces][1] in the
|
1006
|
+
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
1007
|
+
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
936
1008
|
#
|
937
|
-
# <note markdown="1"> An
|
938
|
-
# tags into a packed binary format that has a
|
939
|
-
# request can fail for this limit even if your
|
940
|
-
# other requirements. The `PackedPolicySize`
|
941
|
-
# by percentage how close the policies and
|
942
|
-
# the upper size limit.
|
1009
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1010
|
+
# policies and session tags into a packed binary format that has a
|
1011
|
+
# separate limit. Your request can fail for this limit even if your
|
1012
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
1013
|
+
# response element indicates by percentage how close the policies and
|
1014
|
+
# tags for your request are to the upper size limit.
|
943
1015
|
#
|
944
1016
|
# </note>
|
945
1017
|
#
|
946
1018
|
# Passing policies to this operation returns new temporary credentials.
|
947
1019
|
# The resulting session's permissions are the intersection of the
|
948
1020
|
# role's identity-based policy and the session policies. You can use
|
949
|
-
# the role's temporary credentials in subsequent
|
950
|
-
# access resources in the account that owns the role. You
|
951
|
-
# session policies to grant more permissions than those
|
952
|
-
# identity-based policy of the role that is being
|
953
|
-
# information, see [Session Policies][2] in the *IAM
|
1021
|
+
# the role's temporary credentials in subsequent Amazon Web Services
|
1022
|
+
# API calls to access resources in the account that owns the role. You
|
1023
|
+
# cannot use session policies to grant more permissions than those
|
1024
|
+
# allowed by the identity-based policy of the role that is being
|
1025
|
+
# assumed. For more information, see [Session Policies][2] in the *IAM
|
1026
|
+
# User Guide*.
|
954
1027
|
#
|
955
1028
|
#
|
956
1029
|
#
|
@@ -965,25 +1038,25 @@ module Aws::STS
|
|
965
1038
|
# new temporary credentials. The resulting session's permissions are
|
966
1039
|
# the intersection of the role's identity-based policy and the session
|
967
1040
|
# policies. You can use the role's temporary credentials in subsequent
|
968
|
-
#
|
969
|
-
# You cannot use session policies to grant more
|
970
|
-
# allowed by the identity-based policy of the
|
971
|
-
# assumed. For more information, see [Session
|
972
|
-
# User Guide*.
|
1041
|
+
# Amazon Web Services API calls to access resources in the account that
|
1042
|
+
# owns the role. You cannot use session policies to grant more
|
1043
|
+
# permissions than those allowed by the identity-based policy of the
|
1044
|
+
# role that is being assumed. For more information, see [Session
|
1045
|
+
# Policies][1] in the *IAM User Guide*.
|
973
1046
|
#
|
974
|
-
# The
|
1047
|
+
# The plaintext that you use for both inline and managed session
|
975
1048
|
# policies can't exceed 2,048 characters. The JSON policy characters
|
976
1049
|
# can be any ASCII character from the space character to the end of the
|
977
1050
|
# valid character list (\\u0020 through \\u00FF). It can also include
|
978
1051
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
979
1052
|
# characters.
|
980
1053
|
#
|
981
|
-
# <note markdown="1"> An
|
982
|
-
# tags into a packed binary format that has a
|
983
|
-
# request can fail for this limit even if your
|
984
|
-
# other requirements. The `PackedPolicySize`
|
985
|
-
# by percentage how close the policies and
|
986
|
-
# the upper size limit.
|
1054
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1055
|
+
# policies and session tags into a packed binary format that has a
|
1056
|
+
# separate limit. Your request can fail for this limit even if your
|
1057
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
1058
|
+
# response element indicates by percentage how close the policies and
|
1059
|
+
# tags for your request are to the upper size limit.
|
987
1060
|
#
|
988
1061
|
# </note>
|
989
1062
|
#
|
@@ -1012,8 +1085,8 @@ module Aws::STS
|
|
1012
1085
|
# The request to the federation endpoint for a console sign-in token
|
1013
1086
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
1014
1087
|
# of the console session. For more information, see [Creating a URL that
|
1015
|
-
# Enables Federated Users to Access the
|
1016
|
-
# the *IAM User Guide*.
|
1088
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
1089
|
+
# Console][2] in the *IAM User Guide*.
|
1017
1090
|
#
|
1018
1091
|
# </note>
|
1019
1092
|
#
|
@@ -1032,6 +1105,7 @@ module Aws::STS
|
|
1032
1105
|
# * {Types::AssumeRoleWithSAMLResponse#issuer #issuer} => String
|
1033
1106
|
# * {Types::AssumeRoleWithSAMLResponse#audience #audience} => String
|
1034
1107
|
# * {Types::AssumeRoleWithSAMLResponse#name_qualifier #name_qualifier} => String
|
1108
|
+
# * {Types::AssumeRoleWithSAMLResponse#source_identity #source_identity} => String
|
1035
1109
|
#
|
1036
1110
|
#
|
1037
1111
|
# @example Example: To assume a role using a SAML assertion
|
@@ -1092,6 +1166,7 @@ module Aws::STS
|
|
1092
1166
|
# resp.issuer #=> String
|
1093
1167
|
# resp.audience #=> String
|
1094
1168
|
# resp.name_qualifier #=> String
|
1169
|
+
# resp.source_identity #=> String
|
1095
1170
|
#
|
1096
1171
|
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML AWS API Documentation
|
1097
1172
|
#
|
@@ -1104,37 +1179,41 @@ module Aws::STS
|
|
1104
1179
|
|
1105
1180
|
# Returns a set of temporary security credentials for users who have
|
1106
1181
|
# been authenticated in a mobile or web application with a web identity
|
1107
|
-
# provider. Example providers include
|
1108
|
-
# Facebook,
|
1182
|
+
# provider. Example providers include the OAuth 2.0 providers Login with
|
1183
|
+
# Amazon and Facebook, or any OpenID Connect-compatible identity
|
1184
|
+
# provider such as Google or [Amazon Cognito federated identities][1].
|
1109
1185
|
#
|
1110
1186
|
# <note markdown="1"> For mobile applications, we recommend that you use Amazon Cognito. You
|
1111
|
-
# can use Amazon Cognito with the [
|
1112
|
-
# and the [
|
1113
|
-
# a user. You can also supply
|
1114
|
-
# throughout the lifetime of an
|
1115
|
-
#
|
1116
|
-
#
|
1117
|
-
#
|
1118
|
-
#
|
1187
|
+
# can use Amazon Cognito with the [Amazon Web Services SDK for iOS
|
1188
|
+
# Developer Guide][2] and the [Amazon Web Services SDK for Android
|
1189
|
+
# Developer Guide][3] to uniquely identify a user. You can also supply
|
1190
|
+
# the user with a consistent identity throughout the lifetime of an
|
1191
|
+
# application.
|
1192
|
+
#
|
1193
|
+
# To learn more about Amazon Cognito, see [Amazon Cognito Overview][4]
|
1194
|
+
# in *Amazon Web Services SDK for Android Developer Guide* and [Amazon
|
1195
|
+
# Cognito Overview][5] in the *Amazon Web Services SDK for iOS Developer
|
1196
|
+
# Guide*.
|
1119
1197
|
#
|
1120
1198
|
# </note>
|
1121
1199
|
#
|
1122
|
-
# Calling `AssumeRoleWithWebIdentity` does not require the use of
|
1123
|
-
# security credentials. Therefore, you can distribute an
|
1124
|
-
# (for example, on mobile devices) that requests temporary
|
1125
|
-
# credentials without including long-term
|
1126
|
-
# application. You also don't need to deploy
|
1127
|
-
# services that use long-term
|
1128
|
-
# the caller is validated by using
|
1129
|
-
# provider. For a comparison of
|
1130
|
-
# other API operations that produce
|
1131
|
-
# [Requesting Temporary Security
|
1132
|
-
#
|
1200
|
+
# Calling `AssumeRoleWithWebIdentity` does not require the use of Amazon
|
1201
|
+
# Web Services security credentials. Therefore, you can distribute an
|
1202
|
+
# application (for example, on mobile devices) that requests temporary
|
1203
|
+
# security credentials without including long-term Amazon Web Services
|
1204
|
+
# credentials in the application. You also don't need to deploy
|
1205
|
+
# server-based proxy services that use long-term Amazon Web Services
|
1206
|
+
# credentials. Instead, the identity of the caller is validated by using
|
1207
|
+
# a token from the web identity provider. For a comparison of
|
1208
|
+
# `AssumeRoleWithWebIdentity` with the other API operations that produce
|
1209
|
+
# temporary credentials, see [Requesting Temporary Security
|
1210
|
+
# Credentials][6] and [Comparing the Amazon Web Services STS API
|
1211
|
+
# operations][7] in the *IAM User Guide*.
|
1133
1212
|
#
|
1134
1213
|
# The temporary security credentials returned by this API consist of an
|
1135
1214
|
# access key ID, a secret access key, and a security token. Applications
|
1136
|
-
# can use these temporary security credentials to sign calls to
|
1137
|
-
# service API operations.
|
1215
|
+
# can use these temporary security credentials to sign calls to Amazon
|
1216
|
+
# Web Services service API operations.
|
1138
1217
|
#
|
1139
1218
|
# **Session Duration**
|
1140
1219
|
#
|
@@ -1145,51 +1224,52 @@ module Aws::STS
|
|
1145
1224
|
# to the maximum session duration setting for the role. This setting can
|
1146
1225
|
# have a value from 1 hour to 12 hours. To learn how to view the maximum
|
1147
1226
|
# value for your role, see [View the Maximum Session Duration Setting
|
1148
|
-
# for a Role][
|
1227
|
+
# for a Role][8] in the *IAM User Guide*. The maximum session duration
|
1149
1228
|
# limit applies when you use the `AssumeRole*` API operations or the
|
1150
1229
|
# `assume-role*` CLI commands. However the limit does not apply when you
|
1151
1230
|
# use those operations to create a console URL. For more information,
|
1152
|
-
# see [Using IAM Roles][
|
1231
|
+
# see [Using IAM Roles][9] in the *IAM User Guide*.
|
1153
1232
|
#
|
1154
1233
|
# **Permissions**
|
1155
1234
|
#
|
1156
1235
|
# The temporary security credentials created by
|
1157
|
-
# `AssumeRoleWithWebIdentity` can be used to make API calls to any
|
1158
|
-
# service with the following exception: you cannot
|
1159
|
-
# `GetFederationToken` or `GetSessionToken` API operations.
|
1236
|
+
# `AssumeRoleWithWebIdentity` can be used to make API calls to any
|
1237
|
+
# Amazon Web Services service with the following exception: you cannot
|
1238
|
+
# call the STS `GetFederationToken` or `GetSessionToken` API operations.
|
1160
1239
|
#
|
1161
|
-
# (Optional) You can pass inline or managed [session policies][
|
1240
|
+
# (Optional) You can pass inline or managed [session policies][10] to
|
1162
1241
|
# this operation. You can pass a single JSON policy document to use as
|
1163
1242
|
# an inline session policy. You can also specify up to 10 managed
|
1164
|
-
# policies to use as managed session policies. The
|
1243
|
+
# policies to use as managed session policies. The plaintext that you
|
1165
1244
|
# use for both inline and managed session policies can't exceed 2,048
|
1166
1245
|
# characters. Passing policies to this operation returns new temporary
|
1167
1246
|
# credentials. The resulting session's permissions are the intersection
|
1168
1247
|
# of the role's identity-based policy and the session policies. You can
|
1169
|
-
# use the role's temporary credentials in subsequent
|
1170
|
-
# access resources in the account that owns the
|
1171
|
-
# session policies to grant more permissions than
|
1172
|
-
# identity-based policy of the role that is being
|
1173
|
-
# information, see [Session Policies][
|
1248
|
+
# use the role's temporary credentials in subsequent Amazon Web
|
1249
|
+
# Services API calls to access resources in the account that owns the
|
1250
|
+
# role. You cannot use session policies to grant more permissions than
|
1251
|
+
# those allowed by the identity-based policy of the role that is being
|
1252
|
+
# assumed. For more information, see [Session Policies][10] in the *IAM
|
1253
|
+
# User Guide*.
|
1174
1254
|
#
|
1175
1255
|
# **Tags**
|
1176
1256
|
#
|
1177
1257
|
# (Optional) You can configure your IdP to pass attributes into your web
|
1178
1258
|
# identity token as session tags. Each session tag consists of a key
|
1179
1259
|
# name and an associated value. For more information about session tags,
|
1180
|
-
# see [Passing Session Tags in STS][
|
1260
|
+
# see [Passing Session Tags in STS][11] in the *IAM User Guide*.
|
1181
1261
|
#
|
1182
|
-
# You can pass up to 50 session tags. The
|
1262
|
+
# You can pass up to 50 session tags. The plaintext session tag keys
|
1183
1263
|
# can’t exceed 128 characters and the values can’t exceed 256
|
1184
1264
|
# characters. For these and additional limits, see [IAM and STS
|
1185
|
-
# Character Limits][
|
1265
|
+
# Character Limits][12] in the *IAM User Guide*.
|
1186
1266
|
#
|
1187
|
-
# <note markdown="1"> An
|
1188
|
-
# tags into a packed binary format that has a
|
1189
|
-
# request can fail for this limit even if your
|
1190
|
-
# other requirements. The `PackedPolicySize`
|
1191
|
-
# by percentage how close the policies and
|
1192
|
-
# the upper size limit.
|
1267
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1268
|
+
# policies and session tags into a packed binary format that has a
|
1269
|
+
# separate limit. Your request can fail for this limit even if your
|
1270
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
1271
|
+
# response element indicates by percentage how close the policies and
|
1272
|
+
# tags for your request are to the upper size limit.
|
1193
1273
|
#
|
1194
1274
|
# </note>
|
1195
1275
|
#
|
@@ -1200,12 +1280,12 @@ module Aws::STS
|
|
1200
1280
|
# An administrator must grant you the permissions necessary to pass
|
1201
1281
|
# session tags. The administrator can also create granular permissions
|
1202
1282
|
# to allow you to pass only specific session tags. For more information,
|
1203
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
1283
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][13] in
|
1204
1284
|
# the *IAM User Guide*.
|
1205
1285
|
#
|
1206
1286
|
# You can set the session tags as transitive. Transitive tags persist
|
1207
1287
|
# during role chaining. For more information, see [Chaining Roles with
|
1208
|
-
# Session Tags][
|
1288
|
+
# Session Tags][14] in the *IAM User Guide*.
|
1209
1289
|
#
|
1210
1290
|
# **Identities**
|
1211
1291
|
#
|
@@ -1216,55 +1296,56 @@ module Aws::STS
|
|
1216
1296
|
# identity token. In other words, the identity provider must be
|
1217
1297
|
# specified in the role's trust policy.
|
1218
1298
|
#
|
1219
|
-
# Calling `AssumeRoleWithWebIdentity` can result in an entry in your
|
1220
|
-
# CloudTrail logs. The entry includes the [Subject][
|
1221
|
-
#
|
1299
|
+
# Calling `AssumeRoleWithWebIdentity` can result in an entry in your
|
1300
|
+
# CloudTrail logs. The entry includes the [Subject][15] of the provided
|
1301
|
+
# web identity token. We recommend that you avoid using any personally
|
1222
1302
|
# identifiable information (PII) in this field. For example, you could
|
1223
1303
|
# instead use a GUID or a pairwise identifier, as [suggested in the OIDC
|
1224
|
-
# specification][
|
1304
|
+
# specification][16].
|
1225
1305
|
#
|
1226
1306
|
# For more information about how to use web identity federation and the
|
1227
1307
|
# `AssumeRoleWithWebIdentity` API, see the following resources:
|
1228
1308
|
#
|
1229
|
-
# * [Using Web Identity Federation API Operations for Mobile Apps][
|
1230
|
-
# and [Federation Through a Web-based Identity Provider][
|
1309
|
+
# * [Using Web Identity Federation API Operations for Mobile Apps][17]
|
1310
|
+
# and [Federation Through a Web-based Identity Provider][18].
|
1231
1311
|
#
|
1232
|
-
# * [ Web Identity Federation Playground][
|
1312
|
+
# * [ Web Identity Federation Playground][19]. Walk through the process
|
1233
1313
|
# of authenticating through Login with Amazon, Facebook, or Google,
|
1234
1314
|
# getting temporary security credentials, and then using those
|
1235
|
-
# credentials to make a request to
|
1315
|
+
# credentials to make a request to Amazon Web Services.
|
1236
1316
|
#
|
1237
|
-
# * [
|
1238
|
-
# Developer Guide][
|
1239
|
-
# how to invoke the identity providers. The
|
1240
|
-
# use the information from these providers
|
1241
|
-
# security credentials.
|
1317
|
+
# * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
|
1318
|
+
# Services SDK for Android Developer Guide][3]. These toolkits contain
|
1319
|
+
# sample apps that show how to invoke the identity providers. The
|
1320
|
+
# toolkits then show how to use the information from these providers
|
1321
|
+
# to get and use temporary security credentials.
|
1242
1322
|
#
|
1243
|
-
# * [Web Identity Federation with Mobile Applications][
|
1323
|
+
# * [Web Identity Federation with Mobile Applications][20]. This article
|
1244
1324
|
# discusses web identity federation and shows an example of how to use
|
1245
1325
|
# web identity federation to get access to content in Amazon S3.
|
1246
1326
|
#
|
1247
1327
|
#
|
1248
1328
|
#
|
1249
|
-
# [1]:
|
1250
|
-
# [2]: http://aws.amazon.com/
|
1251
|
-
# [3]:
|
1252
|
-
# [4]: https://docs.aws.amazon.com/mobile/
|
1253
|
-
# [5]: https://docs.aws.amazon.com/
|
1254
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1255
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1256
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1257
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1258
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1259
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1260
|
-
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1261
|
-
# [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1262
|
-
# [14]:
|
1263
|
-
# [15]: http://openid.net/specs/openid-connect-core-1_0.html#
|
1264
|
-
# [16]:
|
1265
|
-
# [17]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1266
|
-
# [18]: https://
|
1267
|
-
# [19]:
|
1329
|
+
# [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
1330
|
+
# [2]: http://aws.amazon.com/sdkforios/
|
1331
|
+
# [3]: http://aws.amazon.com/sdkforandroid/
|
1332
|
+
# [4]: https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840
|
1333
|
+
# [5]: https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664
|
1334
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1335
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
1336
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
1337
|
+
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1338
|
+
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
1339
|
+
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
1340
|
+
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
1341
|
+
# [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
1342
|
+
# [14]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
1343
|
+
# [15]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
|
1344
|
+
# [16]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
1345
|
+
# [17]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
1346
|
+
# [18]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
1347
|
+
# [19]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
|
1348
|
+
# [20]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
1268
1349
|
#
|
1269
1350
|
# @option params [required, String] :role_arn
|
1270
1351
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
@@ -1291,13 +1372,13 @@ module Aws::STS
|
|
1291
1372
|
# `AssumeRoleWithWebIdentity` call.
|
1292
1373
|
#
|
1293
1374
|
# @option params [String] :provider_id
|
1294
|
-
# The fully qualified host component of the domain name of the
|
1295
|
-
# provider.
|
1375
|
+
# The fully qualified host component of the domain name of the OAuth 2.0
|
1376
|
+
# identity provider. Do not specify this value for an OpenID Connect
|
1377
|
+
# identity provider.
|
1296
1378
|
#
|
1297
|
-
#
|
1298
|
-
#
|
1299
|
-
#
|
1300
|
-
# schemes and port numbers.
|
1379
|
+
# Currently `www.amazon.com` and `graph.facebook.com` are the only
|
1380
|
+
# supported identity providers for OAuth 2.0 access tokens. Do not
|
1381
|
+
# include URL schemes and port numbers.
|
1301
1382
|
#
|
1302
1383
|
# Do not specify this value for OpenID Connect ID tokens.
|
1303
1384
|
#
|
@@ -1307,28 +1388,29 @@ module Aws::STS
|
|
1307
1388
|
# the same account as the role.
|
1308
1389
|
#
|
1309
1390
|
# This parameter is optional. You can provide up to 10 managed policy
|
1310
|
-
# ARNs. However, the
|
1391
|
+
# ARNs. However, the plaintext that you use for both inline and managed
|
1311
1392
|
# session policies can't exceed 2,048 characters. For more information
|
1312
|
-
# about ARNs, see [Amazon Resource Names (ARNs) and
|
1313
|
-
# Namespaces][1] in the
|
1393
|
+
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
1394
|
+
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
1314
1395
|
#
|
1315
|
-
# <note markdown="1"> An
|
1316
|
-
# tags into a packed binary format that has a
|
1317
|
-
# request can fail for this limit even if your
|
1318
|
-
# other requirements. The `PackedPolicySize`
|
1319
|
-
# by percentage how close the policies and
|
1320
|
-
# the upper size limit.
|
1396
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1397
|
+
# policies and session tags into a packed binary format that has a
|
1398
|
+
# separate limit. Your request can fail for this limit even if your
|
1399
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
1400
|
+
# response element indicates by percentage how close the policies and
|
1401
|
+
# tags for your request are to the upper size limit.
|
1321
1402
|
#
|
1322
1403
|
# </note>
|
1323
1404
|
#
|
1324
1405
|
# Passing policies to this operation returns new temporary credentials.
|
1325
1406
|
# The resulting session's permissions are the intersection of the
|
1326
1407
|
# role's identity-based policy and the session policies. You can use
|
1327
|
-
# the role's temporary credentials in subsequent
|
1328
|
-
# access resources in the account that owns the role. You
|
1329
|
-
# session policies to grant more permissions than those
|
1330
|
-
# identity-based policy of the role that is being
|
1331
|
-
# information, see [Session Policies][2] in the *IAM
|
1408
|
+
# the role's temporary credentials in subsequent Amazon Web Services
|
1409
|
+
# API calls to access resources in the account that owns the role. You
|
1410
|
+
# cannot use session policies to grant more permissions than those
|
1411
|
+
# allowed by the identity-based policy of the role that is being
|
1412
|
+
# assumed. For more information, see [Session Policies][2] in the *IAM
|
1413
|
+
# User Guide*.
|
1332
1414
|
#
|
1333
1415
|
#
|
1334
1416
|
#
|
@@ -1343,25 +1425,25 @@ module Aws::STS
|
|
1343
1425
|
# new temporary credentials. The resulting session's permissions are
|
1344
1426
|
# the intersection of the role's identity-based policy and the session
|
1345
1427
|
# policies. You can use the role's temporary credentials in subsequent
|
1346
|
-
#
|
1347
|
-
# You cannot use session policies to grant more
|
1348
|
-
# allowed by the identity-based policy of the
|
1349
|
-
# assumed. For more information, see [Session
|
1350
|
-
# User Guide*.
|
1428
|
+
# Amazon Web Services API calls to access resources in the account that
|
1429
|
+
# owns the role. You cannot use session policies to grant more
|
1430
|
+
# permissions than those allowed by the identity-based policy of the
|
1431
|
+
# role that is being assumed. For more information, see [Session
|
1432
|
+
# Policies][1] in the *IAM User Guide*.
|
1351
1433
|
#
|
1352
|
-
# The
|
1434
|
+
# The plaintext that you use for both inline and managed session
|
1353
1435
|
# policies can't exceed 2,048 characters. The JSON policy characters
|
1354
1436
|
# can be any ASCII character from the space character to the end of the
|
1355
1437
|
# valid character list (\\u0020 through \\u00FF). It can also include
|
1356
1438
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1357
1439
|
# characters.
|
1358
1440
|
#
|
1359
|
-
# <note markdown="1"> An
|
1360
|
-
# tags into a packed binary format that has a
|
1361
|
-
# request can fail for this limit even if your
|
1362
|
-
# other requirements. The `PackedPolicySize`
|
1363
|
-
# by percentage how close the policies and
|
1364
|
-
# the upper size limit.
|
1441
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1442
|
+
# policies and session tags into a packed binary format that has a
|
1443
|
+
# separate limit. Your request can fail for this limit even if your
|
1444
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
1445
|
+
# response element indicates by percentage how close the policies and
|
1446
|
+
# tags for your request are to the upper size limit.
|
1365
1447
|
#
|
1366
1448
|
# </note>
|
1367
1449
|
#
|
@@ -1387,8 +1469,8 @@ module Aws::STS
|
|
1387
1469
|
# The request to the federation endpoint for a console sign-in token
|
1388
1470
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
1389
1471
|
# of the console session. For more information, see [Creating a URL that
|
1390
|
-
# Enables Federated Users to Access the
|
1391
|
-
# the *IAM User Guide*.
|
1472
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
1473
|
+
# Console][2] in the *IAM User Guide*.
|
1392
1474
|
#
|
1393
1475
|
# </note>
|
1394
1476
|
#
|
@@ -1405,6 +1487,7 @@ module Aws::STS
|
|
1405
1487
|
# * {Types::AssumeRoleWithWebIdentityResponse#packed_policy_size #packed_policy_size} => Integer
|
1406
1488
|
# * {Types::AssumeRoleWithWebIdentityResponse#provider #provider} => String
|
1407
1489
|
# * {Types::AssumeRoleWithWebIdentityResponse#audience #audience} => String
|
1490
|
+
# * {Types::AssumeRoleWithWebIdentityResponse#source_identity #source_identity} => String
|
1408
1491
|
#
|
1409
1492
|
#
|
1410
1493
|
# @example Example: To assume a role as an OpenID Connect-federated user
|
@@ -1464,6 +1547,7 @@ module Aws::STS
|
|
1464
1547
|
# resp.packed_policy_size #=> Integer
|
1465
1548
|
# resp.provider #=> String
|
1466
1549
|
# resp.audience #=> String
|
1550
|
+
# resp.source_identity #=> String
|
1467
1551
|
#
|
1468
1552
|
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity AWS API Documentation
|
1469
1553
|
#
|
@@ -1475,34 +1559,34 @@ module Aws::STS
|
|
1475
1559
|
end
|
1476
1560
|
|
1477
1561
|
# Decodes additional information about the authorization status of a
|
1478
|
-
# request from an encoded message returned in response to an
|
1479
|
-
# request.
|
1562
|
+
# request from an encoded message returned in response to an Amazon Web
|
1563
|
+
# Services request.
|
1480
1564
|
#
|
1481
1565
|
# For example, if a user is not authorized to perform an operation that
|
1482
1566
|
# he or she has requested, the request returns a
|
1483
1567
|
# `Client.UnauthorizedOperation` response (an HTTP 403 response). Some
|
1484
|
-
#
|
1485
|
-
# details about this authorization failure.
|
1568
|
+
# Amazon Web Services operations additionally return an encoded message
|
1569
|
+
# that can provide details about this authorization failure.
|
1486
1570
|
#
|
1487
|
-
# <note markdown="1"> Only certain
|
1488
|
-
# The documentation for an individual operation
|
1489
|
-
# operation returns an encoded message in
|
1490
|
-
# code.
|
1571
|
+
# <note markdown="1"> Only certain Amazon Web Services operations return an encoded
|
1572
|
+
# authorization message. The documentation for an individual operation
|
1573
|
+
# indicates whether that operation returns an encoded message in
|
1574
|
+
# addition to returning an HTTP code.
|
1491
1575
|
#
|
1492
1576
|
# </note>
|
1493
1577
|
#
|
1494
1578
|
# The message is encoded because the details of the authorization status
|
1495
|
-
# can
|
1579
|
+
# can contain privileged information that the user who requested the
|
1496
1580
|
# operation should not see. To decode an authorization status message, a
|
1497
|
-
# user must be granted permissions
|
1498
|
-
# `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
|
1581
|
+
# user must be granted permissions through an IAM [policy][1] to request
|
1582
|
+
# the `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
|
1499
1583
|
# action.
|
1500
1584
|
#
|
1501
1585
|
# The decoded message includes the following type of information:
|
1502
1586
|
#
|
1503
1587
|
# * Whether the request was denied due to an explicit deny or due to the
|
1504
1588
|
# absence of an explicit allow. For more information, see [Determining
|
1505
|
-
# Whether a Request is Allowed or Denied][
|
1589
|
+
# Whether a Request is Allowed or Denied][2] in the *IAM User Guide*.
|
1506
1590
|
#
|
1507
1591
|
# * The principal who made the request.
|
1508
1592
|
#
|
@@ -1514,7 +1598,8 @@ module Aws::STS
|
|
1514
1598
|
#
|
1515
1599
|
#
|
1516
1600
|
#
|
1517
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1601
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
1602
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
|
1518
1603
|
#
|
1519
1604
|
# @option params [required, String] :encoded_message
|
1520
1605
|
# The encoded message that was returned with the response.
|
@@ -1563,15 +1648,16 @@ module Aws::STS
|
|
1563
1648
|
# *IAM User Guide*.
|
1564
1649
|
#
|
1565
1650
|
# When you pass an access key ID to this operation, it returns the ID of
|
1566
|
-
# the
|
1567
|
-
# with `AKIA` are long-term credentials for an IAM user or
|
1568
|
-
# account root user. Access key IDs beginning
|
1569
|
-
# credentials that are created using STS
|
1570
|
-
# the response belongs to you, you can
|
1571
|
-
# review your root user access keys. Then,
|
1572
|
-
# report][2] to learn which IAM user owns
|
1573
|
-
# requested the temporary credentials for an
|
1574
|
-
# STS events in your [CloudTrail logs][3] in
|
1651
|
+
# the Amazon Web Services account to which the keys belong. Access key
|
1652
|
+
# IDs beginning with `AKIA` are long-term credentials for an IAM user or
|
1653
|
+
# the Amazon Web Services account root user. Access key IDs beginning
|
1654
|
+
# with `ASIA` are temporary credentials that are created using STS
|
1655
|
+
# operations. If the account in the response belongs to you, you can
|
1656
|
+
# sign in as the root user and review your root user access keys. Then,
|
1657
|
+
# you can pull a [credentials report][2] to learn which IAM user owns
|
1658
|
+
# the keys. To learn who requested the temporary credentials for an
|
1659
|
+
# `ASIA` access key, view the STS events in your [CloudTrail logs][3] in
|
1660
|
+
# the *IAM User Guide*.
|
1575
1661
|
#
|
1576
1662
|
# This operation does not indicate the state of the access key. The key
|
1577
1663
|
# might be active, inactive, or deleted. Active keys might not have
|
@@ -1708,8 +1794,8 @@ module Aws::STS
|
|
1708
1794
|
# can be safely stored, usually in a server-based application. For a
|
1709
1795
|
# comparison of `GetFederationToken` with the other API operations that
|
1710
1796
|
# produce temporary credentials, see [Requesting Temporary Security
|
1711
|
-
# Credentials][1] and [Comparing the
|
1712
|
-
# *IAM User Guide*.
|
1797
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
1798
|
+
# operations][2] in the *IAM User Guide*.
|
1713
1799
|
#
|
1714
1800
|
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
1715
1801
|
# authenticate users using a web identity provider like Login with
|
@@ -1721,34 +1807,36 @@ module Aws::STS
|
|
1721
1807
|
# </note>
|
1722
1808
|
#
|
1723
1809
|
# You can also call `GetFederationToken` using the security credentials
|
1724
|
-
# of an
|
1725
|
-
# recommend that you create an IAM user for the purpose
|
1726
|
-
# application. Then attach a policy to the IAM user that
|
1727
|
-
# federated users to only the actions and resources that they
|
1728
|
-
# access. For more information, see [IAM Best Practices][5] in
|
1729
|
-
# User Guide*.
|
1810
|
+
# of an Amazon Web Services account root user, but we do not recommend
|
1811
|
+
# it. Instead, we recommend that you create an IAM user for the purpose
|
1812
|
+
# of the proxy application. Then attach a policy to the IAM user that
|
1813
|
+
# limits federated users to only the actions and resources that they
|
1814
|
+
# need to access. For more information, see [IAM Best Practices][5] in
|
1815
|
+
# the *IAM User Guide*.
|
1730
1816
|
#
|
1731
1817
|
# **Session duration**
|
1732
1818
|
#
|
1733
1819
|
# The temporary credentials are valid for the specified duration, from
|
1734
1820
|
# 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
|
1735
1821
|
# hours). The default session duration is 43,200 seconds (12 hours).
|
1736
|
-
# Temporary credentials
|
1737
|
-
# credentials have a maximum duration of 3,600 seconds
|
1822
|
+
# Temporary credentials obtained by using the Amazon Web Services
|
1823
|
+
# account root user credentials have a maximum duration of 3,600 seconds
|
1824
|
+
# (1 hour).
|
1738
1825
|
#
|
1739
1826
|
# **Permissions**
|
1740
1827
|
#
|
1741
1828
|
# You can use the temporary credentials created by `GetFederationToken`
|
1742
|
-
# in any
|
1829
|
+
# in any Amazon Web Services service except the following:
|
1743
1830
|
#
|
1744
|
-
# * You cannot call any IAM operations using the
|
1831
|
+
# * You cannot call any IAM operations using the CLI or the Amazon Web
|
1832
|
+
# Services API.
|
1745
1833
|
#
|
1746
1834
|
# * You cannot call any STS operations except `GetCallerIdentity`.
|
1747
1835
|
#
|
1748
1836
|
# You must pass an inline or managed [session policy][6] to this
|
1749
1837
|
# operation. You can pass a single JSON policy document to use as an
|
1750
1838
|
# inline session policy. You can also specify up to 10 managed policies
|
1751
|
-
# to use as managed session policies. The
|
1839
|
+
# to use as managed session policies. The plaintext that you use for
|
1752
1840
|
# both inline and managed session policies can't exceed 2,048
|
1753
1841
|
# characters.
|
1754
1842
|
#
|
@@ -1777,6 +1865,15 @@ module Aws::STS
|
|
1777
1865
|
# called session tags. For more information about session tags, see
|
1778
1866
|
# [Passing Session Tags in STS][8] in the *IAM User Guide*.
|
1779
1867
|
#
|
1868
|
+
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
1869
|
+
# authenticate users using a web identity provider like Login with
|
1870
|
+
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
1871
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][3]
|
1872
|
+
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
1873
|
+
# Through a Web-based Identity Provider][4] in the *IAM User Guide*.
|
1874
|
+
#
|
1875
|
+
# </note>
|
1876
|
+
#
|
1780
1877
|
# An administrator must grant you the permissions necessary to pass
|
1781
1878
|
# session tags. The administrator can also create granular permissions
|
1782
1879
|
# to allow you to pass only specific session tags. For more information,
|
@@ -1842,19 +1939,19 @@ module Aws::STS
|
|
1842
1939
|
# are granted in addition to the permissions that are granted by the
|
1843
1940
|
# session policies.
|
1844
1941
|
#
|
1845
|
-
# The
|
1942
|
+
# The plaintext that you use for both inline and managed session
|
1846
1943
|
# policies can't exceed 2,048 characters. The JSON policy characters
|
1847
1944
|
# can be any ASCII character from the space character to the end of the
|
1848
1945
|
# valid character list (\\u0020 through \\u00FF). It can also include
|
1849
1946
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1850
1947
|
# characters.
|
1851
1948
|
#
|
1852
|
-
# <note markdown="1"> An
|
1853
|
-
# tags into a packed binary format that has a
|
1854
|
-
# request can fail for this limit even if your
|
1855
|
-
# other requirements. The `PackedPolicySize`
|
1856
|
-
# by percentage how close the policies and
|
1857
|
-
# the upper size limit.
|
1949
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1950
|
+
# policies and session tags into a packed binary format that has a
|
1951
|
+
# separate limit. Your request can fail for this limit even if your
|
1952
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
1953
|
+
# response element indicates by percentage how close the policies and
|
1954
|
+
# tags for your request are to the upper size limit.
|
1858
1955
|
#
|
1859
1956
|
# </note>
|
1860
1957
|
#
|
@@ -1870,11 +1967,12 @@ module Aws::STS
|
|
1870
1967
|
# You must pass an inline or managed [session policy][1] to this
|
1871
1968
|
# operation. You can pass a single JSON policy document to use as an
|
1872
1969
|
# inline session policy. You can also specify up to 10 managed policies
|
1873
|
-
# to use as managed session policies. The
|
1970
|
+
# to use as managed session policies. The plaintext that you use for
|
1874
1971
|
# both inline and managed session policies can't exceed 2,048
|
1875
1972
|
# characters. You can provide up to 10 managed policy ARNs. For more
|
1876
|
-
# information about ARNs, see [Amazon Resource Names (ARNs) and
|
1877
|
-
# Service Namespaces][2] in the
|
1973
|
+
# information about ARNs, see [Amazon Resource Names (ARNs) and Amazon
|
1974
|
+
# Web Services Service Namespaces][2] in the Amazon Web Services General
|
1975
|
+
# Reference.
|
1878
1976
|
#
|
1879
1977
|
# This parameter is optional. However, if you do not pass any session
|
1880
1978
|
# policies, then the resulting federated user session has no
|
@@ -1895,12 +1993,12 @@ module Aws::STS
|
|
1895
1993
|
# are granted in addition to the permissions that are granted by the
|
1896
1994
|
# session policies.
|
1897
1995
|
#
|
1898
|
-
# <note markdown="1"> An
|
1899
|
-
# tags into a packed binary format that has a
|
1900
|
-
# request can fail for this limit even if your
|
1901
|
-
# other requirements. The `PackedPolicySize`
|
1902
|
-
# by percentage how close the policies and
|
1903
|
-
# the upper size limit.
|
1996
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
1997
|
+
# policies and session tags into a packed binary format that has a
|
1998
|
+
# separate limit. Your request can fail for this limit even if your
|
1999
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
2000
|
+
# response element indicates by percentage how close the policies and
|
2001
|
+
# tags for your request are to the upper size limit.
|
1904
2002
|
#
|
1905
2003
|
# </note>
|
1906
2004
|
#
|
@@ -1913,10 +2011,10 @@ module Aws::STS
|
|
1913
2011
|
# The duration, in seconds, that the session should last. Acceptable
|
1914
2012
|
# durations for federation sessions range from 900 seconds (15 minutes)
|
1915
2013
|
# to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
|
1916
|
-
# default. Sessions obtained using
|
1917
|
-
# restricted to a maximum of 3,600 seconds (one hour).
|
1918
|
-
# duration is longer than one hour, the session
|
1919
|
-
# user credentials defaults to one hour.
|
2014
|
+
# default. Sessions obtained using Amazon Web Services account root user
|
2015
|
+
# credentials are restricted to a maximum of 3,600 seconds (one hour).
|
2016
|
+
# If the specified duration is longer than one hour, the session
|
2017
|
+
# obtained by using root user credentials defaults to one hour.
|
1920
2018
|
#
|
1921
2019
|
# @option params [Array<Types::Tag>] :tags
|
1922
2020
|
# A list of session tags. Each session tag consists of a key name and an
|
@@ -1924,16 +2022,16 @@ module Aws::STS
|
|
1924
2022
|
# [Passing Session Tags in STS][1] in the *IAM User Guide*.
|
1925
2023
|
#
|
1926
2024
|
# This parameter is optional. You can pass up to 50 session tags. The
|
1927
|
-
#
|
2025
|
+
# plaintext session tag keys can’t exceed 128 characters and the values
|
1928
2026
|
# can’t exceed 256 characters. For these and additional limits, see [IAM
|
1929
2027
|
# and STS Character Limits][2] in the *IAM User Guide*.
|
1930
2028
|
#
|
1931
|
-
# <note markdown="1"> An
|
1932
|
-
# tags into a packed binary format that has a
|
1933
|
-
# request can fail for this limit even if your
|
1934
|
-
# other requirements. The `PackedPolicySize`
|
1935
|
-
# by percentage how close the policies and
|
1936
|
-
# the upper size limit.
|
2029
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
2030
|
+
# policies and session tags into a packed binary format that has a
|
2031
|
+
# separate limit. Your request can fail for this limit even if your
|
2032
|
+
# plaintext meets the other requirements. The `PackedPolicySize`
|
2033
|
+
# response element indicates by percentage how close the policies and
|
2034
|
+
# tags for your request are to the upper size limit.
|
1937
2035
|
#
|
1938
2036
|
# </note>
|
1939
2037
|
#
|
@@ -2031,37 +2129,38 @@ module Aws::STS
|
|
2031
2129
|
req.send_request(options)
|
2032
2130
|
end
|
2033
2131
|
|
2034
|
-
# Returns a set of temporary credentials for an
|
2035
|
-
# The credentials consist of an access key ID, a
|
2036
|
-
# a security token. Typically, you use
|
2037
|
-
# use MFA to protect programmatic calls
|
2038
|
-
#
|
2039
|
-
#
|
2040
|
-
#
|
2041
|
-
#
|
2042
|
-
#
|
2132
|
+
# Returns a set of temporary credentials for an Amazon Web Services
|
2133
|
+
# account or IAM user. The credentials consist of an access key ID, a
|
2134
|
+
# secret access key, and a security token. Typically, you use
|
2135
|
+
# `GetSessionToken` if you want to use MFA to protect programmatic calls
|
2136
|
+
# to specific Amazon Web Services API operations like Amazon EC2
|
2137
|
+
# `StopInstances`. MFA-enabled IAM users would need to call
|
2138
|
+
# `GetSessionToken` and submit an MFA code that is associated with their
|
2139
|
+
# MFA device. Using the temporary security credentials that are returned
|
2140
|
+
# from the call, IAM users can then make programmatic calls to API
|
2141
|
+
# operations that require MFA authentication. If you do not supply a
|
2043
2142
|
# correct MFA code, then the API returns an access denied error. For a
|
2044
2143
|
# comparison of `GetSessionToken` with the other API operations that
|
2045
2144
|
# produce temporary credentials, see [Requesting Temporary Security
|
2046
|
-
# Credentials][1] and [Comparing the
|
2047
|
-
# *IAM User Guide*.
|
2145
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
2146
|
+
# operations][2] in the *IAM User Guide*.
|
2048
2147
|
#
|
2049
2148
|
# **Session Duration**
|
2050
2149
|
#
|
2051
2150
|
# The `GetSessionToken` operation must be called by using the long-term
|
2052
|
-
#
|
2053
|
-
#
|
2054
|
-
# that you specify. This duration can
|
2055
|
-
# minutes) up to a maximum of 129,600 seconds
|
2056
|
-
# of 43,200 seconds (12 hours). Credentials
|
2057
|
-
# can range from 900 seconds (15 minutes)
|
2058
|
-
# with a default of 1 hour.
|
2151
|
+
# Amazon Web Services security credentials of the Amazon Web Services
|
2152
|
+
# account root user or an IAM user. Credentials that are created by IAM
|
2153
|
+
# users are valid for the duration that you specify. This duration can
|
2154
|
+
# range from 900 seconds (15 minutes) up to a maximum of 129,600 seconds
|
2155
|
+
# (36 hours), with a default of 43,200 seconds (12 hours). Credentials
|
2156
|
+
# based on account credentials can range from 900 seconds (15 minutes)
|
2157
|
+
# up to 3,600 seconds (1 hour), with a default of 1 hour.
|
2059
2158
|
#
|
2060
2159
|
# **Permissions**
|
2061
2160
|
#
|
2062
2161
|
# The temporary security credentials created by `GetSessionToken` can be
|
2063
|
-
# used to make API calls to any
|
2064
|
-
# exceptions:
|
2162
|
+
# used to make API calls to any Amazon Web Services service with the
|
2163
|
+
# following exceptions:
|
2065
2164
|
#
|
2066
2165
|
# * You cannot call any IAM API operations unless MFA authentication
|
2067
2166
|
# information is included in the request.
|
@@ -2069,20 +2168,21 @@ module Aws::STS
|
|
2069
2168
|
# * You cannot call any STS API *except* `AssumeRole` or
|
2070
2169
|
# `GetCallerIdentity`.
|
2071
2170
|
#
|
2072
|
-
# <note markdown="1"> We recommend that you do not call `GetSessionToken` with
|
2073
|
-
# root user credentials. Instead, follow our [best
|
2074
|
-
# creating one or more IAM users, giving them the
|
2075
|
-
# and using IAM users for everyday interaction
|
2171
|
+
# <note markdown="1"> We recommend that you do not call `GetSessionToken` with Amazon Web
|
2172
|
+
# Services account root user credentials. Instead, follow our [best
|
2173
|
+
# practices][3] by creating one or more IAM users, giving them the
|
2174
|
+
# necessary permissions, and using IAM users for everyday interaction
|
2175
|
+
# with Amazon Web Services.
|
2076
2176
|
#
|
2077
2177
|
# </note>
|
2078
2178
|
#
|
2079
2179
|
# The credentials that are returned by `GetSessionToken` are based on
|
2080
2180
|
# permissions associated with the user whose credentials were used to
|
2081
|
-
# call the operation. If `GetSessionToken` is called using
|
2082
|
-
# root user credentials, the temporary credentials have
|
2083
|
-
# permissions. Similarly, if `GetSessionToken` is called using
|
2084
|
-
# credentials of an IAM user, the temporary credentials have the
|
2085
|
-
# permissions as the IAM user.
|
2181
|
+
# call the operation. If `GetSessionToken` is called using Amazon Web
|
2182
|
+
# Services account root user credentials, the temporary credentials have
|
2183
|
+
# root user permissions. Similarly, if `GetSessionToken` is called using
|
2184
|
+
# the credentials of an IAM user, the temporary credentials have the
|
2185
|
+
# same permissions as the IAM user.
|
2086
2186
|
#
|
2087
2187
|
# For more information about using `GetSessionToken` to create temporary
|
2088
2188
|
# credentials, go to [Temporary Credentials for Users in Untrusted
|
@@ -2099,9 +2199,10 @@ module Aws::STS
|
|
2099
2199
|
# The duration, in seconds, that the credentials should remain valid.
|
2100
2200
|
# Acceptable durations for IAM user sessions range from 900 seconds (15
|
2101
2201
|
# minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12 hours)
|
2102
|
-
# as the default. Sessions for
|
2103
|
-
# maximum of 3,600 seconds (one hour). If the duration
|
2104
|
-
# one hour, the session for
|
2202
|
+
# as the default. Sessions for Amazon Web Services account owners are
|
2203
|
+
# restricted to a maximum of 3,600 seconds (one hour). If the duration
|
2204
|
+
# is longer than one hour, the session for Amazon Web Services account
|
2205
|
+
# owners defaults to one hour.
|
2105
2206
|
#
|
2106
2207
|
# @option params [String] :serial_number
|
2107
2208
|
# The identification number of the MFA device that is associated with
|
@@ -2110,8 +2211,8 @@ module Aws::STS
|
|
2110
2211
|
# The value is either the serial number for a hardware device (such as
|
2111
2212
|
# `GAHT12345678`) or an Amazon Resource Name (ARN) for a virtual device
|
2112
2213
|
# (such as `arn:aws:iam::123456789012:mfa/user`). You can find the
|
2113
|
-
# device for an IAM user by going to the
|
2114
|
-
# viewing the user's security credentials.
|
2214
|
+
# device for an IAM user by going to the Amazon Web Services Management
|
2215
|
+
# Console and viewing the user's security credentials.
|
2115
2216
|
#
|
2116
2217
|
# The regex used to validate this parameter is a string of characters
|
2117
2218
|
# consisting of upper- and lower-case alphanumeric characters with no
|
@@ -2189,7 +2290,7 @@ module Aws::STS
|
|
2189
2290
|
params: params,
|
2190
2291
|
config: config)
|
2191
2292
|
context[:gem_name] = 'aws-sdk-core'
|
2192
|
-
context[:gem_version] = '3.
|
2293
|
+
context[:gem_version] = '3.130.2'
|
2193
2294
|
Seahorse::Client::Request.new(handlers, context)
|
2194
2295
|
end
|
2195
2296
|
|