aws-sdk-core 3.100.0 → 3.191.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1815 -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 +28 -0
- data/lib/aws-sdk-core/arn_parser.rb +2 -0
- data/lib/aws-sdk-core/assume_role_credentials.rb +23 -7
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +16 -10
- data/lib/aws-sdk-core/async_client_stubs.rb +2 -0
- data/lib/aws-sdk-core/binary/decode_handler.rb +2 -0
- data/lib/aws-sdk-core/binary/encode_handler.rb +14 -1
- data/lib/aws-sdk-core/binary/event_builder.rb +2 -0
- data/lib/aws-sdk-core/binary/event_parser.rb +2 -0
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +2 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +2 -0
- data/lib/aws-sdk-core/binary.rb +2 -0
- data/lib/aws-sdk-core/client_side_monitoring/publisher.rb +2 -0
- data/lib/aws-sdk-core/client_side_monitoring/request_metrics.rb +2 -0
- data/lib/aws-sdk-core/client_stubs.rb +22 -13
- data/lib/aws-sdk-core/credential_provider.rb +5 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +31 -6
- data/lib/aws-sdk-core/credentials.rb +2 -0
- data/lib/aws-sdk-core/deprecations.rb +2 -0
- data/lib/aws-sdk-core/eager_loader.rb +2 -0
- data/lib/aws-sdk-core/ec2_metadata.rb +238 -0
- data/lib/aws-sdk-core/ecs_credentials.rb +188 -53
- data/lib/aws-sdk-core/endpoint_cache.rb +2 -0
- data/lib/aws-sdk-core/endpoints/condition.rb +41 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +17 -0
- data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +75 -0
- data/lib/aws-sdk-core/endpoints/error_rule.rb +42 -0
- data/lib/aws-sdk-core/endpoints/function.rb +80 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +131 -0
- data/lib/aws-sdk-core/endpoints/reference.rb +31 -0
- data/lib/aws-sdk-core/endpoints/rule.rb +25 -0
- data/lib/aws-sdk-core/endpoints/rule_set.rb +52 -0
- data/lib/aws-sdk-core/endpoints/rules_provider.rb +37 -0
- data/lib/aws-sdk-core/endpoints/templater.rb +58 -0
- data/lib/aws-sdk-core/endpoints/tree_rule.rb +45 -0
- data/lib/aws-sdk-core/endpoints/url.rb +60 -0
- data/lib/aws-sdk-core/endpoints.rb +78 -0
- data/lib/aws-sdk-core/errors.rb +27 -5
- data/lib/aws-sdk-core/event_emitter.rb +2 -0
- data/lib/aws-sdk-core/ini_parser.rb +9 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +167 -38
- data/lib/aws-sdk-core/json/builder.rb +2 -0
- data/lib/aws-sdk-core/json/error_handler.rb +22 -1
- data/lib/aws-sdk-core/json/handler.rb +10 -1
- data/lib/aws-sdk-core/json/json_engine.rb +12 -8
- data/lib/aws-sdk-core/json/oj_engine.rb +35 -6
- data/lib/aws-sdk-core/json/parser.rb +36 -1
- data/lib/aws-sdk-core/json.rb +10 -26
- data/lib/aws-sdk-core/log/formatter.rb +15 -3
- data/lib/aws-sdk-core/log/handler.rb +2 -0
- data/lib/aws-sdk-core/log/param_filter.rb +37 -12
- data/lib/aws-sdk-core/log/param_formatter.rb +2 -0
- data/lib/aws-sdk-core/pageable_response.rb +91 -32
- data/lib/aws-sdk-core/pager.rb +5 -0
- data/lib/aws-sdk-core/param_converter.rb +2 -0
- data/lib/aws-sdk-core/param_validator.rb +56 -6
- data/lib/aws-sdk-core/plugins/api_key.rb +5 -1
- data/lib/aws-sdk-core/plugins/apig_authorizer_token.rb +2 -0
- data/lib/aws-sdk-core/plugins/apig_credentials_configuration.rb +2 -0
- data/lib/aws-sdk-core/plugins/apig_user_agent.rb +2 -0
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +67 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +342 -0
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +3 -0
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +2 -0
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +52 -7
- data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +8 -2
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +8 -6
- data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +2 -0
- data/lib/aws-sdk-core/plugins/global_configuration.rb +2 -0
- data/lib/aws-sdk-core/plugins/helpful_socket_errors.rb +2 -0
- data/lib/aws-sdk-core/plugins/http_checksum.rb +11 -1
- data/lib/aws-sdk-core/plugins/idempotency_token.rb +2 -0
- data/lib/aws-sdk-core/plugins/invocation_id.rb +2 -0
- data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +36 -6
- data/lib/aws-sdk-core/plugins/logging.rb +4 -0
- data/lib/aws-sdk-core/plugins/param_converter.rb +2 -0
- data/lib/aws-sdk-core/plugins/param_validator.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +19 -0
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/query.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +18 -1
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +2 -0
- data/lib/aws-sdk-core/plugins/recursion_detection.rb +38 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +146 -17
- data/lib/aws-sdk-core/plugins/request_compression.rb +217 -0
- data/lib/aws-sdk-core/plugins/response_paging.rb +3 -1
- data/lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb +2 -0
- data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +2 -0
- data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +9 -4
- data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +2 -0
- data/lib/aws-sdk-core/plugins/retry_errors.rb +29 -8
- data/lib/aws-sdk-core/plugins/sign.rb +206 -0
- data/lib/aws-sdk-core/plugins/signature_v2.rb +3 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +30 -31
- data/lib/aws-sdk-core/plugins/stub_responses.rb +10 -1
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +2 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +119 -14
- data/lib/aws-sdk-core/process_credentials.rb +14 -15
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +2 -0
- data/lib/aws-sdk-core/query/handler.rb +2 -0
- data/lib/aws-sdk-core/query/param.rb +2 -0
- data/lib/aws-sdk-core/query/param_builder.rb +2 -0
- data/lib/aws-sdk-core/query/param_list.rb +2 -0
- data/lib/aws-sdk-core/query.rb +2 -0
- data/lib/aws-sdk-core/refreshing_credentials.rb +50 -17
- data/lib/aws-sdk-core/refreshing_token.rb +71 -0
- data/lib/aws-sdk-core/resources/collection.rb +2 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -1
- data/lib/aws-sdk-core/rest/request/body.rb +21 -1
- data/lib/aws-sdk-core/rest/request/builder.rb +2 -0
- data/lib/aws-sdk-core/rest/request/endpoint.rb +2 -0
- data/lib/aws-sdk-core/rest/request/headers.rb +16 -6
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +45 -29
- data/lib/aws-sdk-core/rest/response/body.rb +2 -0
- data/lib/aws-sdk-core/rest/response/headers.rb +6 -3
- data/lib/aws-sdk-core/rest/response/parser.rb +2 -0
- data/lib/aws-sdk-core/rest/response/status_code.rb +2 -0
- data/lib/aws-sdk-core/rest.rb +2 -0
- data/lib/aws-sdk-core/shared_config.rb +163 -8
- data/lib/aws-sdk-core/shared_credentials.rb +9 -1
- data/lib/aws-sdk-core/sso_credentials.rb +172 -0
- data/lib/aws-sdk-core/sso_token_provider.rb +135 -0
- data/lib/aws-sdk-core/static_token_provider.rb +14 -0
- data/lib/aws-sdk-core/structure.rb +19 -6
- data/lib/aws-sdk-core/stubbing/data_applicator.rb +2 -0
- data/lib/aws-sdk-core/stubbing/empty_stub.rb +2 -0
- data/lib/aws-sdk-core/stubbing/protocols/api_gateway.rb +2 -0
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +2 -0
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +3 -1
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +2 -0
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +3 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +3 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +2 -2
- data/lib/aws-sdk-core/stubbing/stub_data.rb +13 -0
- data/lib/aws-sdk-core/stubbing/xml_error.rb +2 -0
- data/lib/aws-sdk-core/token.rb +31 -0
- data/lib/aws-sdk-core/token_provider.rb +15 -0
- data/lib/aws-sdk-core/token_provider_chain.rb +51 -0
- data/lib/aws-sdk-core/type_builder.rb +2 -0
- data/lib/aws-sdk-core/util.rb +2 -0
- data/lib/aws-sdk-core/waiters/errors.rb +2 -0
- data/lib/aws-sdk-core/waiters/poller.rb +6 -2
- data/lib/aws-sdk-core/waiters/waiter.rb +2 -0
- data/lib/aws-sdk-core/waiters.rb +2 -0
- data/lib/aws-sdk-core/xml/builder.rb +4 -2
- data/lib/aws-sdk-core/xml/default_list.rb +2 -0
- data/lib/aws-sdk-core/xml/default_map.rb +2 -0
- data/lib/aws-sdk-core/xml/doc_builder.rb +8 -1
- data/lib/aws-sdk-core/xml/error_handler.rb +9 -0
- data/lib/aws-sdk-core/xml/parser/engines/libxml.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/engines/oga.rb +4 -0
- data/lib/aws-sdk-core/xml/parser/engines/ox.rb +3 -1
- data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/frame.rb +25 -0
- data/lib/aws-sdk-core/xml/parser/parsing_error.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core/xml/parser.rb +7 -0
- data/lib/aws-sdk-core/xml.rb +2 -0
- data/lib/aws-sdk-core.rb +29 -3
- data/lib/aws-sdk-sso/client.rb +630 -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/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-sso/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-sso/endpoints.rb +72 -0
- data/lib/aws-sdk-sso/errors.rb +102 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +78 -0
- data/lib/aws-sdk-sso/resource.rb +26 -0
- data/lib/aws-sdk-sso/types.rb +317 -0
- data/lib/aws-sdk-sso.rb +59 -0
- data/lib/aws-sdk-ssooidc/client.rb +935 -0
- data/lib/aws-sdk-ssooidc/client_api.rb +271 -0
- data/lib/aws-sdk-ssooidc/customizations.rb +1 -0
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-ssooidc/endpoints.rb +72 -0
- data/lib/aws-sdk-ssooidc/errors.rb +321 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +78 -0
- data/lib/aws-sdk-ssooidc/resource.rb +26 -0
- data/lib/aws-sdk-ssooidc/types.rb +755 -0
- data/lib/aws-sdk-ssooidc.rb +59 -0
- data/lib/aws-sdk-sts/client.rb +655 -490
- data/lib/aws-sdk-sts/client_api.rb +21 -2
- data/lib/aws-sdk-sts/customizations.rb +2 -0
- data/lib/aws-sdk-sts/endpoint_parameters.rb +78 -0
- data/lib/aws-sdk-sts/endpoint_provider.rb +112 -0
- data/lib/aws-sdk-sts/endpoints.rb +136 -0
- data/lib/aws-sdk-sts/errors.rb +3 -1
- data/lib/aws-sdk-sts/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +7 -1
- data/lib/aws-sdk-sts/presigner.rb +16 -10
- data/lib/aws-sdk-sts/resource.rb +3 -1
- data/lib/aws-sdk-sts/types.rb +416 -316
- data/lib/aws-sdk-sts.rb +14 -3
- data/lib/seahorse/client/async_base.rb +2 -1
- data/lib/seahorse/client/async_response.rb +2 -0
- data/lib/seahorse/client/base.rb +3 -0
- data/lib/seahorse/client/block_io.rb +5 -2
- data/lib/seahorse/client/configuration.rb +7 -5
- data/lib/seahorse/client/events.rb +2 -0
- data/lib/seahorse/client/h2/connection.rb +29 -24
- data/lib/seahorse/client/h2/handler.rb +6 -5
- data/lib/seahorse/client/handler.rb +2 -0
- data/lib/seahorse/client/handler_builder.rb +2 -0
- data/lib/seahorse/client/handler_list.rb +2 -0
- data/lib/seahorse/client/handler_list_entry.rb +2 -0
- data/lib/seahorse/client/http/async_response.rb +2 -0
- data/lib/seahorse/client/http/headers.rb +2 -0
- data/lib/seahorse/client/http/request.rb +2 -0
- data/lib/seahorse/client/http/response.rb +3 -1
- data/lib/seahorse/client/logging/formatter.rb +2 -0
- data/lib/seahorse/client/logging/handler.rb +2 -0
- data/lib/seahorse/client/managed_file.rb +2 -0
- data/lib/seahorse/client/net_http/connection_pool.rb +12 -4
- data/lib/seahorse/client/net_http/handler.rb +19 -8
- data/lib/seahorse/client/net_http/patches.rb +14 -86
- data/lib/seahorse/client/networking_error.rb +2 -0
- data/lib/seahorse/client/plugin.rb +3 -0
- data/lib/seahorse/client/plugin_list.rb +2 -0
- data/lib/seahorse/client/plugins/content_length.rb +13 -5
- data/lib/seahorse/client/plugins/endpoint.rb +2 -0
- data/lib/seahorse/client/plugins/h2.rb +9 -4
- data/lib/seahorse/client/plugins/logging.rb +2 -0
- data/lib/seahorse/client/plugins/net_http.rb +39 -3
- data/lib/seahorse/client/plugins/operation_methods.rb +2 -0
- data/lib/seahorse/client/plugins/raise_response_errors.rb +2 -0
- data/lib/seahorse/client/plugins/request_callback.rb +141 -0
- data/lib/seahorse/client/plugins/response_target.rb +8 -8
- data/lib/seahorse/client/request.rb +2 -0
- data/lib/seahorse/client/request_context.rb +2 -0
- data/lib/seahorse/client/response.rb +8 -0
- data/lib/seahorse/model/api.rb +2 -0
- data/lib/seahorse/model/authorizer.rb +2 -0
- data/lib/seahorse/model/operation.rb +8 -0
- data/lib/seahorse/model/shapes.rb +27 -0
- data/lib/seahorse/util.rb +12 -1
- data/lib/seahorse/version.rb +2 -0
- data/lib/seahorse.rb +3 -0
- data/sig/aws-sdk-core/client_stubs.rbs +10 -0
- data/sig/aws-sdk-core/errors.rbs +22 -0
- data/sig/aws-sdk-core/resources/collection.rbs +21 -0
- data/sig/aws-sdk-core/structure.rbs +4 -0
- data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
- data/sig/aws-sdk-core.rbs +7 -0
- data/sig/seahorse/client/base.rbs +25 -0
- data/sig/seahorse/client/handler_builder.rbs +16 -0
- data/sig/seahorse/client/response.rbs +61 -0
- metadata +93 -19
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
4
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
5
7
|
#
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
7
9
|
|
@@ -25,7 +27,11 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
25
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
28
|
-
require 'aws-sdk-core/plugins/
|
30
|
+
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
32
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
33
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
34
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
29
35
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
30
36
|
require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
|
31
37
|
|
@@ -72,9 +78,14 @@ module Aws::STS
|
|
72
78
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
73
79
|
add_plugin(Aws::Plugins::TransferEncoding)
|
74
80
|
add_plugin(Aws::Plugins::HttpChecksum)
|
75
|
-
add_plugin(Aws::Plugins::
|
81
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
82
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
83
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
84
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
85
|
+
add_plugin(Aws::Plugins::Sign)
|
76
86
|
add_plugin(Aws::Plugins::Protocols::Query)
|
77
87
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
88
|
+
add_plugin(Aws::STS::Plugins::Endpoints)
|
78
89
|
|
79
90
|
# @overload initialize(options)
|
80
91
|
# @param [Hash] options
|
@@ -85,13 +96,28 @@ module Aws::STS
|
|
85
96
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
86
97
|
# credentials.
|
87
98
|
#
|
99
|
+
# * `Aws::SharedCredentials` - Used for loading static credentials from a
|
100
|
+
# shared file, such as `~/.aws/config`.
|
101
|
+
#
|
102
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
103
|
+
#
|
104
|
+
# * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
|
105
|
+
# assume a role after providing credentials via the web.
|
106
|
+
#
|
107
|
+
# * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
|
108
|
+
# access token generated from `aws login`.
|
109
|
+
#
|
110
|
+
# * `Aws::ProcessCredentials` - Used for loading credentials from a
|
111
|
+
# process that outputs to stdout.
|
112
|
+
#
|
88
113
|
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
89
114
|
# from an EC2 IMDS on an EC2 instance.
|
90
115
|
#
|
91
|
-
# * `Aws::
|
92
|
-
#
|
116
|
+
# * `Aws::ECSCredentials` - Used for loading credentials from
|
117
|
+
# instances running in ECS.
|
93
118
|
#
|
94
|
-
# * `Aws::
|
119
|
+
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
120
|
+
# from the Cognito Identity service.
|
95
121
|
#
|
96
122
|
# When `:credentials` are not configured directly, the following
|
97
123
|
# locations will be searched for credentials:
|
@@ -101,10 +127,12 @@ module Aws::STS
|
|
101
127
|
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
102
128
|
# * `~/.aws/credentials`
|
103
129
|
# * `~/.aws/config`
|
104
|
-
# * EC2 IMDS instance profile - When used by default, the timeouts
|
105
|
-
# very aggressive. Construct and pass an instance of
|
106
|
-
# `Aws::InstanceProfileCredentails`
|
107
|
-
# timeouts.
|
130
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
131
|
+
# are very aggressive. Construct and pass an instance of
|
132
|
+
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
133
|
+
# enable retries and extended timeouts. Instance profile credential
|
134
|
+
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
135
|
+
# to true.
|
108
136
|
#
|
109
137
|
# @option options [required, String] :region
|
110
138
|
# The AWS region to connect to. The configured `:region` is
|
@@ -158,10 +186,18 @@ module Aws::STS
|
|
158
186
|
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
159
187
|
# a clock skew correction and retry requests with skewed client clocks.
|
160
188
|
#
|
189
|
+
# @option options [String] :defaults_mode ("legacy")
|
190
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
191
|
+
# accepted modes and the configuration defaults that are included.
|
192
|
+
#
|
161
193
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
162
194
|
# Set to true to disable SDK automatically adding host prefix
|
163
195
|
# to default service endpoint when available.
|
164
196
|
#
|
197
|
+
# @option options [Boolean] :disable_request_compression (false)
|
198
|
+
# When set to 'true' the request body will not be compressed
|
199
|
+
# for supported operations.
|
200
|
+
#
|
165
201
|
# @option options [String] :endpoint
|
166
202
|
# The client endpoint is normally constructed from the `:region`
|
167
203
|
# option. You should only configure an `:endpoint` when connecting
|
@@ -182,6 +218,10 @@ module Aws::STS
|
|
182
218
|
# @option options [Boolean] :endpoint_discovery (false)
|
183
219
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
184
220
|
#
|
221
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
222
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
223
|
+
# variables and the shared configuration file.
|
224
|
+
#
|
185
225
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
186
226
|
# The log formatter.
|
187
227
|
#
|
@@ -202,6 +242,11 @@ module Aws::STS
|
|
202
242
|
# Used when loading credentials from the shared credentials file
|
203
243
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
204
244
|
#
|
245
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
246
|
+
# The minimum size in bytes that triggers compression for request
|
247
|
+
# bodies. The value must be non-negative integer value between 0
|
248
|
+
# and 10485780 bytes inclusive.
|
249
|
+
#
|
205
250
|
# @option options [Proc] :retry_backoff
|
206
251
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
207
252
|
# This option is only used in the `legacy` retry mode.
|
@@ -247,6 +292,11 @@ module Aws::STS
|
|
247
292
|
# in the future.
|
248
293
|
#
|
249
294
|
#
|
295
|
+
# @option options [String] :sdk_ua_app_id
|
296
|
+
# A unique and opaque application ID that is appended to the
|
297
|
+
# User-Agent header as app/<sdk_ua_app_id>. It should have a
|
298
|
+
# maximum length of 50.
|
299
|
+
#
|
250
300
|
# @option options [String] :secret_access_key
|
251
301
|
#
|
252
302
|
# @option options [String] :session_token
|
@@ -265,10 +315,35 @@ module Aws::STS
|
|
265
315
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
266
316
|
# requests are made, and retries are disabled.
|
267
317
|
#
|
318
|
+
# @option options [Aws::TokenProvider] :token_provider
|
319
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
320
|
+
# following classes:
|
321
|
+
#
|
322
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
323
|
+
# tokens.
|
324
|
+
#
|
325
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
326
|
+
# access token generated from `aws login`.
|
327
|
+
#
|
328
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
329
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
330
|
+
#
|
331
|
+
# @option options [Boolean] :use_dualstack_endpoint
|
332
|
+
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
333
|
+
# will be used if available.
|
334
|
+
#
|
335
|
+
# @option options [Boolean] :use_fips_endpoint
|
336
|
+
# When set to `true`, fips compatible endpoints will be used if available.
|
337
|
+
# When a `fips` region is used, the region is normalized and this config
|
338
|
+
# is set to `true`.
|
339
|
+
#
|
268
340
|
# @option options [Boolean] :validate_params (true)
|
269
341
|
# When `true`, request parameters are validated before
|
270
342
|
# sending the request.
|
271
343
|
#
|
344
|
+
# @option options [Aws::STS::EndpointProvider] :endpoint_provider
|
345
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::STS::EndpointParameters`
|
346
|
+
#
|
272
347
|
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
273
348
|
# requests through. Formatted like 'http://proxy.com:123'.
|
274
349
|
#
|
@@ -276,7 +351,7 @@ module Aws::STS
|
|
276
351
|
# seconds to wait when opening a HTTP session before raising a
|
277
352
|
# `Timeout::Error`.
|
278
353
|
#
|
279
|
-
# @option options [
|
354
|
+
# @option options [Float] :http_read_timeout (60) The default
|
280
355
|
# number of seconds to wait for response data. This value can
|
281
356
|
# safely be set per-request on the session.
|
282
357
|
#
|
@@ -292,6 +367,9 @@ module Aws::STS
|
|
292
367
|
# disables this behaviour. This value can safely be set per
|
293
368
|
# request on the session.
|
294
369
|
#
|
370
|
+
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
371
|
+
# in seconds.
|
372
|
+
#
|
295
373
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
296
374
|
# HTTP debug output will be sent to the `:logger`.
|
297
375
|
#
|
@@ -318,119 +396,100 @@ module Aws::STS
|
|
318
396
|
# @!group API Operations
|
319
397
|
|
320
398
|
# Returns a set of temporary security credentials that you can use to
|
321
|
-
# access
|
322
|
-
#
|
323
|
-
#
|
324
|
-
#
|
325
|
-
#
|
326
|
-
#
|
327
|
-
# STS API operations][2] in the *IAM User Guide*.
|
328
|
-
#
|
329
|
-
# You cannot use AWS account root user credentials to call `AssumeRole`.
|
330
|
-
# You must use credentials for an IAM user or an IAM role to call
|
331
|
-
# `AssumeRole`.
|
332
|
-
#
|
333
|
-
# For cross-account access, imagine that you own multiple accounts and
|
334
|
-
# need to access resources in each account. You could create long-term
|
335
|
-
# credentials in each account to access those resources. However,
|
336
|
-
# managing all those credentials and remembering which one can access
|
337
|
-
# which account can be time consuming. Instead, you can create one set
|
338
|
-
# of long-term credentials in one account. Then use temporary security
|
339
|
-
# credentials to access all the other accounts by assuming roles in
|
340
|
-
# those accounts. For more information about roles, see [IAM Roles][3]
|
341
|
-
# in the *IAM User Guide*.
|
342
|
-
#
|
343
|
-
# **Session Duration**
|
344
|
-
#
|
345
|
-
# By default, the temporary security credentials created by `AssumeRole`
|
346
|
-
# last for one hour. However, you can use the optional `DurationSeconds`
|
347
|
-
# parameter to specify the duration of your session. You can provide a
|
348
|
-
# value from 900 seconds (15 minutes) up to the maximum session duration
|
349
|
-
# setting for the role. This setting can have a value from 1 hour to 12
|
350
|
-
# hours. To learn how to view the maximum value for your role, see [View
|
351
|
-
# the Maximum Session Duration Setting for a Role][4] in the *IAM User
|
352
|
-
# Guide*. The maximum session duration limit applies when you use the
|
353
|
-
# `AssumeRole*` API operations or the `assume-role*` CLI commands.
|
354
|
-
# However the limit does not apply when you use those operations to
|
355
|
-
# create a console URL. For more information, see [Using IAM Roles][5]
|
356
|
-
# in the *IAM User Guide*.
|
399
|
+
# access Amazon Web Services resources. These temporary credentials
|
400
|
+
# consist of an access key ID, a secret access key, and a security
|
401
|
+
# token. Typically, you use `AssumeRole` within your account or for
|
402
|
+
# cross-account access. For a comparison of `AssumeRole` with other API
|
403
|
+
# operations that produce temporary credentials, see [Requesting
|
404
|
+
# Temporary Security Credentials][1] and [Comparing the Amazon Web
|
405
|
+
# Services STS API operations][2] in the *IAM User Guide*.
|
357
406
|
#
|
358
407
|
# **Permissions**
|
359
408
|
#
|
360
409
|
# The temporary security credentials created by `AssumeRole` can be used
|
361
|
-
# to make API calls to any
|
362
|
-
# cannot call the
|
363
|
-
# operations.
|
410
|
+
# to make API calls to any Amazon Web Services service with the
|
411
|
+
# following exception: You cannot call the Amazon Web Services STS
|
412
|
+
# `GetFederationToken` or `GetSessionToken` API operations.
|
364
413
|
#
|
365
|
-
# (Optional) You can pass inline or managed [session policies][
|
414
|
+
# (Optional) You can pass inline or managed [session policies][3] to
|
366
415
|
# this operation. You can pass a single JSON policy document to use as
|
367
|
-
# an inline session policy. You can also specify up to 10 managed
|
368
|
-
#
|
369
|
-
# use for both inline and managed session policies
|
370
|
-
# characters. Passing policies to this operation
|
371
|
-
# credentials. The resulting session's
|
372
|
-
# of the role's identity-based policy
|
373
|
-
#
|
374
|
-
#
|
375
|
-
#
|
416
|
+
# an inline session policy. You can also specify up to 10 managed policy
|
417
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
418
|
+
# plaintext that you use for both inline and managed session policies
|
419
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
420
|
+
# returns new temporary credentials. The resulting session's
|
421
|
+
# permissions are the intersection of the role's identity-based policy
|
422
|
+
# and the session policies. You can use the role's temporary
|
423
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
424
|
+
# resources in the account that owns the role. You cannot use session
|
425
|
+
# policies to grant more permissions than those allowed by the
|
376
426
|
# identity-based policy of the role that is being assumed. For more
|
377
|
-
# information, see [Session Policies][
|
427
|
+
# information, see [Session Policies][3] in the *IAM User Guide*.
|
378
428
|
#
|
379
|
-
#
|
380
|
-
#
|
381
|
-
#
|
382
|
-
#
|
429
|
+
# When you create a role, you create two policies: a role trust policy
|
430
|
+
# that specifies *who* can assume the role, and a permissions policy
|
431
|
+
# that specifies *what* can be done with the role. You specify the
|
432
|
+
# trusted principal that is allowed to assume the role in the role trust
|
433
|
+
# policy.
|
434
|
+
#
|
435
|
+
# To assume a role from a different account, your Amazon Web Services
|
436
|
+
# account must be trusted by the role. The trust relationship is defined
|
437
|
+
# in the role's trust policy when the role is created. That trust
|
438
|
+
# policy states which accounts are allowed to delegate that access to
|
439
|
+
# users in the account.
|
383
440
|
#
|
384
441
|
# A user who wants to access a role in a different account must also
|
385
|
-
# have permissions that are delegated from the
|
386
|
-
#
|
387
|
-
#
|
388
|
-
#
|
389
|
-
#
|
442
|
+
# have permissions that are delegated from the account administrator.
|
443
|
+
# The administrator must attach a policy that allows the user to call
|
444
|
+
# `AssumeRole` for the ARN of the role in the other account.
|
445
|
+
#
|
446
|
+
# To allow a user to assume a role in the same account, you can do
|
447
|
+
# either of the following:
|
390
448
|
#
|
391
|
-
# * Attach a policy to the user
|
392
|
-
#
|
449
|
+
# * Attach a policy to the user that allows the user to call
|
450
|
+
# `AssumeRole` (as long as the role's trust policy trusts the
|
451
|
+
# account).
|
393
452
|
#
|
394
453
|
# * Add the user as a principal directly in the role's trust policy.
|
395
454
|
#
|
396
|
-
#
|
397
|
-
#
|
398
|
-
#
|
399
|
-
#
|
400
|
-
# Guide*.
|
455
|
+
# You can do either because the role’s trust policy acts as an IAM
|
456
|
+
# resource-based policy. When a resource-based policy grants access to a
|
457
|
+
# principal in the same account, no additional identity-based policy is
|
458
|
+
# required. For more information about trust policies and resource-based
|
459
|
+
# policies, see [IAM Policies][4] in the *IAM User Guide*.
|
401
460
|
#
|
402
461
|
# **Tags**
|
403
462
|
#
|
404
463
|
# (Optional) You can pass tag key-value pairs to your session. These
|
405
464
|
# tags are called session tags. For more information about session tags,
|
406
|
-
# see [Passing Session Tags in STS][
|
465
|
+
# see [Passing Session Tags in STS][5] in the *IAM User Guide*.
|
407
466
|
#
|
408
467
|
# An administrator must grant you the permissions necessary to pass
|
409
468
|
# session tags. The administrator can also create granular permissions
|
410
469
|
# to allow you to pass only specific session tags. For more information,
|
411
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
470
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][6] in
|
412
471
|
# the *IAM User Guide*.
|
413
472
|
#
|
414
473
|
# You can set the session tags as transitive. Transitive tags persist
|
415
474
|
# during role chaining. For more information, see [Chaining Roles with
|
416
|
-
# Session Tags][
|
475
|
+
# Session Tags][7] in the *IAM User Guide*.
|
417
476
|
#
|
418
477
|
# **Using MFA with AssumeRole**
|
419
478
|
#
|
420
479
|
# (Optional) You can include multi-factor authentication (MFA)
|
421
480
|
# information when you call `AssumeRole`. This is useful for
|
422
481
|
# cross-account scenarios to ensure that the user that assumes the role
|
423
|
-
# has been authenticated with an
|
424
|
-
# trust policy of the role being assumed includes a
|
425
|
-
# for MFA authentication. If the caller does not
|
426
|
-
# information, the request to assume the role is
|
427
|
-
# in a trust policy that tests for MFA
|
428
|
-
# the following example.
|
482
|
+
# has been authenticated with an Amazon Web Services MFA device. In that
|
483
|
+
# scenario, the trust policy of the role being assumed includes a
|
484
|
+
# condition that tests for MFA authentication. If the caller does not
|
485
|
+
# include valid MFA information, the request to assume the role is
|
486
|
+
# denied. The condition in a trust policy that tests for MFA
|
487
|
+
# authentication might look like the following example.
|
429
488
|
#
|
430
489
|
# `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
|
431
490
|
#
|
432
|
-
# For more information, see [Configuring MFA-Protected API Access][
|
433
|
-
#
|
491
|
+
# For more information, see [Configuring MFA-Protected API Access][8] in
|
492
|
+
# the *IAM User Guide* guide.
|
434
493
|
#
|
435
494
|
# To use MFA with `AssumeRole`, you pass values for the `SerialNumber`
|
436
495
|
# and `TokenCode` parameters. The `SerialNumber` value identifies the
|
@@ -441,15 +500,12 @@ module Aws::STS
|
|
441
500
|
#
|
442
501
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
443
502
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
444
|
-
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
445
|
-
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
446
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
447
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
448
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
449
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
450
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
451
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
452
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
|
503
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
504
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
505
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
506
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
507
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
508
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
|
453
509
|
#
|
454
510
|
# @option params [required, String] :role_arn
|
455
511
|
# The Amazon Resource Name (ARN) of the role to assume.
|
@@ -464,7 +520,7 @@ module Aws::STS
|
|
464
520
|
# also used in the ARN of the assumed role principal. This means that
|
465
521
|
# subsequent cross-account API requests that use the temporary security
|
466
522
|
# credentials will expose the role session name to the external account
|
467
|
-
# in their
|
523
|
+
# in their CloudTrail logs.
|
468
524
|
#
|
469
525
|
# The regex used to validate this parameter is a string of characters
|
470
526
|
# consisting of upper- and lower-case alphanumeric characters with no
|
@@ -477,28 +533,29 @@ module Aws::STS
|
|
477
533
|
# the same account as the role.
|
478
534
|
#
|
479
535
|
# This parameter is optional. You can provide up to 10 managed policy
|
480
|
-
# ARNs. However, the
|
536
|
+
# ARNs. However, the plaintext that you use for both inline and managed
|
481
537
|
# session policies can't exceed 2,048 characters. For more information
|
482
|
-
# about ARNs, see [Amazon Resource Names (ARNs) and
|
483
|
-
# Namespaces][1] in the
|
538
|
+
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
539
|
+
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
484
540
|
#
|
485
|
-
# <note markdown="1"> An
|
486
|
-
#
|
487
|
-
#
|
488
|
-
# other requirements. The
|
489
|
-
# by percentage how close
|
490
|
-
# the upper size limit.
|
541
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
542
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
543
|
+
# format that has a separate limit. Your request can fail for this limit
|
544
|
+
# even if your plaintext meets the other requirements. The
|
545
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
546
|
+
# the policies and tags for your request are to the upper size limit.
|
491
547
|
#
|
492
548
|
# </note>
|
493
549
|
#
|
494
550
|
# Passing policies to this operation returns new temporary credentials.
|
495
551
|
# The resulting session's permissions are the intersection of the
|
496
552
|
# role's identity-based policy and the session policies. You can use
|
497
|
-
# the role's temporary credentials in subsequent
|
498
|
-
# access resources in the account that owns the role. You
|
499
|
-
# session policies to grant more permissions than those
|
500
|
-
# identity-based policy of the role that is being
|
501
|
-
# information, see [Session Policies][2] in the *IAM
|
553
|
+
# the role's temporary credentials in subsequent Amazon Web Services
|
554
|
+
# API calls to access resources in the account that owns the role. You
|
555
|
+
# cannot use session policies to grant more permissions than those
|
556
|
+
# allowed by the identity-based policy of the role that is being
|
557
|
+
# assumed. For more information, see [Session Policies][2] in the *IAM
|
558
|
+
# User Guide*.
|
502
559
|
#
|
503
560
|
#
|
504
561
|
#
|
@@ -513,25 +570,25 @@ module Aws::STS
|
|
513
570
|
# new temporary credentials. The resulting session's permissions are
|
514
571
|
# the intersection of the role's identity-based policy and the session
|
515
572
|
# policies. You can use the role's temporary credentials in subsequent
|
516
|
-
#
|
517
|
-
# You cannot use session policies to grant more
|
518
|
-
# allowed by the identity-based policy of the
|
519
|
-
# assumed. For more information, see [Session
|
520
|
-
# User Guide*.
|
573
|
+
# Amazon Web Services API calls to access resources in the account that
|
574
|
+
# owns the role. You cannot use session policies to grant more
|
575
|
+
# permissions than those allowed by the identity-based policy of the
|
576
|
+
# role that is being assumed. For more information, see [Session
|
577
|
+
# Policies][1] in the *IAM User Guide*.
|
521
578
|
#
|
522
|
-
# The
|
579
|
+
# The plaintext that you use for both inline and managed session
|
523
580
|
# policies can't exceed 2,048 characters. The JSON policy characters
|
524
581
|
# can be any ASCII character from the space character to the end of the
|
525
582
|
# valid character list (\\u0020 through \\u00FF). It can also include
|
526
583
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
527
584
|
# characters.
|
528
585
|
#
|
529
|
-
# <note markdown="1"> An
|
530
|
-
#
|
531
|
-
#
|
532
|
-
# other requirements. The
|
533
|
-
# by percentage how close
|
534
|
-
# the upper size limit.
|
586
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
587
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
588
|
+
# format that has a separate limit. Your request can fail for this limit
|
589
|
+
# even if your plaintext meets the other requirements. The
|
590
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
591
|
+
# the policies and tags for your request are to the upper size limit.
|
535
592
|
#
|
536
593
|
# </note>
|
537
594
|
#
|
@@ -540,15 +597,26 @@ module Aws::STS
|
|
540
597
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
541
598
|
#
|
542
599
|
# @option params [Integer] :duration_seconds
|
543
|
-
# The duration, in seconds, of the role session. The value can
|
544
|
-
# from 900 seconds (15 minutes) up to the maximum session duration
|
545
|
-
#
|
546
|
-
# hours. If you specify a value higher than this
|
547
|
-
#
|
548
|
-
#
|
549
|
-
#
|
550
|
-
#
|
551
|
-
#
|
600
|
+
# The duration, in seconds, of the role session. The value specified can
|
601
|
+
# range from 900 seconds (15 minutes) up to the maximum session duration
|
602
|
+
# set for the role. The maximum session duration setting can have a
|
603
|
+
# value from 1 hour to 12 hours. If you specify a value higher than this
|
604
|
+
# setting or the administrator setting (whichever is lower), the
|
605
|
+
# operation fails. For example, if you specify a session duration of 12
|
606
|
+
# hours, but your administrator set the maximum session duration to 6
|
607
|
+
# hours, your operation fails.
|
608
|
+
#
|
609
|
+
# Role chaining limits your Amazon Web Services CLI or Amazon Web
|
610
|
+
# Services API role session to a maximum of one hour. When you use the
|
611
|
+
# `AssumeRole` API operation to assume a role, you can specify the
|
612
|
+
# duration of your role session with the `DurationSeconds` parameter.
|
613
|
+
# You can specify a parameter value of up to 43200 seconds (12 hours),
|
614
|
+
# depending on the maximum session duration setting for your role.
|
615
|
+
# However, if you assume a role using role chaining and provide a
|
616
|
+
# `DurationSeconds` parameter value greater than one hour, the operation
|
617
|
+
# fails. To learn how to view the maximum value for your role, see [View
|
618
|
+
# the Maximum Session Duration Setting for a Role][1] in the *IAM User
|
619
|
+
# Guide*.
|
552
620
|
#
|
553
621
|
# By default, the value is set to `3600` seconds.
|
554
622
|
#
|
@@ -557,8 +625,8 @@ module Aws::STS
|
|
557
625
|
# The request to the federation endpoint for a console sign-in token
|
558
626
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
559
627
|
# of the console session. For more information, see [Creating a URL that
|
560
|
-
# Enables Federated Users to Access the
|
561
|
-
# the *IAM User Guide*.
|
628
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
629
|
+
# Console][2] in the *IAM User Guide*.
|
562
630
|
#
|
563
631
|
# </note>
|
564
632
|
#
|
@@ -570,20 +638,20 @@ module Aws::STS
|
|
570
638
|
# @option params [Array<Types::Tag>] :tags
|
571
639
|
# A list of session tags that you want to pass. Each session tag
|
572
640
|
# consists of a key name and an associated value. For more information
|
573
|
-
# about session tags, see [Tagging
|
574
|
-
# Guide*.
|
641
|
+
# about session tags, see [Tagging Amazon Web Services STS Sessions][1]
|
642
|
+
# in the *IAM User Guide*.
|
575
643
|
#
|
576
644
|
# This parameter is optional. You can pass up to 50 session tags. The
|
577
|
-
#
|
578
|
-
#
|
579
|
-
#
|
645
|
+
# plaintext session tag keys can’t exceed 128 characters, and the values
|
646
|
+
# can’t exceed 256 characters. For these and additional limits, see [IAM
|
647
|
+
# and STS Character Limits][2] in the *IAM User Guide*.
|
580
648
|
#
|
581
|
-
# <note markdown="1"> An
|
582
|
-
#
|
583
|
-
#
|
584
|
-
# other requirements. The
|
585
|
-
# by percentage how close
|
586
|
-
# the upper size limit.
|
649
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
650
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
651
|
+
# format that has a separate limit. Your request can fail for this limit
|
652
|
+
# even if your plaintext meets the other requirements. The
|
653
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
654
|
+
# the policies and tags for your request are to the upper size limit.
|
587
655
|
#
|
588
656
|
# </note>
|
589
657
|
#
|
@@ -602,14 +670,14 @@ module Aws::STS
|
|
602
670
|
# operation, the new session inherits any transitive session tags from
|
603
671
|
# the calling session. If you pass a session tag with the same key as an
|
604
672
|
# inherited tag, the operation fails. To view the inherited tags for a
|
605
|
-
# session, see the
|
606
|
-
#
|
673
|
+
# session, see the CloudTrail logs. For more information, see [Viewing
|
674
|
+
# Session Tags in CloudTrail][3] in the *IAM User Guide*.
|
607
675
|
#
|
608
676
|
#
|
609
677
|
#
|
610
678
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
611
679
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
612
|
-
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
680
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs
|
613
681
|
#
|
614
682
|
# @option params [Array<String>] :transitive_tag_keys
|
615
683
|
# A list of keys for session tags that you want to set as transitive. If
|
@@ -639,7 +707,8 @@ module Aws::STS
|
|
639
707
|
# trusted account. That way, only someone with the ID can assume the
|
640
708
|
# role, rather than everyone in the account. For more information about
|
641
709
|
# the external ID, see [How to Use an External ID When Granting Access
|
642
|
-
# to Your
|
710
|
+
# to Your Amazon Web Services Resources to a Third Party][1] in the *IAM
|
711
|
+
# User Guide*.
|
643
712
|
#
|
644
713
|
# The regex used to validate this parameter is a string of characters
|
645
714
|
# consisting of upper- and lower-case alphanumeric characters with no
|
@@ -666,7 +735,7 @@ module Aws::STS
|
|
666
735
|
#
|
667
736
|
# @option params [String] :token_code
|
668
737
|
# The value provided by the MFA device, if the trust policy of the role
|
669
|
-
# being assumed requires MFA (
|
738
|
+
# being assumed requires MFA. (In other words, if the policy includes a
|
670
739
|
# condition that tests for MFA). If the role being assumed requires MFA
|
671
740
|
# and if the `TokenCode` value is missing or expired, the `AssumeRole`
|
672
741
|
# call returns an "access denied" error.
|
@@ -674,11 +743,46 @@ module Aws::STS
|
|
674
743
|
# The format for this parameter, as described by its regex pattern, is a
|
675
744
|
# sequence of six numeric digits.
|
676
745
|
#
|
746
|
+
# @option params [String] :source_identity
|
747
|
+
# The source identity specified by the principal that is calling the
|
748
|
+
# `AssumeRole` operation.
|
749
|
+
#
|
750
|
+
# You can require users to specify a source identity when they assume a
|
751
|
+
# role. You do this by using the `sts:SourceIdentity` condition key in a
|
752
|
+
# role trust policy. You can use source identity information in
|
753
|
+
# CloudTrail logs to determine who took actions with a role. You can use
|
754
|
+
# the `aws:SourceIdentity` condition key to further control access to
|
755
|
+
# Amazon Web Services resources based on the value of source identity.
|
756
|
+
# For more information about using source identity, see [Monitor and
|
757
|
+
# control actions taken with assumed roles][1] in the *IAM User Guide*.
|
758
|
+
#
|
759
|
+
# The regex used to validate this parameter is a string of characters
|
760
|
+
# consisting of upper- and lower-case alphanumeric characters with no
|
761
|
+
# spaces. You can also include underscores or any of the following
|
762
|
+
# characters: =,.@-. You cannot use a value that begins with the text
|
763
|
+
# `aws:`. This prefix is reserved for Amazon Web Services internal use.
|
764
|
+
#
|
765
|
+
#
|
766
|
+
#
|
767
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
768
|
+
#
|
769
|
+
# @option params [Array<Types::ProvidedContext>] :provided_contexts
|
770
|
+
# A list of previously acquired trusted context assertions in the format
|
771
|
+
# of a JSON array. The trusted context assertion is signed and encrypted
|
772
|
+
# by Amazon Web Services STS.
|
773
|
+
#
|
774
|
+
# The following is an example of a `ProvidedContext` value that includes
|
775
|
+
# a single trusted context assertion and the ARN of the context provider
|
776
|
+
# from which the trusted context assertion was generated.
|
777
|
+
#
|
778
|
+
# `[\{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"\}]`
|
779
|
+
#
|
677
780
|
# @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
678
781
|
#
|
679
782
|
# * {Types::AssumeRoleResponse#credentials #credentials} => Types::Credentials
|
680
783
|
# * {Types::AssumeRoleResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser
|
681
784
|
# * {Types::AssumeRoleResponse#packed_policy_size #packed_policy_size} => Integer
|
785
|
+
# * {Types::AssumeRoleResponse#source_identity #source_identity} => String
|
682
786
|
#
|
683
787
|
#
|
684
788
|
# @example Example: To assume a role
|
@@ -733,7 +837,7 @@ module Aws::STS
|
|
733
837
|
# arn: "arnType",
|
734
838
|
# },
|
735
839
|
# ],
|
736
|
-
# policy: "
|
840
|
+
# policy: "unrestrictedSessionPolicyDocumentType",
|
737
841
|
# duration_seconds: 1,
|
738
842
|
# tags: [
|
739
843
|
# {
|
@@ -745,6 +849,13 @@ module Aws::STS
|
|
745
849
|
# external_id: "externalIdType",
|
746
850
|
# serial_number: "serialNumberType",
|
747
851
|
# token_code: "tokenCodeType",
|
852
|
+
# source_identity: "sourceIdentityType",
|
853
|
+
# provided_contexts: [
|
854
|
+
# {
|
855
|
+
# provider_arn: "arnType",
|
856
|
+
# context_assertion: "contextAssertionType",
|
857
|
+
# },
|
858
|
+
# ],
|
748
859
|
# })
|
749
860
|
#
|
750
861
|
# @example Response structure
|
@@ -756,6 +867,7 @@ module Aws::STS
|
|
756
867
|
# resp.assumed_role_user.assumed_role_id #=> String
|
757
868
|
# resp.assumed_role_user.arn #=> String
|
758
869
|
# resp.packed_policy_size #=> Integer
|
870
|
+
# resp.source_identity #=> String
|
759
871
|
#
|
760
872
|
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole AWS API Documentation
|
761
873
|
#
|
@@ -769,16 +881,17 @@ module Aws::STS
|
|
769
881
|
# Returns a set of temporary security credentials for users who have
|
770
882
|
# been authenticated via a SAML authentication response. This operation
|
771
883
|
# provides a mechanism for tying an enterprise identity store or
|
772
|
-
# directory to role-based
|
773
|
-
# or configuration. For a comparison of
|
774
|
-
# other API operations that produce
|
775
|
-
# [Requesting Temporary Security
|
776
|
-
#
|
884
|
+
# directory to role-based Amazon Web Services access without
|
885
|
+
# user-specific credentials or configuration. For a comparison of
|
886
|
+
# `AssumeRoleWithSAML` with the other API operations that produce
|
887
|
+
# temporary credentials, see [Requesting Temporary Security
|
888
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
889
|
+
# operations][2] in the *IAM User Guide*.
|
777
890
|
#
|
778
891
|
# The temporary security credentials returned by this operation consist
|
779
892
|
# of an access key ID, a secret access key, and a security token.
|
780
893
|
# Applications can use these temporary security credentials to sign
|
781
|
-
# calls to
|
894
|
+
# calls to Amazon Web Services services.
|
782
895
|
#
|
783
896
|
# **Session Duration**
|
784
897
|
#
|
@@ -798,37 +911,49 @@ module Aws::STS
|
|
798
911
|
# use those operations to create a console URL. For more information,
|
799
912
|
# see [Using IAM Roles][4] in the *IAM User Guide*.
|
800
913
|
#
|
914
|
+
# <note markdown="1"> [Role chaining][5] limits your CLI or Amazon Web Services API role
|
915
|
+
# session to a maximum of one hour. When you use the `AssumeRole` API
|
916
|
+
# operation to assume a role, you can specify the duration of your role
|
917
|
+
# session with the `DurationSeconds` parameter. You can specify a
|
918
|
+
# parameter value of up to 43200 seconds (12 hours), depending on the
|
919
|
+
# maximum session duration setting for your role. However, if you assume
|
920
|
+
# a role using role chaining and provide a `DurationSeconds` parameter
|
921
|
+
# value greater than one hour, the operation fails.
|
922
|
+
#
|
923
|
+
# </note>
|
924
|
+
#
|
801
925
|
# **Permissions**
|
802
926
|
#
|
803
927
|
# The temporary security credentials created by `AssumeRoleWithSAML` can
|
804
|
-
# be used to make API calls to any
|
805
|
-
# exception: you cannot call the STS `GetFederationToken` or
|
928
|
+
# be used to make API calls to any Amazon Web Services service with the
|
929
|
+
# following exception: you cannot call the STS `GetFederationToken` or
|
806
930
|
# `GetSessionToken` API operations.
|
807
931
|
#
|
808
|
-
# (Optional) You can pass inline or managed [session policies][
|
932
|
+
# (Optional) You can pass inline or managed [session policies][6] to
|
809
933
|
# this operation. You can pass a single JSON policy document to use as
|
810
|
-
# an inline session policy. You can also specify up to 10 managed
|
811
|
-
#
|
812
|
-
# use for both inline and managed session policies
|
813
|
-
# characters. Passing policies to this operation
|
814
|
-
# credentials. The resulting session's
|
815
|
-
# of the role's identity-based policy
|
816
|
-
#
|
817
|
-
#
|
818
|
-
#
|
934
|
+
# an inline session policy. You can also specify up to 10 managed policy
|
935
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
936
|
+
# plaintext that you use for both inline and managed session policies
|
937
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
938
|
+
# returns new temporary credentials. The resulting session's
|
939
|
+
# permissions are the intersection of the role's identity-based policy
|
940
|
+
# and the session policies. You can use the role's temporary
|
941
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
942
|
+
# resources in the account that owns the role. You cannot use session
|
943
|
+
# policies to grant more permissions than those allowed by the
|
819
944
|
# identity-based policy of the role that is being assumed. For more
|
820
|
-
# information, see [Session Policies][
|
821
|
-
#
|
822
|
-
# Calling `AssumeRoleWithSAML` does not require the use of
|
823
|
-
# credentials. The identity of the caller is validated
|
824
|
-
# the metadata document that is uploaded for the SAML
|
825
|
-
# for your identity provider.
|
826
|
-
#
|
827
|
-
# Calling `AssumeRoleWithSAML` can result in an entry in your
|
828
|
-
#
|
829
|
-
#
|
830
|
-
#
|
831
|
-
#
|
945
|
+
# information, see [Session Policies][6] in the *IAM User Guide*.
|
946
|
+
#
|
947
|
+
# Calling `AssumeRoleWithSAML` does not require the use of Amazon Web
|
948
|
+
# Services security credentials. The identity of the caller is validated
|
949
|
+
# by using keys in the metadata document that is uploaded for the SAML
|
950
|
+
# provider entity for your identity provider.
|
951
|
+
#
|
952
|
+
# Calling `AssumeRoleWithSAML` can result in an entry in your CloudTrail
|
953
|
+
# logs. The entry includes the value in the `NameID` element of the SAML
|
954
|
+
# assertion. We recommend that you use a `NameIDType` that is not
|
955
|
+
# associated with any personally identifiable information (PII). For
|
956
|
+
# example, you could instead use the persistent identifier
|
832
957
|
# (`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`).
|
833
958
|
#
|
834
959
|
# **Tags**
|
@@ -836,19 +961,19 @@ module Aws::STS
|
|
836
961
|
# (Optional) You can configure your IdP to pass attributes into your
|
837
962
|
# SAML assertion as session tags. Each session tag consists of a key
|
838
963
|
# name and an associated value. For more information about session tags,
|
839
|
-
# see [Passing Session Tags in STS][
|
964
|
+
# see [Passing Session Tags in STS][7] in the *IAM User Guide*.
|
840
965
|
#
|
841
|
-
# You can pass up to 50 session tags. The
|
966
|
+
# You can pass up to 50 session tags. The plaintext session tag keys
|
842
967
|
# can’t exceed 128 characters and the values can’t exceed 256
|
843
968
|
# characters. For these and additional limits, see [IAM and STS
|
844
|
-
# Character Limits][
|
969
|
+
# Character Limits][8] in the *IAM User Guide*.
|
845
970
|
#
|
846
|
-
# <note markdown="1"> An
|
847
|
-
#
|
848
|
-
#
|
849
|
-
# other requirements. The
|
850
|
-
# by percentage how close
|
851
|
-
# the upper size limit.
|
971
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
972
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
973
|
+
# format that has a separate limit. Your request can fail for this limit
|
974
|
+
# even if your plaintext meets the other requirements. The
|
975
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
976
|
+
# the policies and tags for your request are to the upper size limit.
|
852
977
|
#
|
853
978
|
# </note>
|
854
979
|
#
|
@@ -859,32 +984,33 @@ module Aws::STS
|
|
859
984
|
# An administrator must grant you the permissions necessary to pass
|
860
985
|
# session tags. The administrator can also create granular permissions
|
861
986
|
# to allow you to pass only specific session tags. For more information,
|
862
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
987
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][9] in
|
863
988
|
# the *IAM User Guide*.
|
864
989
|
#
|
865
990
|
# You can set the session tags as transitive. Transitive tags persist
|
866
991
|
# during role chaining. For more information, see [Chaining Roles with
|
867
|
-
# Session Tags][
|
992
|
+
# Session Tags][10] in the *IAM User Guide*.
|
868
993
|
#
|
869
994
|
# **SAML Configuration**
|
870
995
|
#
|
871
996
|
# Before your application can call `AssumeRoleWithSAML`, you must
|
872
997
|
# configure your SAML identity provider (IdP) to issue the claims
|
873
|
-
# required by
|
874
|
-
# Management (IAM) to create a SAML provider entity in your
|
875
|
-
# that represents your identity provider.
|
876
|
-
# role that specifies this SAML provider in
|
998
|
+
# required by Amazon Web Services. Additionally, you must use Identity
|
999
|
+
# and Access Management (IAM) to create a SAML provider entity in your
|
1000
|
+
# Amazon Web Services account that represents your identity provider.
|
1001
|
+
# You must also create an IAM role that specifies this SAML provider in
|
1002
|
+
# its trust policy.
|
877
1003
|
#
|
878
1004
|
# For more information, see the following resources:
|
879
1005
|
#
|
880
|
-
# * [About SAML 2.0-based Federation][
|
1006
|
+
# * [About SAML 2.0-based Federation][11] in the *IAM User Guide*.
|
881
1007
|
#
|
882
|
-
# * [Creating SAML Identity Providers][
|
1008
|
+
# * [Creating SAML Identity Providers][12] in the *IAM User Guide*.
|
883
1009
|
#
|
884
|
-
# * [Configuring a Relying Party and Claims][
|
1010
|
+
# * [Configuring a Relying Party and Claims][13] in the *IAM User
|
885
1011
|
# Guide*.
|
886
1012
|
#
|
887
|
-
# * [Creating a Role for SAML 2.0 Federation][
|
1013
|
+
# * [Creating a Role for SAML 2.0 Federation][14] in the *IAM User
|
888
1014
|
# Guide*.
|
889
1015
|
#
|
890
1016
|
#
|
@@ -893,15 +1019,16 @@ module Aws::STS
|
|
893
1019
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
894
1020
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
895
1021
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
896
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
897
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
898
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
899
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
900
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
901
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
902
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
903
|
-
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
904
|
-
# [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1022
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
|
1023
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
1024
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
1025
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
1026
|
+
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
1027
|
+
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
1028
|
+
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
|
1029
|
+
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
|
1030
|
+
# [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
|
1031
|
+
# [14]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
|
905
1032
|
#
|
906
1033
|
# @option params [required, String] :role_arn
|
907
1034
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
@@ -912,7 +1039,7 @@ module Aws::STS
|
|
912
1039
|
# describes the IdP.
|
913
1040
|
#
|
914
1041
|
# @option params [required, String] :saml_assertion
|
915
|
-
# The
|
1042
|
+
# The base64 encoded SAML authentication response provided by the IdP.
|
916
1043
|
#
|
917
1044
|
# For more information, see [Configuring a Relying Party and Adding
|
918
1045
|
# Claims][1] in the *IAM User Guide*.
|
@@ -927,28 +1054,29 @@ module Aws::STS
|
|
927
1054
|
# the same account as the role.
|
928
1055
|
#
|
929
1056
|
# This parameter is optional. You can provide up to 10 managed policy
|
930
|
-
# ARNs. However, the
|
1057
|
+
# ARNs. However, the plaintext that you use for both inline and managed
|
931
1058
|
# session policies can't exceed 2,048 characters. For more information
|
932
|
-
# about ARNs, see [Amazon Resource Names (ARNs) and
|
933
|
-
# Namespaces][1] in the
|
1059
|
+
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
1060
|
+
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
934
1061
|
#
|
935
|
-
# <note markdown="1"> An
|
936
|
-
#
|
937
|
-
#
|
938
|
-
# other requirements. The
|
939
|
-
# by percentage how close
|
940
|
-
# the upper size limit.
|
1062
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1063
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1064
|
+
# format that has a separate limit. Your request can fail for this limit
|
1065
|
+
# even if your plaintext meets the other requirements. The
|
1066
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1067
|
+
# the policies and tags for your request are to the upper size limit.
|
941
1068
|
#
|
942
1069
|
# </note>
|
943
1070
|
#
|
944
1071
|
# Passing policies to this operation returns new temporary credentials.
|
945
1072
|
# The resulting session's permissions are the intersection of the
|
946
1073
|
# role's identity-based policy and the session policies. You can use
|
947
|
-
# the role's temporary credentials in subsequent
|
948
|
-
# access resources in the account that owns the role. You
|
949
|
-
# session policies to grant more permissions than those
|
950
|
-
# identity-based policy of the role that is being
|
951
|
-
# information, see [Session Policies][2] in the *IAM
|
1074
|
+
# the role's temporary credentials in subsequent Amazon Web Services
|
1075
|
+
# API calls to access resources in the account that owns the role. You
|
1076
|
+
# cannot use session policies to grant more permissions than those
|
1077
|
+
# allowed by the identity-based policy of the role that is being
|
1078
|
+
# assumed. For more information, see [Session Policies][2] in the *IAM
|
1079
|
+
# User Guide*.
|
952
1080
|
#
|
953
1081
|
#
|
954
1082
|
#
|
@@ -963,25 +1091,25 @@ module Aws::STS
|
|
963
1091
|
# new temporary credentials. The resulting session's permissions are
|
964
1092
|
# the intersection of the role's identity-based policy and the session
|
965
1093
|
# policies. You can use the role's temporary credentials in subsequent
|
966
|
-
#
|
967
|
-
# You cannot use session policies to grant more
|
968
|
-
# allowed by the identity-based policy of the
|
969
|
-
# assumed. For more information, see [Session
|
970
|
-
# User Guide*.
|
1094
|
+
# Amazon Web Services API calls to access resources in the account that
|
1095
|
+
# owns the role. You cannot use session policies to grant more
|
1096
|
+
# permissions than those allowed by the identity-based policy of the
|
1097
|
+
# role that is being assumed. For more information, see [Session
|
1098
|
+
# Policies][1] in the *IAM User Guide*.
|
971
1099
|
#
|
972
|
-
# The
|
1100
|
+
# The plaintext that you use for both inline and managed session
|
973
1101
|
# policies can't exceed 2,048 characters. The JSON policy characters
|
974
1102
|
# can be any ASCII character from the space character to the end of the
|
975
1103
|
# valid character list (\\u0020 through \\u00FF). It can also include
|
976
1104
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
977
1105
|
# characters.
|
978
1106
|
#
|
979
|
-
# <note markdown="1"> An
|
980
|
-
#
|
981
|
-
#
|
982
|
-
# other requirements. The
|
983
|
-
# by percentage how close
|
984
|
-
# the upper size limit.
|
1107
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1108
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1109
|
+
# format that has a separate limit. Your request can fail for this limit
|
1110
|
+
# even if your plaintext meets the other requirements. The
|
1111
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1112
|
+
# the policies and tags for your request are to the upper size limit.
|
985
1113
|
#
|
986
1114
|
# </note>
|
987
1115
|
#
|
@@ -1010,8 +1138,8 @@ module Aws::STS
|
|
1010
1138
|
# The request to the federation endpoint for a console sign-in token
|
1011
1139
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
1012
1140
|
# of the console session. For more information, see [Creating a URL that
|
1013
|
-
# Enables Federated Users to Access the
|
1014
|
-
# the *IAM User Guide*.
|
1141
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
1142
|
+
# Console][2] in the *IAM User Guide*.
|
1015
1143
|
#
|
1016
1144
|
# </note>
|
1017
1145
|
#
|
@@ -1030,6 +1158,7 @@ module Aws::STS
|
|
1030
1158
|
# * {Types::AssumeRoleWithSAMLResponse#issuer #issuer} => String
|
1031
1159
|
# * {Types::AssumeRoleWithSAMLResponse#audience #audience} => String
|
1032
1160
|
# * {Types::AssumeRoleWithSAMLResponse#name_qualifier #name_qualifier} => String
|
1161
|
+
# * {Types::AssumeRoleWithSAMLResponse#source_identity #source_identity} => String
|
1033
1162
|
#
|
1034
1163
|
#
|
1035
1164
|
# @example Example: To assume a role using a SAML assertion
|
@@ -1090,6 +1219,7 @@ module Aws::STS
|
|
1090
1219
|
# resp.issuer #=> String
|
1091
1220
|
# resp.audience #=> String
|
1092
1221
|
# resp.name_qualifier #=> String
|
1222
|
+
# resp.source_identity #=> String
|
1093
1223
|
#
|
1094
1224
|
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML AWS API Documentation
|
1095
1225
|
#
|
@@ -1102,37 +1232,39 @@ module Aws::STS
|
|
1102
1232
|
|
1103
1233
|
# Returns a set of temporary security credentials for users who have
|
1104
1234
|
# been authenticated in a mobile or web application with a web identity
|
1105
|
-
# provider. Example providers include
|
1106
|
-
# Facebook,
|
1235
|
+
# provider. Example providers include the OAuth 2.0 providers Login with
|
1236
|
+
# Amazon and Facebook, or any OpenID Connect-compatible identity
|
1237
|
+
# provider such as Google or [Amazon Cognito federated identities][1].
|
1107
1238
|
#
|
1108
1239
|
# <note markdown="1"> For mobile applications, we recommend that you use Amazon Cognito. You
|
1109
|
-
# can use Amazon Cognito with the [
|
1110
|
-
# and the [
|
1111
|
-
# a user. You can also supply
|
1112
|
-
# throughout the lifetime of an
|
1240
|
+
# can use Amazon Cognito with the [Amazon Web Services SDK for iOS
|
1241
|
+
# Developer Guide][2] and the [Amazon Web Services SDK for Android
|
1242
|
+
# Developer Guide][3] to uniquely identify a user. You can also supply
|
1243
|
+
# the user with a consistent identity throughout the lifetime of an
|
1244
|
+
# application.
|
1113
1245
|
#
|
1114
|
-
# To learn more about Amazon Cognito, see [Amazon Cognito
|
1115
|
-
# in *
|
1116
|
-
# Overview][4] in the *AWS SDK for iOS Developer Guide*.
|
1246
|
+
# To learn more about Amazon Cognito, see [Amazon Cognito identity
|
1247
|
+
# pools][1] in *Amazon Cognito Developer Guide*.
|
1117
1248
|
#
|
1118
1249
|
# </note>
|
1119
1250
|
#
|
1120
|
-
# Calling `AssumeRoleWithWebIdentity` does not require the use of
|
1121
|
-
# security credentials. Therefore, you can distribute an
|
1122
|
-
# (for example, on mobile devices) that requests temporary
|
1123
|
-
# credentials without including long-term
|
1124
|
-
# application. You also don't need to deploy
|
1125
|
-
# services that use long-term
|
1126
|
-
# the caller is validated by using
|
1127
|
-
# provider. For a comparison of
|
1128
|
-
# other API operations that produce
|
1129
|
-
# [Requesting Temporary Security
|
1130
|
-
#
|
1251
|
+
# Calling `AssumeRoleWithWebIdentity` does not require the use of Amazon
|
1252
|
+
# Web Services security credentials. Therefore, you can distribute an
|
1253
|
+
# application (for example, on mobile devices) that requests temporary
|
1254
|
+
# security credentials without including long-term Amazon Web Services
|
1255
|
+
# credentials in the application. You also don't need to deploy
|
1256
|
+
# server-based proxy services that use long-term Amazon Web Services
|
1257
|
+
# credentials. Instead, the identity of the caller is validated by using
|
1258
|
+
# a token from the web identity provider. For a comparison of
|
1259
|
+
# `AssumeRoleWithWebIdentity` with the other API operations that produce
|
1260
|
+
# temporary credentials, see [Requesting Temporary Security
|
1261
|
+
# Credentials][4] and [Comparing the Amazon Web Services STS API
|
1262
|
+
# operations][5] in the *IAM User Guide*.
|
1131
1263
|
#
|
1132
1264
|
# The temporary security credentials returned by this API consist of an
|
1133
1265
|
# access key ID, a secret access key, and a security token. Applications
|
1134
|
-
# can use these temporary security credentials to sign calls to
|
1135
|
-
# service API operations.
|
1266
|
+
# can use these temporary security credentials to sign calls to Amazon
|
1267
|
+
# Web Services service API operations.
|
1136
1268
|
#
|
1137
1269
|
# **Session Duration**
|
1138
1270
|
#
|
@@ -1143,51 +1275,52 @@ module Aws::STS
|
|
1143
1275
|
# to the maximum session duration setting for the role. This setting can
|
1144
1276
|
# have a value from 1 hour to 12 hours. To learn how to view the maximum
|
1145
1277
|
# value for your role, see [View the Maximum Session Duration Setting
|
1146
|
-
# for a Role][
|
1278
|
+
# for a Role][6] in the *IAM User Guide*. The maximum session duration
|
1147
1279
|
# limit applies when you use the `AssumeRole*` API operations or the
|
1148
1280
|
# `assume-role*` CLI commands. However the limit does not apply when you
|
1149
1281
|
# use those operations to create a console URL. For more information,
|
1150
|
-
# see [Using IAM Roles][
|
1282
|
+
# see [Using IAM Roles][7] in the *IAM User Guide*.
|
1151
1283
|
#
|
1152
1284
|
# **Permissions**
|
1153
1285
|
#
|
1154
1286
|
# The temporary security credentials created by
|
1155
|
-
# `AssumeRoleWithWebIdentity` can be used to make API calls to any
|
1156
|
-
# service with the following exception: you cannot
|
1157
|
-
# `GetFederationToken` or `GetSessionToken` API operations.
|
1287
|
+
# `AssumeRoleWithWebIdentity` can be used to make API calls to any
|
1288
|
+
# Amazon Web Services service with the following exception: you cannot
|
1289
|
+
# call the STS `GetFederationToken` or `GetSessionToken` API operations.
|
1158
1290
|
#
|
1159
|
-
# (Optional) You can pass inline or managed [session policies][
|
1291
|
+
# (Optional) You can pass inline or managed [session policies][8] to
|
1160
1292
|
# this operation. You can pass a single JSON policy document to use as
|
1161
|
-
# an inline session policy. You can also specify up to 10 managed
|
1162
|
-
#
|
1163
|
-
# use for both inline and managed session policies
|
1164
|
-
# characters. Passing policies to this operation
|
1165
|
-
# credentials. The resulting session's
|
1166
|
-
# of the role's identity-based policy
|
1167
|
-
#
|
1168
|
-
#
|
1169
|
-
#
|
1293
|
+
# an inline session policy. You can also specify up to 10 managed policy
|
1294
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
1295
|
+
# plaintext that you use for both inline and managed session policies
|
1296
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
1297
|
+
# returns new temporary credentials. The resulting session's
|
1298
|
+
# permissions are the intersection of the role's identity-based policy
|
1299
|
+
# and the session policies. You can use the role's temporary
|
1300
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
1301
|
+
# resources in the account that owns the role. You cannot use session
|
1302
|
+
# policies to grant more permissions than those allowed by the
|
1170
1303
|
# identity-based policy of the role that is being assumed. For more
|
1171
|
-
# information, see [Session Policies][
|
1304
|
+
# information, see [Session Policies][8] in the *IAM User Guide*.
|
1172
1305
|
#
|
1173
1306
|
# **Tags**
|
1174
1307
|
#
|
1175
1308
|
# (Optional) You can configure your IdP to pass attributes into your web
|
1176
1309
|
# identity token as session tags. Each session tag consists of a key
|
1177
1310
|
# name and an associated value. For more information about session tags,
|
1178
|
-
# see [Passing Session Tags in STS][
|
1311
|
+
# see [Passing Session Tags in STS][9] in the *IAM User Guide*.
|
1179
1312
|
#
|
1180
|
-
# You can pass up to 50 session tags. The
|
1313
|
+
# You can pass up to 50 session tags. The plaintext session tag keys
|
1181
1314
|
# can’t exceed 128 characters and the values can’t exceed 256
|
1182
1315
|
# characters. For these and additional limits, see [IAM and STS
|
1183
|
-
# Character Limits][
|
1316
|
+
# Character Limits][10] in the *IAM User Guide*.
|
1184
1317
|
#
|
1185
|
-
# <note markdown="1"> An
|
1186
|
-
#
|
1187
|
-
#
|
1188
|
-
# other requirements. The
|
1189
|
-
# by percentage how close
|
1190
|
-
# the upper size limit.
|
1318
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1319
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1320
|
+
# format that has a separate limit. Your request can fail for this limit
|
1321
|
+
# even if your plaintext meets the other requirements. The
|
1322
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1323
|
+
# the policies and tags for your request are to the upper size limit.
|
1191
1324
|
#
|
1192
1325
|
# </note>
|
1193
1326
|
#
|
@@ -1198,12 +1331,12 @@ module Aws::STS
|
|
1198
1331
|
# An administrator must grant you the permissions necessary to pass
|
1199
1332
|
# session tags. The administrator can also create granular permissions
|
1200
1333
|
# to allow you to pass only specific session tags. For more information,
|
1201
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
1334
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][11] in
|
1202
1335
|
# the *IAM User Guide*.
|
1203
1336
|
#
|
1204
1337
|
# You can set the session tags as transitive. Transitive tags persist
|
1205
1338
|
# during role chaining. For more information, see [Chaining Roles with
|
1206
|
-
# Session Tags][
|
1339
|
+
# Session Tags][12] in the *IAM User Guide*.
|
1207
1340
|
#
|
1208
1341
|
# **Identities**
|
1209
1342
|
#
|
@@ -1214,55 +1347,54 @@ module Aws::STS
|
|
1214
1347
|
# identity token. In other words, the identity provider must be
|
1215
1348
|
# specified in the role's trust policy.
|
1216
1349
|
#
|
1217
|
-
# Calling `AssumeRoleWithWebIdentity` can result in an entry in your
|
1218
|
-
# CloudTrail logs. The entry includes the [Subject][
|
1219
|
-
#
|
1350
|
+
# Calling `AssumeRoleWithWebIdentity` can result in an entry in your
|
1351
|
+
# CloudTrail logs. The entry includes the [Subject][13] of the provided
|
1352
|
+
# web identity token. We recommend that you avoid using any personally
|
1220
1353
|
# identifiable information (PII) in this field. For example, you could
|
1221
1354
|
# instead use a GUID or a pairwise identifier, as [suggested in the OIDC
|
1222
|
-
# specification][
|
1355
|
+
# specification][14].
|
1223
1356
|
#
|
1224
1357
|
# For more information about how to use web identity federation and the
|
1225
1358
|
# `AssumeRoleWithWebIdentity` API, see the following resources:
|
1226
1359
|
#
|
1227
|
-
# * [Using Web Identity Federation API Operations for Mobile Apps][
|
1228
|
-
# and [Federation Through a Web-based Identity Provider][
|
1360
|
+
# * [Using Web Identity Federation API Operations for Mobile Apps][15]
|
1361
|
+
# and [Federation Through a Web-based Identity Provider][16].
|
1229
1362
|
#
|
1230
|
-
# * [ Web Identity Federation Playground][
|
1363
|
+
# * [ Web Identity Federation Playground][17]. Walk through the process
|
1231
1364
|
# of authenticating through Login with Amazon, Facebook, or Google,
|
1232
1365
|
# getting temporary security credentials, and then using those
|
1233
|
-
# credentials to make a request to
|
1366
|
+
# credentials to make a request to Amazon Web Services.
|
1234
1367
|
#
|
1235
|
-
# * [
|
1236
|
-
# Developer Guide][
|
1237
|
-
# how to invoke the identity providers. The
|
1238
|
-
# use the information from these providers
|
1239
|
-
# security credentials.
|
1368
|
+
# * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
|
1369
|
+
# Services SDK for Android Developer Guide][3]. These toolkits contain
|
1370
|
+
# sample apps that show how to invoke the identity providers. The
|
1371
|
+
# toolkits then show how to use the information from these providers
|
1372
|
+
# to get and use temporary security credentials.
|
1240
1373
|
#
|
1241
|
-
# * [Web Identity Federation with Mobile Applications][
|
1374
|
+
# * [Web Identity Federation with Mobile Applications][18]. This article
|
1242
1375
|
# discusses web identity federation and shows an example of how to use
|
1243
1376
|
# web identity federation to get access to content in Amazon S3.
|
1244
1377
|
#
|
1245
1378
|
#
|
1246
1379
|
#
|
1247
|
-
# [1]:
|
1248
|
-
# [2]: http://aws.amazon.com/
|
1249
|
-
# [3]:
|
1250
|
-
# [4]: https://docs.aws.amazon.com/
|
1251
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1252
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1253
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1254
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1255
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1256
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1257
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1258
|
-
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1259
|
-
# [13]:
|
1260
|
-
# [14]: http://openid.net/specs/openid-connect-core-1_0.html#
|
1261
|
-
# [15]:
|
1262
|
-
# [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1263
|
-
# [17]: https://
|
1264
|
-
# [18]:
|
1265
|
-
# [19]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
1380
|
+
# [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
1381
|
+
# [2]: http://aws.amazon.com/sdkforios/
|
1382
|
+
# [3]: http://aws.amazon.com/sdkforandroid/
|
1383
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1384
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
1385
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
1386
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
1387
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
1388
|
+
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
1389
|
+
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
1390
|
+
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
1391
|
+
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
1392
|
+
# [13]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
|
1393
|
+
# [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
1394
|
+
# [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
1395
|
+
# [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
1396
|
+
# [17]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
|
1397
|
+
# [18]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
1266
1398
|
#
|
1267
1399
|
# @option params [required, String] :role_arn
|
1268
1400
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
@@ -1286,16 +1418,17 @@ module Aws::STS
|
|
1286
1418
|
# by the identity provider. Your application must get this token by
|
1287
1419
|
# authenticating the user who is using your application with a web
|
1288
1420
|
# identity provider before the application makes an
|
1289
|
-
# `AssumeRoleWithWebIdentity` call.
|
1421
|
+
# `AssumeRoleWithWebIdentity` call. Only tokens with RSA algorithms
|
1422
|
+
# (RS256) are supported.
|
1290
1423
|
#
|
1291
1424
|
# @option params [String] :provider_id
|
1292
|
-
# The fully qualified host component of the domain name of the
|
1293
|
-
# provider.
|
1425
|
+
# The fully qualified host component of the domain name of the OAuth 2.0
|
1426
|
+
# identity provider. Do not specify this value for an OpenID Connect
|
1427
|
+
# identity provider.
|
1294
1428
|
#
|
1295
|
-
#
|
1296
|
-
#
|
1297
|
-
#
|
1298
|
-
# schemes and port numbers.
|
1429
|
+
# Currently `www.amazon.com` and `graph.facebook.com` are the only
|
1430
|
+
# supported identity providers for OAuth 2.0 access tokens. Do not
|
1431
|
+
# include URL schemes and port numbers.
|
1299
1432
|
#
|
1300
1433
|
# Do not specify this value for OpenID Connect ID tokens.
|
1301
1434
|
#
|
@@ -1305,28 +1438,29 @@ module Aws::STS
|
|
1305
1438
|
# the same account as the role.
|
1306
1439
|
#
|
1307
1440
|
# This parameter is optional. You can provide up to 10 managed policy
|
1308
|
-
# ARNs. However, the
|
1441
|
+
# ARNs. However, the plaintext that you use for both inline and managed
|
1309
1442
|
# session policies can't exceed 2,048 characters. For more information
|
1310
|
-
# about ARNs, see [Amazon Resource Names (ARNs) and
|
1311
|
-
# Namespaces][1] in the
|
1443
|
+
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
1444
|
+
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
1312
1445
|
#
|
1313
|
-
# <note markdown="1"> An
|
1314
|
-
#
|
1315
|
-
#
|
1316
|
-
# other requirements. The
|
1317
|
-
# by percentage how close
|
1318
|
-
# the upper size limit.
|
1446
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1447
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1448
|
+
# format that has a separate limit. Your request can fail for this limit
|
1449
|
+
# even if your plaintext meets the other requirements. The
|
1450
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1451
|
+
# the policies and tags for your request are to the upper size limit.
|
1319
1452
|
#
|
1320
1453
|
# </note>
|
1321
1454
|
#
|
1322
1455
|
# Passing policies to this operation returns new temporary credentials.
|
1323
1456
|
# The resulting session's permissions are the intersection of the
|
1324
1457
|
# role's identity-based policy and the session policies. You can use
|
1325
|
-
# the role's temporary credentials in subsequent
|
1326
|
-
# access resources in the account that owns the role. You
|
1327
|
-
# session policies to grant more permissions than those
|
1328
|
-
# identity-based policy of the role that is being
|
1329
|
-
# information, see [Session Policies][2] in the *IAM
|
1458
|
+
# the role's temporary credentials in subsequent Amazon Web Services
|
1459
|
+
# API calls to access resources in the account that owns the role. You
|
1460
|
+
# cannot use session policies to grant more permissions than those
|
1461
|
+
# allowed by the identity-based policy of the role that is being
|
1462
|
+
# assumed. For more information, see [Session Policies][2] in the *IAM
|
1463
|
+
# User Guide*.
|
1330
1464
|
#
|
1331
1465
|
#
|
1332
1466
|
#
|
@@ -1341,25 +1475,25 @@ module Aws::STS
|
|
1341
1475
|
# new temporary credentials. The resulting session's permissions are
|
1342
1476
|
# the intersection of the role's identity-based policy and the session
|
1343
1477
|
# policies. You can use the role's temporary credentials in subsequent
|
1344
|
-
#
|
1345
|
-
# You cannot use session policies to grant more
|
1346
|
-
# allowed by the identity-based policy of the
|
1347
|
-
# assumed. For more information, see [Session
|
1348
|
-
# User Guide*.
|
1478
|
+
# Amazon Web Services API calls to access resources in the account that
|
1479
|
+
# owns the role. You cannot use session policies to grant more
|
1480
|
+
# permissions than those allowed by the identity-based policy of the
|
1481
|
+
# role that is being assumed. For more information, see [Session
|
1482
|
+
# Policies][1] in the *IAM User Guide*.
|
1349
1483
|
#
|
1350
|
-
# The
|
1484
|
+
# The plaintext that you use for both inline and managed session
|
1351
1485
|
# policies can't exceed 2,048 characters. The JSON policy characters
|
1352
1486
|
# can be any ASCII character from the space character to the end of the
|
1353
1487
|
# valid character list (\\u0020 through \\u00FF). It can also include
|
1354
1488
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1355
1489
|
# characters.
|
1356
1490
|
#
|
1357
|
-
# <note markdown="1"> An
|
1358
|
-
#
|
1359
|
-
#
|
1360
|
-
# other requirements. The
|
1361
|
-
# by percentage how close
|
1362
|
-
# the upper size limit.
|
1491
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
1492
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
1493
|
+
# format that has a separate limit. Your request can fail for this limit
|
1494
|
+
# even if your plaintext meets the other requirements. The
|
1495
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
1496
|
+
# the policies and tags for your request are to the upper size limit.
|
1363
1497
|
#
|
1364
1498
|
# </note>
|
1365
1499
|
#
|
@@ -1385,8 +1519,8 @@ module Aws::STS
|
|
1385
1519
|
# The request to the federation endpoint for a console sign-in token
|
1386
1520
|
# takes a `SessionDuration` parameter that specifies the maximum length
|
1387
1521
|
# of the console session. For more information, see [Creating a URL that
|
1388
|
-
# Enables Federated Users to Access the
|
1389
|
-
# the *IAM User Guide*.
|
1522
|
+
# Enables Federated Users to Access the Amazon Web Services Management
|
1523
|
+
# Console][2] in the *IAM User Guide*.
|
1390
1524
|
#
|
1391
1525
|
# </note>
|
1392
1526
|
#
|
@@ -1403,6 +1537,7 @@ module Aws::STS
|
|
1403
1537
|
# * {Types::AssumeRoleWithWebIdentityResponse#packed_policy_size #packed_policy_size} => Integer
|
1404
1538
|
# * {Types::AssumeRoleWithWebIdentityResponse#provider #provider} => String
|
1405
1539
|
# * {Types::AssumeRoleWithWebIdentityResponse#audience #audience} => String
|
1540
|
+
# * {Types::AssumeRoleWithWebIdentityResponse#source_identity #source_identity} => String
|
1406
1541
|
#
|
1407
1542
|
#
|
1408
1543
|
# @example Example: To assume a role as an OpenID Connect-federated user
|
@@ -1462,6 +1597,7 @@ module Aws::STS
|
|
1462
1597
|
# resp.packed_policy_size #=> Integer
|
1463
1598
|
# resp.provider #=> String
|
1464
1599
|
# resp.audience #=> String
|
1600
|
+
# resp.source_identity #=> String
|
1465
1601
|
#
|
1466
1602
|
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity AWS API Documentation
|
1467
1603
|
#
|
@@ -1473,34 +1609,34 @@ module Aws::STS
|
|
1473
1609
|
end
|
1474
1610
|
|
1475
1611
|
# Decodes additional information about the authorization status of a
|
1476
|
-
# request from an encoded message returned in response to an
|
1477
|
-
# request.
|
1612
|
+
# request from an encoded message returned in response to an Amazon Web
|
1613
|
+
# Services request.
|
1478
1614
|
#
|
1479
1615
|
# For example, if a user is not authorized to perform an operation that
|
1480
1616
|
# he or she has requested, the request returns a
|
1481
1617
|
# `Client.UnauthorizedOperation` response (an HTTP 403 response). Some
|
1482
|
-
#
|
1483
|
-
# details about this authorization failure.
|
1618
|
+
# Amazon Web Services operations additionally return an encoded message
|
1619
|
+
# that can provide details about this authorization failure.
|
1484
1620
|
#
|
1485
|
-
# <note markdown="1"> Only certain
|
1486
|
-
# The documentation for an individual operation
|
1487
|
-
# operation returns an encoded message in
|
1488
|
-
# code.
|
1621
|
+
# <note markdown="1"> Only certain Amazon Web Services operations return an encoded
|
1622
|
+
# authorization message. The documentation for an individual operation
|
1623
|
+
# indicates whether that operation returns an encoded message in
|
1624
|
+
# addition to returning an HTTP code.
|
1489
1625
|
#
|
1490
1626
|
# </note>
|
1491
1627
|
#
|
1492
1628
|
# The message is encoded because the details of the authorization status
|
1493
|
-
# can
|
1629
|
+
# can contain privileged information that the user who requested the
|
1494
1630
|
# operation should not see. To decode an authorization status message, a
|
1495
|
-
# user must be granted permissions
|
1496
|
-
# `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
|
1631
|
+
# user must be granted permissions through an IAM [policy][1] to request
|
1632
|
+
# the `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
|
1497
1633
|
# action.
|
1498
1634
|
#
|
1499
1635
|
# The decoded message includes the following type of information:
|
1500
1636
|
#
|
1501
1637
|
# * Whether the request was denied due to an explicit deny or due to the
|
1502
1638
|
# absence of an explicit allow. For more information, see [Determining
|
1503
|
-
# Whether a Request is Allowed or Denied][
|
1639
|
+
# Whether a Request is Allowed or Denied][2] in the *IAM User Guide*.
|
1504
1640
|
#
|
1505
1641
|
# * The principal who made the request.
|
1506
1642
|
#
|
@@ -1512,7 +1648,8 @@ module Aws::STS
|
|
1512
1648
|
#
|
1513
1649
|
#
|
1514
1650
|
#
|
1515
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1651
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
1652
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
|
1516
1653
|
#
|
1517
1654
|
# @option params [required, String] :encoded_message
|
1518
1655
|
# The encoded message that was returned with the response.
|
@@ -1561,15 +1698,16 @@ module Aws::STS
|
|
1561
1698
|
# *IAM User Guide*.
|
1562
1699
|
#
|
1563
1700
|
# When you pass an access key ID to this operation, it returns the ID of
|
1564
|
-
# the
|
1565
|
-
# with `AKIA` are long-term credentials for an IAM user or
|
1566
|
-
# account root user. Access key IDs beginning
|
1567
|
-
# credentials that are created using STS
|
1568
|
-
# the response belongs to you, you can
|
1569
|
-
# review your root user access keys. Then,
|
1570
|
-
# report][2] to learn which IAM user owns
|
1571
|
-
# requested the temporary credentials for an
|
1572
|
-
# STS events in your [CloudTrail logs][3] in
|
1701
|
+
# the Amazon Web Services account to which the keys belong. Access key
|
1702
|
+
# IDs beginning with `AKIA` are long-term credentials for an IAM user or
|
1703
|
+
# the Amazon Web Services account root user. Access key IDs beginning
|
1704
|
+
# with `ASIA` are temporary credentials that are created using STS
|
1705
|
+
# operations. If the account in the response belongs to you, you can
|
1706
|
+
# sign in as the root user and review your root user access keys. Then,
|
1707
|
+
# you can pull a [credentials report][2] to learn which IAM user owns
|
1708
|
+
# the keys. To learn who requested the temporary credentials for an
|
1709
|
+
# `ASIA` access key, view the STS events in your [CloudTrail logs][3] in
|
1710
|
+
# the *IAM User Guide*.
|
1573
1711
|
#
|
1574
1712
|
# This operation does not indicate the state of the access key. The key
|
1575
1713
|
# might be active, inactive, or deleted. Active keys might not have
|
@@ -1616,11 +1754,11 @@ module Aws::STS
|
|
1616
1754
|
# to call the operation.
|
1617
1755
|
#
|
1618
1756
|
# <note markdown="1"> No permissions are required to perform this operation. If an
|
1619
|
-
# administrator
|
1757
|
+
# administrator attaches a policy to your identity that explicitly
|
1620
1758
|
# denies access to the `sts:GetCallerIdentity` action, you can still
|
1621
1759
|
# perform this operation. Permissions are not required because the same
|
1622
|
-
# information is returned when
|
1623
|
-
#
|
1760
|
+
# information is returned when access is denied. To view an example
|
1761
|
+
# response, see [I Am Not Authorized to Perform:
|
1624
1762
|
# iam:DeleteVirtualMFADevice][1] in the *IAM User Guide*.
|
1625
1763
|
#
|
1626
1764
|
# </note>
|
@@ -1697,58 +1835,63 @@ module Aws::STS
|
|
1697
1835
|
end
|
1698
1836
|
|
1699
1837
|
# Returns a set of temporary security credentials (consisting of an
|
1700
|
-
# access key ID, a secret access key, and a security token) for a
|
1701
|
-
#
|
1702
|
-
#
|
1703
|
-
#
|
1704
|
-
#
|
1705
|
-
#
|
1706
|
-
#
|
1707
|
-
#
|
1708
|
-
#
|
1709
|
-
#
|
1710
|
-
#
|
1838
|
+
# access key ID, a secret access key, and a security token) for a user.
|
1839
|
+
# A typical use is in a proxy application that gets temporary security
|
1840
|
+
# credentials on behalf of distributed applications inside a corporate
|
1841
|
+
# network.
|
1842
|
+
#
|
1843
|
+
# You must call the `GetFederationToken` operation using the long-term
|
1844
|
+
# security credentials of an IAM user. As a result, this call is
|
1845
|
+
# appropriate in contexts where those credentials can be safeguarded,
|
1846
|
+
# usually in a server-based application. For a comparison of
|
1847
|
+
# `GetFederationToken` with the other API operations that produce
|
1848
|
+
# temporary credentials, see [Requesting Temporary Security
|
1849
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
1850
|
+
# operations][2] in the *IAM User Guide*.
|
1851
|
+
#
|
1852
|
+
# Although it is possible to call `GetFederationToken` using the
|
1853
|
+
# security credentials of an Amazon Web Services account root user
|
1854
|
+
# rather than an IAM user that you create for the purpose of a proxy
|
1855
|
+
# application, we do not recommend it. For more information, see
|
1856
|
+
# [Safeguard your root user credentials and don't use them for everyday
|
1857
|
+
# tasks][3] in the *IAM User Guide*.
|
1711
1858
|
#
|
1712
1859
|
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
1713
1860
|
# authenticate users using a web identity provider like Login with
|
1714
1861
|
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
1715
|
-
# provider. In this case, we recommend that you use [Amazon Cognito][
|
1862
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][4]
|
1716
1863
|
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
1717
|
-
# Through a Web-based Identity Provider][
|
1864
|
+
# Through a Web-based Identity Provider][5] in the *IAM User Guide*.
|
1718
1865
|
#
|
1719
1866
|
# </note>
|
1720
1867
|
#
|
1721
|
-
# You can also call `GetFederationToken` using the security credentials
|
1722
|
-
# of an AWS account root user, but we do not recommend it. Instead, we
|
1723
|
-
# recommend that you create an IAM user for the purpose of the proxy
|
1724
|
-
# application. Then attach a policy to the IAM user that limits
|
1725
|
-
# federated users to only the actions and resources that they need to
|
1726
|
-
# access. For more information, see [IAM Best Practices][5] in the *IAM
|
1727
|
-
# User Guide*.
|
1728
|
-
#
|
1729
1868
|
# **Session duration**
|
1730
1869
|
#
|
1731
1870
|
# The temporary credentials are valid for the specified duration, from
|
1732
1871
|
# 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
|
1733
1872
|
# hours). The default session duration is 43,200 seconds (12 hours).
|
1734
|
-
# Temporary credentials
|
1735
|
-
#
|
1873
|
+
# Temporary credentials obtained by using the root user credentials have
|
1874
|
+
# a maximum duration of 3,600 seconds (1 hour).
|
1736
1875
|
#
|
1737
1876
|
# **Permissions**
|
1738
1877
|
#
|
1739
1878
|
# You can use the temporary credentials created by `GetFederationToken`
|
1740
|
-
# in any
|
1879
|
+
# in any Amazon Web Services service with the following exceptions:
|
1741
1880
|
#
|
1742
|
-
# * You cannot call any IAM operations using the
|
1881
|
+
# * You cannot call any IAM operations using the CLI or the Amazon Web
|
1882
|
+
# Services API. This limitation does not apply to console sessions.
|
1743
1883
|
#
|
1744
1884
|
# * You cannot call any STS operations except `GetCallerIdentity`.
|
1745
1885
|
#
|
1886
|
+
# You can use temporary credentials for single sign-on (SSO) to the
|
1887
|
+
# console.
|
1888
|
+
#
|
1746
1889
|
# You must pass an inline or managed [session policy][6] to this
|
1747
1890
|
# operation. You can pass a single JSON policy document to use as an
|
1748
|
-
# inline session policy. You can also specify up to 10 managed
|
1749
|
-
# to use as managed session policies. The
|
1750
|
-
# both inline and managed session policies
|
1751
|
-
# characters.
|
1891
|
+
# inline session policy. You can also specify up to 10 managed policy
|
1892
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
1893
|
+
# plaintext that you use for both inline and managed session policies
|
1894
|
+
# can't exceed 2,048 characters.
|
1752
1895
|
#
|
1753
1896
|
# Though the session policy parameters are optional, if you do not pass
|
1754
1897
|
# a policy, then the resulting federated user session has no
|
@@ -1775,6 +1918,15 @@ module Aws::STS
|
|
1775
1918
|
# called session tags. For more information about session tags, see
|
1776
1919
|
# [Passing Session Tags in STS][8] in the *IAM User Guide*.
|
1777
1920
|
#
|
1921
|
+
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
1922
|
+
# authenticate users using a web identity provider like Login with
|
1923
|
+
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
1924
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][4]
|
1925
|
+
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
1926
|
+
# Through a Web-based Identity Provider][5] in the *IAM User Guide*.
|
1927
|
+
#
|
1928
|
+
# </note>
|
1929
|
+
#
|
1778
1930
|
# An administrator must grant you the permissions necessary to pass
|
1779
1931
|
# session tags. The administrator can also create granular permissions
|
1780
1932
|
# to allow you to pass only specific session tags. For more information,
|
@@ -1793,9 +1945,9 @@ module Aws::STS
|
|
1793
1945
|
#
|
1794
1946
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
1795
1947
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
1796
|
-
# [3]:
|
1797
|
-
# [4]:
|
1798
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
1948
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
1949
|
+
# [4]: http://aws.amazon.com/cognito/
|
1950
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
1799
1951
|
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
1800
1952
|
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
|
1801
1953
|
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
@@ -1818,8 +1970,8 @@ module Aws::STS
|
|
1818
1970
|
#
|
1819
1971
|
# You must pass an inline or managed [session policy][1] to this
|
1820
1972
|
# operation. You can pass a single JSON policy document to use as an
|
1821
|
-
# inline session policy. You can also specify up to 10 managed
|
1822
|
-
# to use as managed session policies.
|
1973
|
+
# inline session policy. You can also specify up to 10 managed policy
|
1974
|
+
# Amazon Resource Names (ARNs) to use as managed session policies.
|
1823
1975
|
#
|
1824
1976
|
# This parameter is optional. However, if you do not pass any session
|
1825
1977
|
# policies, then the resulting federated user session has no
|
@@ -1840,19 +1992,19 @@ module Aws::STS
|
|
1840
1992
|
# are granted in addition to the permissions that are granted by the
|
1841
1993
|
# session policies.
|
1842
1994
|
#
|
1843
|
-
# The
|
1995
|
+
# The plaintext that you use for both inline and managed session
|
1844
1996
|
# policies can't exceed 2,048 characters. The JSON policy characters
|
1845
1997
|
# can be any ASCII character from the space character to the end of the
|
1846
1998
|
# valid character list (\\u0020 through \\u00FF). It can also include
|
1847
1999
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
1848
2000
|
# characters.
|
1849
2001
|
#
|
1850
|
-
# <note markdown="1"> An
|
1851
|
-
#
|
1852
|
-
#
|
1853
|
-
# other requirements. The
|
1854
|
-
# by percentage how close
|
1855
|
-
# the upper size limit.
|
2002
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
2003
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
2004
|
+
# format that has a separate limit. Your request can fail for this limit
|
2005
|
+
# even if your plaintext meets the other requirements. The
|
2006
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
2007
|
+
# the policies and tags for your request are to the upper size limit.
|
1856
2008
|
#
|
1857
2009
|
# </note>
|
1858
2010
|
#
|
@@ -1867,12 +2019,13 @@ module Aws::STS
|
|
1867
2019
|
#
|
1868
2020
|
# You must pass an inline or managed [session policy][1] to this
|
1869
2021
|
# operation. You can pass a single JSON policy document to use as an
|
1870
|
-
# inline session policy. You can also specify up to 10 managed
|
1871
|
-
# to use as managed session policies. The
|
1872
|
-
# both inline and managed session policies
|
1873
|
-
# characters. You can provide up to 10 managed
|
1874
|
-
# information about ARNs, see [Amazon Resource
|
1875
|
-
# Service Namespaces][2] in the
|
2022
|
+
# inline session policy. You can also specify up to 10 managed policy
|
2023
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
2024
|
+
# plaintext that you use for both inline and managed session policies
|
2025
|
+
# can't exceed 2,048 characters. You can provide up to 10 managed
|
2026
|
+
# policy ARNs. For more information about ARNs, see [Amazon Resource
|
2027
|
+
# Names (ARNs) and Amazon Web Services Service Namespaces][2] in the
|
2028
|
+
# Amazon Web Services General Reference.
|
1876
2029
|
#
|
1877
2030
|
# This parameter is optional. However, if you do not pass any session
|
1878
2031
|
# policies, then the resulting federated user session has no
|
@@ -1893,12 +2046,12 @@ module Aws::STS
|
|
1893
2046
|
# are granted in addition to the permissions that are granted by the
|
1894
2047
|
# session policies.
|
1895
2048
|
#
|
1896
|
-
# <note markdown="1"> An
|
1897
|
-
#
|
1898
|
-
#
|
1899
|
-
# other requirements. The
|
1900
|
-
# by percentage how close
|
1901
|
-
# the upper size limit.
|
2049
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
2050
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
2051
|
+
# format that has a separate limit. Your request can fail for this limit
|
2052
|
+
# even if your plaintext meets the other requirements. The
|
2053
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
2054
|
+
# the policies and tags for your request are to the upper size limit.
|
1902
2055
|
#
|
1903
2056
|
# </note>
|
1904
2057
|
#
|
@@ -1911,10 +2064,10 @@ module Aws::STS
|
|
1911
2064
|
# The duration, in seconds, that the session should last. Acceptable
|
1912
2065
|
# durations for federation sessions range from 900 seconds (15 minutes)
|
1913
2066
|
# to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
|
1914
|
-
# default. Sessions obtained using
|
1915
|
-
#
|
1916
|
-
#
|
1917
|
-
#
|
2067
|
+
# default. Sessions obtained using root user credentials are restricted
|
2068
|
+
# to a maximum of 3,600 seconds (one hour). If the specified duration is
|
2069
|
+
# longer than one hour, the session obtained by using root user
|
2070
|
+
# credentials defaults to one hour.
|
1918
2071
|
#
|
1919
2072
|
# @option params [Array<Types::Tag>] :tags
|
1920
2073
|
# A list of session tags. Each session tag consists of a key name and an
|
@@ -1922,16 +2075,16 @@ module Aws::STS
|
|
1922
2075
|
# [Passing Session Tags in STS][1] in the *IAM User Guide*.
|
1923
2076
|
#
|
1924
2077
|
# This parameter is optional. You can pass up to 50 session tags. The
|
1925
|
-
#
|
2078
|
+
# plaintext session tag keys can’t exceed 128 characters and the values
|
1926
2079
|
# can’t exceed 256 characters. For these and additional limits, see [IAM
|
1927
2080
|
# and STS Character Limits][2] in the *IAM User Guide*.
|
1928
2081
|
#
|
1929
|
-
# <note markdown="1"> An
|
1930
|
-
#
|
1931
|
-
#
|
1932
|
-
# other requirements. The
|
1933
|
-
# by percentage how close
|
1934
|
-
# the upper size limit.
|
2082
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
2083
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
2084
|
+
# format that has a separate limit. Your request can fail for this limit
|
2085
|
+
# even if your plaintext meets the other requirements. The
|
2086
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
2087
|
+
# the policies and tags for your request are to the upper size limit.
|
1935
2088
|
#
|
1936
2089
|
# </note>
|
1937
2090
|
#
|
@@ -2029,37 +2182,47 @@ module Aws::STS
|
|
2029
2182
|
req.send_request(options)
|
2030
2183
|
end
|
2031
2184
|
|
2032
|
-
# Returns a set of temporary credentials for an
|
2033
|
-
# The credentials consist of an access key ID, a
|
2034
|
-
# a security token. Typically, you use
|
2035
|
-
# use MFA to protect programmatic calls
|
2036
|
-
#
|
2037
|
-
#
|
2038
|
-
#
|
2039
|
-
#
|
2040
|
-
#
|
2041
|
-
#
|
2042
|
-
#
|
2043
|
-
#
|
2044
|
-
#
|
2045
|
-
#
|
2185
|
+
# Returns a set of temporary credentials for an Amazon Web Services
|
2186
|
+
# account or IAM user. The credentials consist of an access key ID, a
|
2187
|
+
# secret access key, and a security token. Typically, you use
|
2188
|
+
# `GetSessionToken` if you want to use MFA to protect programmatic calls
|
2189
|
+
# to specific Amazon Web Services API operations like Amazon EC2
|
2190
|
+
# `StopInstances`.
|
2191
|
+
#
|
2192
|
+
# MFA-enabled IAM users must call `GetSessionToken` and submit an MFA
|
2193
|
+
# code that is associated with their MFA device. Using the temporary
|
2194
|
+
# security credentials that the call returns, IAM users can then make
|
2195
|
+
# programmatic calls to API operations that require MFA authentication.
|
2196
|
+
# An incorrect MFA code causes the API to return an access denied error.
|
2197
|
+
# For a comparison of `GetSessionToken` with the other API operations
|
2198
|
+
# that produce temporary credentials, see [Requesting Temporary Security
|
2199
|
+
# Credentials][1] and [Comparing the Amazon Web Services STS API
|
2200
|
+
# operations][2] in the *IAM User Guide*.
|
2201
|
+
#
|
2202
|
+
# <note markdown="1"> No permissions are required for users to perform this operation. The
|
2203
|
+
# purpose of the `sts:GetSessionToken` operation is to authenticate the
|
2204
|
+
# user using MFA. You cannot use policies to control authentication
|
2205
|
+
# operations. For more information, see [Permissions for
|
2206
|
+
# GetSessionToken][3] in the *IAM User Guide*.
|
2207
|
+
#
|
2208
|
+
# </note>
|
2046
2209
|
#
|
2047
2210
|
# **Session Duration**
|
2048
2211
|
#
|
2049
2212
|
# The `GetSessionToken` operation must be called by using the long-term
|
2050
|
-
#
|
2051
|
-
#
|
2052
|
-
#
|
2053
|
-
#
|
2054
|
-
#
|
2055
|
-
#
|
2056
|
-
#
|
2213
|
+
# Amazon Web Services security credentials of an IAM user. Credentials
|
2214
|
+
# that are created by IAM users are valid for the duration that you
|
2215
|
+
# specify. This duration can range from 900 seconds (15 minutes) up to a
|
2216
|
+
# maximum of 129,600 seconds (36 hours), with a default of 43,200
|
2217
|
+
# seconds (12 hours). Credentials based on account credentials can range
|
2218
|
+
# from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a
|
2219
|
+
# default of 1 hour.
|
2057
2220
|
#
|
2058
2221
|
# **Permissions**
|
2059
2222
|
#
|
2060
2223
|
# The temporary security credentials created by `GetSessionToken` can be
|
2061
|
-
# used to make API calls to any
|
2062
|
-
# exceptions:
|
2224
|
+
# used to make API calls to any Amazon Web Services service with the
|
2225
|
+
# following exceptions:
|
2063
2226
|
#
|
2064
2227
|
# * You cannot call any IAM API operations unless MFA authentication
|
2065
2228
|
# information is included in the request.
|
@@ -2067,39 +2230,41 @@ module Aws::STS
|
|
2067
2230
|
# * You cannot call any STS API *except* `AssumeRole` or
|
2068
2231
|
# `GetCallerIdentity`.
|
2069
2232
|
#
|
2070
|
-
#
|
2071
|
-
#
|
2072
|
-
#
|
2073
|
-
#
|
2074
|
-
#
|
2075
|
-
# </note>
|
2233
|
+
# The credentials that `GetSessionToken` returns are based on
|
2234
|
+
# permissions associated with the IAM user whose credentials were used
|
2235
|
+
# to call the operation. The temporary credentials have the same
|
2236
|
+
# permissions as the IAM user.
|
2076
2237
|
#
|
2077
|
-
#
|
2078
|
-
#
|
2079
|
-
#
|
2238
|
+
# <note markdown="1"> Although it is possible to call `GetSessionToken` using the security
|
2239
|
+
# credentials of an Amazon Web Services account root user rather than an
|
2240
|
+
# IAM user, we do not recommend it. If `GetSessionToken` is called using
|
2080
2241
|
# root user credentials, the temporary credentials have root user
|
2081
|
-
# permissions.
|
2082
|
-
# credentials
|
2083
|
-
#
|
2242
|
+
# permissions. For more information, see [Safeguard your root user
|
2243
|
+
# credentials and don't use them for everyday tasks][4] in the *IAM
|
2244
|
+
# User Guide*
|
2245
|
+
#
|
2246
|
+
# </note>
|
2084
2247
|
#
|
2085
2248
|
# For more information about using `GetSessionToken` to create temporary
|
2086
|
-
# credentials,
|
2087
|
-
# Environments][
|
2249
|
+
# credentials, see [Temporary Credentials for Users in Untrusted
|
2250
|
+
# Environments][5] in the *IAM User Guide*.
|
2088
2251
|
#
|
2089
2252
|
#
|
2090
2253
|
#
|
2091
2254
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
2092
2255
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
|
2093
|
-
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
2094
|
-
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
2256
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
|
2257
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
2258
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
|
2095
2259
|
#
|
2096
2260
|
# @option params [Integer] :duration_seconds
|
2097
2261
|
# The duration, in seconds, that the credentials should remain valid.
|
2098
2262
|
# Acceptable durations for IAM user sessions range from 900 seconds (15
|
2099
2263
|
# minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12 hours)
|
2100
|
-
# as the default. Sessions for
|
2101
|
-
# maximum of 3,600 seconds (one hour). If the duration
|
2102
|
-
# one hour, the session for
|
2264
|
+
# as the default. Sessions for Amazon Web Services account owners are
|
2265
|
+
# restricted to a maximum of 3,600 seconds (one hour). If the duration
|
2266
|
+
# is longer than one hour, the session for Amazon Web Services account
|
2267
|
+
# owners defaults to one hour.
|
2103
2268
|
#
|
2104
2269
|
# @option params [String] :serial_number
|
2105
2270
|
# The identification number of the MFA device that is associated with
|
@@ -2108,8 +2273,8 @@ module Aws::STS
|
|
2108
2273
|
# The value is either the serial number for a hardware device (such as
|
2109
2274
|
# `GAHT12345678`) or an Amazon Resource Name (ARN) for a virtual device
|
2110
2275
|
# (such as `arn:aws:iam::123456789012:mfa/user`). You can find the
|
2111
|
-
# device for an IAM user by going to the
|
2112
|
-
# viewing the user's security credentials.
|
2276
|
+
# device for an IAM user by going to the Amazon Web Services Management
|
2277
|
+
# Console and viewing the user's security credentials.
|
2113
2278
|
#
|
2114
2279
|
# The regex used to validate this parameter is a string of characters
|
2115
2280
|
# consisting of upper- and lower-case alphanumeric characters with no
|
@@ -2187,7 +2352,7 @@ module Aws::STS
|
|
2187
2352
|
params: params,
|
2188
2353
|
config: config)
|
2189
2354
|
context[:gem_name] = 'aws-sdk-core'
|
2190
|
-
context[:gem_version] = '3.
|
2355
|
+
context[:gem_version] = '3.191.0'
|
2191
2356
|
Seahorse::Client::Request.new(handlers, context)
|
2192
2357
|
end
|
2193
2358
|
|