aws-sdk-core 3.168.4 → 3.224.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +719 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +5 -6
- data/lib/aws-defaults.rb +4 -1
- data/lib/aws-sdk-core/arn.rb +1 -3
- data/lib/aws-sdk-core/assume_role_credentials.rb +13 -5
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -7
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
- data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
- data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
- data/lib/aws-sdk-core/cbor/decoder.rb +308 -0
- data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
- data/lib/aws-sdk-core/cbor.rb +53 -0
- data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
- data/lib/aws-sdk-core/client_stubs.rb +33 -55
- data/lib/aws-sdk-core/credential_provider.rb +8 -1
- data/lib/aws-sdk-core/credential_provider_chain.rb +39 -11
- data/lib/aws-sdk-core/credentials.rb +19 -6
- data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +179 -53
- data/lib/aws-sdk-core/endpoints/condition.rb +5 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
- data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +5 -1
- data/lib/aws-sdk-core/endpoints/error_rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/function.rb +5 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +19 -18
- data/lib/aws-sdk-core/endpoints/reference.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rule_set.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rules_provider.rb +5 -0
- data/lib/aws-sdk-core/endpoints/templater.rb +6 -0
- data/lib/aws-sdk-core/endpoints/tree_rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/url.rb +1 -0
- data/lib/aws-sdk-core/endpoints.rb +79 -19
- data/lib/aws-sdk-core/error_handler.rb +41 -0
- data/lib/aws-sdk-core/errors.rb +14 -5
- data/lib/aws-sdk-core/event_emitter.rb +0 -16
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +56 -32
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +30 -14
- data/lib/aws-sdk-core/json/handler.rb +13 -6
- data/lib/aws-sdk-core/json/json_engine.rb +3 -1
- data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
- data/lib/aws-sdk-core/json/parser.rb +33 -3
- data/lib/aws-sdk-core/json.rb +43 -14
- data/lib/aws-sdk-core/log/formatter.rb +6 -0
- data/lib/aws-sdk-core/log/param_filter.rb +2 -2
- data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
- data/lib/aws-sdk-core/log.rb +10 -0
- data/lib/aws-sdk-core/lru_cache.rb +75 -0
- data/lib/aws-sdk-core/pageable_response.rb +3 -1
- data/lib/aws-sdk-core/param_validator.rb +9 -4
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +333 -168
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -1
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +9 -3
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +3 -8
- data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
- data/lib/aws-sdk-core/plugins/logging.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
- data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
- data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +162 -37
- data/lib/aws-sdk-core/plugins/request_compression.rb +226 -0
- data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
- data/lib/aws-sdk-core/plugins/sign.rb +44 -17
- data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
- data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
- data/lib/aws-sdk-core/plugins/stub_responses.rb +53 -9
- data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
- data/lib/aws-sdk-core/plugins/user_agent.rb +191 -14
- data/lib/aws-sdk-core/plugins.rb +39 -0
- data/lib/aws-sdk-core/process_credentials.rb +48 -29
- data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
- data/lib/aws-sdk-core/query/handler.rb +4 -4
- data/lib/aws-sdk-core/query/param_builder.rb +2 -2
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/refreshing_credentials.rb +12 -12
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/body.rb +32 -5
- data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
- data/lib/aws-sdk-core/rest/response/body.rb +15 -1
- data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
- data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
- data/lib/aws-sdk-core/rest.rb +1 -0
- data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
- data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
- data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +85 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +125 -39
- data/lib/aws-sdk-core/shared_credentials.rb +1 -7
- data/lib/aws-sdk-core/sso_credentials.rb +5 -2
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
- data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/stubbing.rb +22 -0
- data/lib/aws-sdk-core/telemetry/base.rb +177 -0
- data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
- data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
- data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
- data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
- data/lib/aws-sdk-core/telemetry.rb +78 -0
- data/lib/aws-sdk-core/util.rb +39 -0
- data/lib/aws-sdk-core/waiters/poller.rb +12 -5
- data/lib/aws-sdk-core/xml/builder.rb +17 -9
- data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
- data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
- data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +2 -0
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +82 -107
- data/lib/aws-sdk-sso/client.rb +185 -79
- data/lib/aws-sdk-sso/client_api.rb +7 -0
- data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-sso/endpoint_provider.rb +37 -96
- data/lib/aws-sdk-sso/endpoints.rb +3 -54
- data/lib/aws-sdk-sso/plugins/endpoints.rb +23 -22
- data/lib/aws-sdk-sso/types.rb +1 -0
- data/lib/aws-sdk-sso.rb +15 -11
- data/lib/aws-sdk-ssooidc/client.rb +592 -112
- data/lib/aws-sdk-ssooidc/client_api.rb +89 -1
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +37 -95
- data/lib/aws-sdk-ssooidc/endpoints.rb +3 -40
- data/lib/aws-sdk-ssooidc/errors.rb +52 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +23 -20
- data/lib/aws-sdk-ssooidc/types.rb +407 -53
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +516 -238
- data/lib/aws-sdk-sts/client_api.rb +48 -11
- data/lib/aws-sdk-sts/customizations.rb +5 -1
- data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
- data/lib/aws-sdk-sts/endpoint_provider.rb +91 -213
- data/lib/aws-sdk-sts/endpoints.rb +3 -118
- data/lib/aws-sdk-sts/errors.rb +16 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +23 -30
- data/lib/aws-sdk-sts/presigner.rb +1 -1
- data/lib/aws-sdk-sts/types.rb +217 -36
- data/lib/aws-sdk-sts.rb +15 -11
- data/lib/seahorse/client/async_base.rb +4 -5
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +18 -21
- data/lib/seahorse/client/configuration.rb +0 -4
- data/lib/seahorse/client/h2/connection.rb +25 -31
- data/lib/seahorse/client/h2/handler.rb +14 -3
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/http/response.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +13 -11
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/net_http/patches.rb +1 -4
- data/lib/seahorse/client/networking_error.rb +1 -1
- data/lib/seahorse/client/plugin.rb +9 -0
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/h2.rb +4 -4
- data/lib/seahorse/client/plugins/net_http.rb +57 -16
- data/lib/seahorse/client/plugins/request_callback.rb +31 -0
- data/lib/seahorse/client/request_context.rb +8 -1
- data/lib/seahorse/client/response.rb +8 -0
- data/lib/seahorse/model/operation.rb +3 -0
- data/lib/seahorse/model/shapes.rb +2 -2
- data/sig/aws-sdk-core/async_client_stubs.rbs +21 -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/telemetry/base.rbs +46 -0
- data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
- data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
- data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
- data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
- data/sig/aws-sdk-core.rbs +7 -0
- data/sig/seahorse/client/async_base.rbs +18 -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 +92 -23
- /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
data/lib/aws-sdk-sts/client.rb
CHANGED
|
@@ -7,34 +7,35 @@
|
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
10
|
-
require 'seahorse/client/plugins/content_length
|
|
11
|
-
require 'aws-sdk-core/plugins/credentials_configuration
|
|
12
|
-
require 'aws-sdk-core/plugins/logging
|
|
13
|
-
require 'aws-sdk-core/plugins/param_converter
|
|
14
|
-
require 'aws-sdk-core/plugins/param_validator
|
|
15
|
-
require 'aws-sdk-core/plugins/user_agent
|
|
16
|
-
require 'aws-sdk-core/plugins/helpful_socket_errors
|
|
17
|
-
require 'aws-sdk-core/plugins/retry_errors
|
|
18
|
-
require 'aws-sdk-core/plugins/global_configuration
|
|
19
|
-
require 'aws-sdk-core/plugins/regional_endpoint
|
|
20
|
-
require 'aws-sdk-core/plugins/endpoint_discovery
|
|
21
|
-
require 'aws-sdk-core/plugins/endpoint_pattern
|
|
22
|
-
require 'aws-sdk-core/plugins/response_paging
|
|
23
|
-
require 'aws-sdk-core/plugins/stub_responses
|
|
24
|
-
require 'aws-sdk-core/plugins/idempotency_token
|
|
25
|
-
require 'aws-sdk-core/plugins/
|
|
26
|
-
require 'aws-sdk-core/plugins/
|
|
27
|
-
require 'aws-sdk-core/plugins/
|
|
28
|
-
require 'aws-sdk-core/plugins/
|
|
29
|
-
require 'aws-sdk-core/plugins/
|
|
30
|
-
require 'aws-sdk-core/plugins/
|
|
31
|
-
require 'aws-sdk-core/plugins/
|
|
32
|
-
require 'aws-sdk-core/plugins/
|
|
33
|
-
require 'aws-sdk-core/plugins/
|
|
34
|
-
require 'aws-sdk-core/plugins/
|
|
35
|
-
require 'aws-sdk-
|
|
36
|
-
|
|
37
|
-
|
|
10
|
+
require 'seahorse/client/plugins/content_length'
|
|
11
|
+
require 'aws-sdk-core/plugins/credentials_configuration'
|
|
12
|
+
require 'aws-sdk-core/plugins/logging'
|
|
13
|
+
require 'aws-sdk-core/plugins/param_converter'
|
|
14
|
+
require 'aws-sdk-core/plugins/param_validator'
|
|
15
|
+
require 'aws-sdk-core/plugins/user_agent'
|
|
16
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors'
|
|
17
|
+
require 'aws-sdk-core/plugins/retry_errors'
|
|
18
|
+
require 'aws-sdk-core/plugins/global_configuration'
|
|
19
|
+
require 'aws-sdk-core/plugins/regional_endpoint'
|
|
20
|
+
require 'aws-sdk-core/plugins/endpoint_discovery'
|
|
21
|
+
require 'aws-sdk-core/plugins/endpoint_pattern'
|
|
22
|
+
require 'aws-sdk-core/plugins/response_paging'
|
|
23
|
+
require 'aws-sdk-core/plugins/stub_responses'
|
|
24
|
+
require 'aws-sdk-core/plugins/idempotency_token'
|
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id'
|
|
26
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter'
|
|
27
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin'
|
|
28
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin'
|
|
29
|
+
require 'aws-sdk-core/plugins/transfer_encoding'
|
|
30
|
+
require 'aws-sdk-core/plugins/http_checksum'
|
|
31
|
+
require 'aws-sdk-core/plugins/checksum_algorithm'
|
|
32
|
+
require 'aws-sdk-core/plugins/request_compression'
|
|
33
|
+
require 'aws-sdk-core/plugins/defaults_mode'
|
|
34
|
+
require 'aws-sdk-core/plugins/recursion_detection'
|
|
35
|
+
require 'aws-sdk-core/plugins/telemetry'
|
|
36
|
+
require 'aws-sdk-core/plugins/sign'
|
|
37
|
+
require 'aws-sdk-core/plugins/protocols/query'
|
|
38
|
+
require 'aws-sdk-sts/plugins/sts_regional_endpoints'
|
|
38
39
|
|
|
39
40
|
module Aws::STS
|
|
40
41
|
# An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
|
|
@@ -72,14 +73,17 @@ module Aws::STS
|
|
|
72
73
|
add_plugin(Aws::Plugins::ResponsePaging)
|
|
73
74
|
add_plugin(Aws::Plugins::StubResponses)
|
|
74
75
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
|
76
|
+
add_plugin(Aws::Plugins::InvocationId)
|
|
75
77
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
|
76
78
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
|
77
79
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
|
78
80
|
add_plugin(Aws::Plugins::TransferEncoding)
|
|
79
81
|
add_plugin(Aws::Plugins::HttpChecksum)
|
|
80
82
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
|
83
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
|
81
84
|
add_plugin(Aws::Plugins::DefaultsMode)
|
|
82
85
|
add_plugin(Aws::Plugins::RecursionDetection)
|
|
86
|
+
add_plugin(Aws::Plugins::Telemetry)
|
|
83
87
|
add_plugin(Aws::Plugins::Sign)
|
|
84
88
|
add_plugin(Aws::Plugins::Protocols::Query)
|
|
85
89
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
|
@@ -87,6 +91,11 @@ module Aws::STS
|
|
|
87
91
|
|
|
88
92
|
# @overload initialize(options)
|
|
89
93
|
# @param [Hash] options
|
|
94
|
+
#
|
|
95
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
|
96
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
|
97
|
+
# class name or an instance of a plugin class.
|
|
98
|
+
#
|
|
90
99
|
# @option options [required, Aws::CredentialProvider] :credentials
|
|
91
100
|
# Your AWS credentials. This can be an instance of any one of the
|
|
92
101
|
# following classes:
|
|
@@ -121,13 +130,15 @@ module Aws::STS
|
|
|
121
130
|
# locations will be searched for credentials:
|
|
122
131
|
#
|
|
123
132
|
# * `Aws.config[:credentials]`
|
|
124
|
-
# * The `:access_key_id`, `:secret_access_key`,
|
|
125
|
-
#
|
|
133
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
|
134
|
+
# `:account_id` options.
|
|
135
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
|
|
136
|
+
# ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
|
|
126
137
|
# * `~/.aws/credentials`
|
|
127
138
|
# * `~/.aws/config`
|
|
128
139
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
|
129
140
|
# are very aggressive. Construct and pass an instance of
|
|
130
|
-
# `Aws::
|
|
141
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
|
131
142
|
# enable retries and extended timeouts. Instance profile credential
|
|
132
143
|
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
|
133
144
|
# to true.
|
|
@@ -146,6 +157,8 @@ module Aws::STS
|
|
|
146
157
|
#
|
|
147
158
|
# @option options [String] :access_key_id
|
|
148
159
|
#
|
|
160
|
+
# @option options [String] :account_id
|
|
161
|
+
#
|
|
149
162
|
# @option options [Boolean] :active_endpoint_cache (false)
|
|
150
163
|
# When set to `true`, a thread polling for endpoints will be running in
|
|
151
164
|
# the background every 60 secs (default). Defaults to `false`.
|
|
@@ -189,13 +202,22 @@ module Aws::STS
|
|
|
189
202
|
# accepted modes and the configuration defaults that are included.
|
|
190
203
|
#
|
|
191
204
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
|
192
|
-
#
|
|
193
|
-
# to default service endpoint when available.
|
|
205
|
+
# When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
|
|
194
206
|
#
|
|
195
|
-
# @option options [
|
|
196
|
-
#
|
|
197
|
-
#
|
|
198
|
-
#
|
|
207
|
+
# @option options [Boolean] :disable_request_compression (false)
|
|
208
|
+
# When set to 'true' the request body will not be compressed
|
|
209
|
+
# for supported operations.
|
|
210
|
+
#
|
|
211
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
|
212
|
+
# Normally you should not configure the `:endpoint` option
|
|
213
|
+
# directly. This is normally constructed from the `:region`
|
|
214
|
+
# option. Configuring `:endpoint` is normally reserved for
|
|
215
|
+
# connecting to test or custom endpoints. The endpoint should
|
|
216
|
+
# be a URI formatted like:
|
|
217
|
+
#
|
|
218
|
+
# 'http://example.com'
|
|
219
|
+
# 'https://example.com'
|
|
220
|
+
# 'http://example.com:123'
|
|
199
221
|
#
|
|
200
222
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
201
223
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
@@ -212,6 +234,10 @@ module Aws::STS
|
|
|
212
234
|
# @option options [Boolean] :endpoint_discovery (false)
|
|
213
235
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
|
214
236
|
#
|
|
237
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
|
238
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
|
239
|
+
# variables and the shared configuration file.
|
|
240
|
+
#
|
|
215
241
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
|
216
242
|
# The log formatter.
|
|
217
243
|
#
|
|
@@ -232,6 +258,34 @@ module Aws::STS
|
|
|
232
258
|
# Used when loading credentials from the shared credentials file
|
|
233
259
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
|
234
260
|
#
|
|
261
|
+
# @option options [String] :request_checksum_calculation ("when_supported")
|
|
262
|
+
# Determines when a checksum will be calculated for request payloads. Values are:
|
|
263
|
+
#
|
|
264
|
+
# * `when_supported` - (default) When set, a checksum will be
|
|
265
|
+
# calculated for all request payloads of operations modeled with the
|
|
266
|
+
# `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
|
|
267
|
+
# `requestAlgorithmMember` is modeled.
|
|
268
|
+
# * `when_required` - When set, a checksum will only be calculated for
|
|
269
|
+
# request payloads of operations modeled with the `httpChecksum` trait where
|
|
270
|
+
# `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
|
|
271
|
+
# is modeled and supplied.
|
|
272
|
+
#
|
|
273
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
|
274
|
+
# The minimum size in bytes that triggers compression for request
|
|
275
|
+
# bodies. The value must be non-negative integer value between 0
|
|
276
|
+
# and 10485780 bytes inclusive.
|
|
277
|
+
#
|
|
278
|
+
# @option options [String] :response_checksum_validation ("when_supported")
|
|
279
|
+
# Determines when checksum validation will be performed on response payloads. Values are:
|
|
280
|
+
#
|
|
281
|
+
# * `when_supported` - (default) When set, checksum validation is performed on all
|
|
282
|
+
# response payloads of operations modeled with the `httpChecksum` trait where
|
|
283
|
+
# `responseAlgorithms` is modeled, except when no modeled checksum algorithms
|
|
284
|
+
# are supported.
|
|
285
|
+
# * `when_required` - When set, checksum validation is not performed on
|
|
286
|
+
# response payloads of operations unless the checksum algorithm is supported and
|
|
287
|
+
# the `requestValidationModeMember` member is set to `ENABLED`.
|
|
288
|
+
#
|
|
235
289
|
# @option options [Proc] :retry_backoff
|
|
236
290
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
|
237
291
|
# This option is only used in the `legacy` retry mode.
|
|
@@ -276,11 +330,25 @@ module Aws::STS
|
|
|
276
330
|
# throttling. This is a provisional mode that may change behavior
|
|
277
331
|
# in the future.
|
|
278
332
|
#
|
|
333
|
+
# @option options [String] :sdk_ua_app_id
|
|
334
|
+
# A unique and opaque application ID that is appended to the
|
|
335
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
|
336
|
+
# maximum length of 50. This variable is sourced from environment
|
|
337
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
|
279
338
|
#
|
|
280
339
|
# @option options [String] :secret_access_key
|
|
281
340
|
#
|
|
282
341
|
# @option options [String] :session_token
|
|
283
342
|
#
|
|
343
|
+
# @option options [Array] :sigv4a_signing_region_set
|
|
344
|
+
# A list of regions that should be signed with SigV4a signing. When
|
|
345
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
|
346
|
+
# in the following locations:
|
|
347
|
+
#
|
|
348
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
|
349
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
|
350
|
+
# * `~/.aws/config`
|
|
351
|
+
#
|
|
284
352
|
# @option options [String] :sts_regional_endpoints ("regional")
|
|
285
353
|
# Passing in 'regional' to enable regional endpoint for STS for all supported
|
|
286
354
|
# regions (except 'aws-global'). Using 'legacy' mode will force all legacy
|
|
@@ -295,6 +363,16 @@ module Aws::STS
|
|
|
295
363
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
|
296
364
|
# requests are made, and retries are disabled.
|
|
297
365
|
#
|
|
366
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
|
367
|
+
# Allows you to provide a telemetry provider, which is used to
|
|
368
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
|
369
|
+
# will not record or emit any telemetry data. The SDK supports the
|
|
370
|
+
# following telemetry providers:
|
|
371
|
+
#
|
|
372
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
|
373
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
|
374
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
|
375
|
+
#
|
|
298
376
|
# @option options [Aws::TokenProvider] :token_provider
|
|
299
377
|
# A Bearer Token Provider. This can be an instance of any one of the
|
|
300
378
|
# following classes:
|
|
@@ -322,52 +400,75 @@ module Aws::STS
|
|
|
322
400
|
# sending the request.
|
|
323
401
|
#
|
|
324
402
|
# @option options [Aws::STS::EndpointProvider] :endpoint_provider
|
|
325
|
-
# The endpoint provider used to resolve endpoints. Any object that responds to
|
|
326
|
-
#
|
|
327
|
-
#
|
|
328
|
-
#
|
|
329
|
-
#
|
|
330
|
-
#
|
|
331
|
-
#
|
|
332
|
-
# `
|
|
333
|
-
#
|
|
334
|
-
#
|
|
335
|
-
#
|
|
336
|
-
#
|
|
337
|
-
#
|
|
338
|
-
#
|
|
339
|
-
#
|
|
340
|
-
#
|
|
341
|
-
#
|
|
342
|
-
#
|
|
343
|
-
#
|
|
344
|
-
#
|
|
345
|
-
#
|
|
346
|
-
#
|
|
347
|
-
#
|
|
348
|
-
#
|
|
403
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
|
404
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
|
405
|
+
# `Aws::STS::EndpointParameters`.
|
|
406
|
+
#
|
|
407
|
+
# @option options [Float] :http_continue_timeout (1)
|
|
408
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
|
409
|
+
# request body. This option has no effect unless the request has "Expect"
|
|
410
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
|
411
|
+
# behaviour. This value can safely be set per request on the session.
|
|
412
|
+
#
|
|
413
|
+
# @option options [Float] :http_idle_timeout (5)
|
|
414
|
+
# The number of seconds a connection is allowed to sit idle before it
|
|
415
|
+
# is considered stale. Stale connections are closed and removed from the
|
|
416
|
+
# pool before making a request.
|
|
417
|
+
#
|
|
418
|
+
# @option options [Float] :http_open_timeout (15)
|
|
419
|
+
# The default number of seconds to wait for response data.
|
|
420
|
+
# This value can safely be set per-request on the session.
|
|
421
|
+
#
|
|
422
|
+
# @option options [URI::HTTP,String] :http_proxy
|
|
423
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
|
424
|
+
#
|
|
425
|
+
# @option options [Float] :http_read_timeout (60)
|
|
426
|
+
# The default number of seconds to wait for response data.
|
|
427
|
+
# This value can safely be set per-request on the session.
|
|
428
|
+
#
|
|
429
|
+
# @option options [Boolean] :http_wire_trace (false)
|
|
430
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
|
431
|
+
#
|
|
432
|
+
# @option options [Proc] :on_chunk_received
|
|
433
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
434
|
+
# of the response body is received. It provides three arguments: the chunk,
|
|
435
|
+
# the number of bytes received, and the total number of
|
|
436
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
|
437
|
+
#
|
|
438
|
+
# @option options [Proc] :on_chunk_sent
|
|
439
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
440
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
|
441
|
+
# the number of bytes read from the body, and the total number of
|
|
442
|
+
# bytes in the body.
|
|
443
|
+
#
|
|
444
|
+
# @option options [Boolean] :raise_response_errors (true)
|
|
445
|
+
# When `true`, response errors are raised.
|
|
446
|
+
#
|
|
447
|
+
# @option options [String] :ssl_ca_bundle
|
|
448
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
|
449
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
|
450
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
|
451
|
+
#
|
|
452
|
+
# @option options [String] :ssl_ca_directory
|
|
453
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
|
454
|
+
# authority files for verifying peer certificates. If you do
|
|
455
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
|
456
|
+
# default will be used if available.
|
|
349
457
|
#
|
|
350
|
-
# @option options [
|
|
351
|
-
#
|
|
458
|
+
# @option options [String] :ssl_ca_store
|
|
459
|
+
# Sets the X509::Store to verify peer certificate.
|
|
352
460
|
#
|
|
353
|
-
# @option options [
|
|
354
|
-
#
|
|
461
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
|
462
|
+
# Sets a client certificate when creating http connections.
|
|
355
463
|
#
|
|
356
|
-
# @option options [
|
|
357
|
-
#
|
|
358
|
-
# connection.
|
|
464
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
|
465
|
+
# Sets a client key when creating http connections.
|
|
359
466
|
#
|
|
360
|
-
# @option options [
|
|
361
|
-
#
|
|
362
|
-
# verifying peer certificates. If you do not pass
|
|
363
|
-
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
|
364
|
-
# will be used if available.
|
|
467
|
+
# @option options [Float] :ssl_timeout
|
|
468
|
+
# Sets the SSL timeout in seconds
|
|
365
469
|
#
|
|
366
|
-
# @option options [
|
|
367
|
-
#
|
|
368
|
-
# authority files for verifying peer certificates. If you do
|
|
369
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
|
370
|
-
# system default will be used if available.
|
|
470
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
|
471
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
|
371
472
|
#
|
|
372
473
|
def initialize(*args)
|
|
373
474
|
super
|
|
@@ -376,14 +477,13 @@ module Aws::STS
|
|
|
376
477
|
# @!group API Operations
|
|
377
478
|
|
|
378
479
|
# Returns a set of temporary security credentials that you can use to
|
|
379
|
-
# access Amazon Web Services resources
|
|
380
|
-
#
|
|
381
|
-
#
|
|
382
|
-
#
|
|
383
|
-
#
|
|
384
|
-
#
|
|
385
|
-
#
|
|
386
|
-
# operations][2] in the *IAM User Guide*.
|
|
480
|
+
# access Amazon Web Services resources. These temporary credentials
|
|
481
|
+
# consist of an access key ID, a secret access key, and a security
|
|
482
|
+
# token. Typically, you use `AssumeRole` within your account or for
|
|
483
|
+
# cross-account access. For a comparison of `AssumeRole` with other API
|
|
484
|
+
# operations that produce temporary credentials, see [Requesting
|
|
485
|
+
# Temporary Security Credentials][1] and [Compare STS credentials][2] in
|
|
486
|
+
# the *IAM User Guide*.
|
|
387
487
|
#
|
|
388
488
|
# **Permissions**
|
|
389
489
|
#
|
|
@@ -392,9 +492,9 @@ module Aws::STS
|
|
|
392
492
|
# following exception: You cannot call the Amazon Web Services STS
|
|
393
493
|
# `GetFederationToken` or `GetSessionToken` API operations.
|
|
394
494
|
#
|
|
395
|
-
# (Optional) You can pass inline or managed
|
|
396
|
-
#
|
|
397
|
-
#
|
|
495
|
+
# (Optional) You can pass inline or managed session policies to this
|
|
496
|
+
# operation. You can pass a single JSON policy document to use as an
|
|
497
|
+
# inline session policy. You can also specify up to 10 managed policy
|
|
398
498
|
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
|
399
499
|
# plaintext that you use for both inline and managed session policies
|
|
400
500
|
# can't exceed 2,048 characters. Passing policies to this operation
|
|
@@ -407,10 +507,11 @@ module Aws::STS
|
|
|
407
507
|
# identity-based policy of the role that is being assumed. For more
|
|
408
508
|
# information, see [Session Policies][3] in the *IAM User Guide*.
|
|
409
509
|
#
|
|
410
|
-
# When you create a role, you create two policies:
|
|
411
|
-
# that specifies *who* can assume the role and a permissions policy
|
|
412
|
-
# specifies *what* can be done with the role. You specify the
|
|
413
|
-
# principal
|
|
510
|
+
# When you create a role, you create two policies: a role trust policy
|
|
511
|
+
# that specifies *who* can assume the role, and a permissions policy
|
|
512
|
+
# that specifies *what* can be done with the role. You specify the
|
|
513
|
+
# trusted principal that is allowed to assume the role in the role trust
|
|
514
|
+
# policy.
|
|
414
515
|
#
|
|
415
516
|
# To assume a role from a different account, your Amazon Web Services
|
|
416
517
|
# account must be trusted by the role. The trust relationship is defined
|
|
@@ -419,10 +520,9 @@ module Aws::STS
|
|
|
419
520
|
# users in the account.
|
|
420
521
|
#
|
|
421
522
|
# A user who wants to access a role in a different account must also
|
|
422
|
-
# have permissions that are delegated from the
|
|
423
|
-
#
|
|
424
|
-
#
|
|
425
|
-
# account.
|
|
523
|
+
# have permissions that are delegated from the account administrator.
|
|
524
|
+
# The administrator must attach a policy that allows the user to call
|
|
525
|
+
# `AssumeRole` for the ARN of the role in the other account.
|
|
426
526
|
#
|
|
427
527
|
# To allow a user to assume a role in the same account, you can do
|
|
428
528
|
# either of the following:
|
|
@@ -467,7 +567,7 @@ module Aws::STS
|
|
|
467
567
|
# denied. The condition in a trust policy that tests for MFA
|
|
468
568
|
# authentication might look like the following example.
|
|
469
569
|
#
|
|
470
|
-
# `"Condition":
|
|
570
|
+
# `"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}`
|
|
471
571
|
#
|
|
472
572
|
# For more information, see [Configuring MFA-Protected API Access][8] in
|
|
473
573
|
# the *IAM User Guide* guide.
|
|
@@ -480,7 +580,7 @@ module Aws::STS
|
|
|
480
580
|
#
|
|
481
581
|
#
|
|
482
582
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
483
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
583
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
484
584
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
|
485
585
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
|
486
586
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
|
@@ -503,11 +603,22 @@ module Aws::STS
|
|
|
503
603
|
# credentials will expose the role session name to the external account
|
|
504
604
|
# in their CloudTrail logs.
|
|
505
605
|
#
|
|
606
|
+
# For security purposes, administrators can view this field in
|
|
607
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
|
608
|
+
# Amazon Web Services. Your administrator might require that you specify
|
|
609
|
+
# your user name as the session name when you assume the role. For more
|
|
610
|
+
# information, see [ `sts:RoleSessionName` ][2].
|
|
611
|
+
#
|
|
506
612
|
# The regex used to validate this parameter is a string of characters
|
|
507
613
|
# consisting of upper- and lower-case alphanumeric characters with no
|
|
508
614
|
# spaces. You can also include underscores or any of the following
|
|
509
615
|
# characters: =,.@-
|
|
510
616
|
#
|
|
617
|
+
#
|
|
618
|
+
#
|
|
619
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
|
620
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
|
621
|
+
#
|
|
511
622
|
# @option params [Array<Types::PolicyDescriptorType>] :policy_arns
|
|
512
623
|
# The Amazon Resource Names (ARNs) of the IAM managed policies that you
|
|
513
624
|
# want to use as managed session policies. The policies must exist in
|
|
@@ -573,6 +684,9 @@ module Aws::STS
|
|
|
573
684
|
#
|
|
574
685
|
# </note>
|
|
575
686
|
#
|
|
687
|
+
# For more information about role session permissions, see [Session
|
|
688
|
+
# policies][1].
|
|
689
|
+
#
|
|
576
690
|
#
|
|
577
691
|
#
|
|
578
692
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
|
@@ -595,9 +709,8 @@ module Aws::STS
|
|
|
595
709
|
# depending on the maximum session duration setting for your role.
|
|
596
710
|
# However, if you assume a role using role chaining and provide a
|
|
597
711
|
# `DurationSeconds` parameter value greater than one hour, the operation
|
|
598
|
-
# fails. To learn how to view the maximum value for your role, see
|
|
599
|
-
# the
|
|
600
|
-
# Guide*.
|
|
712
|
+
# fails. To learn how to view the maximum value for your role, see
|
|
713
|
+
# [Update the maximum session duration for a role][1].
|
|
601
714
|
#
|
|
602
715
|
# By default, the value is set to `3600` seconds.
|
|
603
716
|
#
|
|
@@ -613,7 +726,7 @@ module Aws::STS
|
|
|
613
726
|
#
|
|
614
727
|
#
|
|
615
728
|
#
|
|
616
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
729
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
|
617
730
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
|
|
618
731
|
#
|
|
619
732
|
# @option params [Array<Types::Tag>] :tags
|
|
@@ -666,9 +779,8 @@ module Aws::STS
|
|
|
666
779
|
# passes to subsequent sessions in a role chain. For more information,
|
|
667
780
|
# see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
|
|
668
781
|
#
|
|
669
|
-
# This parameter is optional.
|
|
670
|
-
#
|
|
671
|
-
# affected.
|
|
782
|
+
# This parameter is optional. The transitive status of a session tag
|
|
783
|
+
# does not impact its packed binary size.
|
|
672
784
|
#
|
|
673
785
|
# If you choose not to specify a transitive tag key, then no tags are
|
|
674
786
|
# passed from this session to any subsequent sessions.
|
|
@@ -726,26 +838,40 @@ module Aws::STS
|
|
|
726
838
|
#
|
|
727
839
|
# @option params [String] :source_identity
|
|
728
840
|
# The source identity specified by the principal that is calling the
|
|
729
|
-
# `AssumeRole` operation.
|
|
841
|
+
# `AssumeRole` operation. The source identity value persists across
|
|
842
|
+
# [chained role][1] sessions.
|
|
730
843
|
#
|
|
731
844
|
# You can require users to specify a source identity when they assume a
|
|
732
|
-
# role. You do this by using the `sts:SourceIdentity` condition
|
|
733
|
-
# role trust policy. You can use source identity information in
|
|
845
|
+
# role. You do this by using the [ `sts:SourceIdentity` ][2] condition
|
|
846
|
+
# key in a role trust policy. You can use source identity information in
|
|
734
847
|
# CloudTrail logs to determine who took actions with a role. You can use
|
|
735
848
|
# the `aws:SourceIdentity` condition key to further control access to
|
|
736
849
|
# Amazon Web Services resources based on the value of source identity.
|
|
737
850
|
# For more information about using source identity, see [Monitor and
|
|
738
|
-
# control actions taken with assumed roles][
|
|
851
|
+
# control actions taken with assumed roles][3] in the *IAM User Guide*.
|
|
739
852
|
#
|
|
740
853
|
# The regex used to validate this parameter is a string of characters
|
|
741
854
|
# consisting of upper- and lower-case alphanumeric characters with no
|
|
742
855
|
# spaces. You can also include underscores or any of the following
|
|
743
|
-
# characters:
|
|
856
|
+
# characters: +=,.@-. You cannot use a value that begins with the text
|
|
744
857
|
# `aws:`. This prefix is reserved for Amazon Web Services internal use.
|
|
745
858
|
#
|
|
746
859
|
#
|
|
747
860
|
#
|
|
748
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
861
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
|
|
862
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
|
|
863
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
|
864
|
+
#
|
|
865
|
+
# @option params [Array<Types::ProvidedContext>] :provided_contexts
|
|
866
|
+
# A list of previously acquired trusted context assertions in the format
|
|
867
|
+
# of a JSON array. The trusted context assertion is signed and encrypted
|
|
868
|
+
# by Amazon Web Services STS.
|
|
869
|
+
#
|
|
870
|
+
# The following is an example of a `ProvidedContext` value that includes
|
|
871
|
+
# a single trusted context assertion and the ARN of the context provider
|
|
872
|
+
# from which the trusted context assertion was generated.
|
|
873
|
+
#
|
|
874
|
+
# `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
|
|
749
875
|
#
|
|
750
876
|
# @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
751
877
|
#
|
|
@@ -807,7 +933,7 @@ module Aws::STS
|
|
|
807
933
|
# arn: "arnType",
|
|
808
934
|
# },
|
|
809
935
|
# ],
|
|
810
|
-
# policy: "
|
|
936
|
+
# policy: "unrestrictedSessionPolicyDocumentType",
|
|
811
937
|
# duration_seconds: 1,
|
|
812
938
|
# tags: [
|
|
813
939
|
# {
|
|
@@ -820,6 +946,12 @@ module Aws::STS
|
|
|
820
946
|
# serial_number: "serialNumberType",
|
|
821
947
|
# token_code: "tokenCodeType",
|
|
822
948
|
# source_identity: "sourceIdentityType",
|
|
949
|
+
# provided_contexts: [
|
|
950
|
+
# {
|
|
951
|
+
# provider_arn: "arnType",
|
|
952
|
+
# context_assertion: "contextAssertionType",
|
|
953
|
+
# },
|
|
954
|
+
# ],
|
|
823
955
|
# })
|
|
824
956
|
#
|
|
825
957
|
# @example Response structure
|
|
@@ -849,8 +981,8 @@ module Aws::STS
|
|
|
849
981
|
# user-specific credentials or configuration. For a comparison of
|
|
850
982
|
# `AssumeRoleWithSAML` with the other API operations that produce
|
|
851
983
|
# temporary credentials, see [Requesting Temporary Security
|
|
852
|
-
# Credentials][1] and [
|
|
853
|
-
#
|
|
984
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
|
985
|
+
# Guide*.
|
|
854
986
|
#
|
|
855
987
|
# The temporary security credentials returned by this operation consist
|
|
856
988
|
# of an access key ID, a secret access key, and a security token.
|
|
@@ -980,7 +1112,7 @@ module Aws::STS
|
|
|
980
1112
|
#
|
|
981
1113
|
#
|
|
982
1114
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
983
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1115
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
984
1116
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
|
985
1117
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
|
986
1118
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
|
|
@@ -1068,6 +1200,9 @@ module Aws::STS
|
|
|
1068
1200
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
|
1069
1201
|
# characters.
|
|
1070
1202
|
#
|
|
1203
|
+
# For more information about role session permissions, see [Session
|
|
1204
|
+
# policies][1].
|
|
1205
|
+
#
|
|
1071
1206
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1072
1207
|
# policy, managed policy ARNs, and session tags into a packed binary
|
|
1073
1208
|
# format that has a separate limit. Your request can fail for this limit
|
|
@@ -1207,10 +1342,8 @@ module Aws::STS
|
|
|
1207
1342
|
# the user with a consistent identity throughout the lifetime of an
|
|
1208
1343
|
# application.
|
|
1209
1344
|
#
|
|
1210
|
-
# To learn more about Amazon Cognito, see [Amazon Cognito
|
|
1211
|
-
# in *Amazon
|
|
1212
|
-
# Cognito Overview][5] in the *Amazon Web Services SDK for iOS Developer
|
|
1213
|
-
# Guide*.
|
|
1345
|
+
# To learn more about Amazon Cognito, see [Amazon Cognito identity
|
|
1346
|
+
# pools][1] in *Amazon Cognito Developer Guide*.
|
|
1214
1347
|
#
|
|
1215
1348
|
# </note>
|
|
1216
1349
|
#
|
|
@@ -1224,8 +1357,8 @@ module Aws::STS
|
|
|
1224
1357
|
# a token from the web identity provider. For a comparison of
|
|
1225
1358
|
# `AssumeRoleWithWebIdentity` with the other API operations that produce
|
|
1226
1359
|
# temporary credentials, see [Requesting Temporary Security
|
|
1227
|
-
# Credentials][
|
|
1228
|
-
#
|
|
1360
|
+
# Credentials][4] and [Compare STS credentials][5] in the *IAM User
|
|
1361
|
+
# Guide*.
|
|
1229
1362
|
#
|
|
1230
1363
|
# The temporary security credentials returned by this API consist of an
|
|
1231
1364
|
# access key ID, a secret access key, and a security token. Applications
|
|
@@ -1240,12 +1373,12 @@ module Aws::STS
|
|
|
1240
1373
|
# your session. You can provide a value from 900 seconds (15 minutes) up
|
|
1241
1374
|
# to the maximum session duration setting for the role. This setting can
|
|
1242
1375
|
# have a value from 1 hour to 12 hours. To learn how to view the maximum
|
|
1243
|
-
# value for your role, see [
|
|
1244
|
-
#
|
|
1245
|
-
#
|
|
1376
|
+
# value for your role, see [Update the maximum session duration for a
|
|
1377
|
+
# role ][6] in the *IAM User Guide*. The maximum session duration limit
|
|
1378
|
+
# applies when you use the `AssumeRole*` API operations or the
|
|
1246
1379
|
# `assume-role*` CLI commands. However the limit does not apply when you
|
|
1247
1380
|
# use those operations to create a console URL. For more information,
|
|
1248
|
-
# see [Using IAM Roles][
|
|
1381
|
+
# see [Using IAM Roles][7] in the *IAM User Guide*.
|
|
1249
1382
|
#
|
|
1250
1383
|
# **Permissions**
|
|
1251
1384
|
#
|
|
@@ -1254,7 +1387,7 @@ module Aws::STS
|
|
|
1254
1387
|
# Amazon Web Services service with the following exception: you cannot
|
|
1255
1388
|
# call the STS `GetFederationToken` or `GetSessionToken` API operations.
|
|
1256
1389
|
#
|
|
1257
|
-
# (Optional) You can pass inline or managed [session policies][
|
|
1390
|
+
# (Optional) You can pass inline or managed [session policies][8] to
|
|
1258
1391
|
# this operation. You can pass a single JSON policy document to use as
|
|
1259
1392
|
# an inline session policy. You can also specify up to 10 managed policy
|
|
1260
1393
|
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
|
@@ -1267,19 +1400,19 @@ module Aws::STS
|
|
|
1267
1400
|
# resources in the account that owns the role. You cannot use session
|
|
1268
1401
|
# policies to grant more permissions than those allowed by the
|
|
1269
1402
|
# identity-based policy of the role that is being assumed. For more
|
|
1270
|
-
# information, see [Session Policies][
|
|
1403
|
+
# information, see [Session Policies][8] in the *IAM User Guide*.
|
|
1271
1404
|
#
|
|
1272
1405
|
# **Tags**
|
|
1273
1406
|
#
|
|
1274
1407
|
# (Optional) You can configure your IdP to pass attributes into your web
|
|
1275
1408
|
# identity token as session tags. Each session tag consists of a key
|
|
1276
1409
|
# name and an associated value. For more information about session tags,
|
|
1277
|
-
# see [Passing Session Tags in STS][
|
|
1410
|
+
# see [Passing Session Tags in STS][9] in the *IAM User Guide*.
|
|
1278
1411
|
#
|
|
1279
1412
|
# You can pass up to 50 session tags. The plaintext session tag keys
|
|
1280
1413
|
# can’t exceed 128 characters and the values can’t exceed 256
|
|
1281
1414
|
# characters. For these and additional limits, see [IAM and STS
|
|
1282
|
-
# Character Limits][
|
|
1415
|
+
# Character Limits][10] in the *IAM User Guide*.
|
|
1283
1416
|
#
|
|
1284
1417
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1285
1418
|
# policy, managed policy ARNs, and session tags into a packed binary
|
|
@@ -1297,12 +1430,12 @@ module Aws::STS
|
|
|
1297
1430
|
# An administrator must grant you the permissions necessary to pass
|
|
1298
1431
|
# session tags. The administrator can also create granular permissions
|
|
1299
1432
|
# to allow you to pass only specific session tags. For more information,
|
|
1300
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
|
1433
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][11] in
|
|
1301
1434
|
# the *IAM User Guide*.
|
|
1302
1435
|
#
|
|
1303
1436
|
# You can set the session tags as transitive. Transitive tags persist
|
|
1304
1437
|
# during role chaining. For more information, see [Chaining Roles with
|
|
1305
|
-
# Session Tags][
|
|
1438
|
+
# Session Tags][12] in the *IAM User Guide*.
|
|
1306
1439
|
#
|
|
1307
1440
|
# **Identities**
|
|
1308
1441
|
#
|
|
@@ -1314,22 +1447,17 @@ module Aws::STS
|
|
|
1314
1447
|
# specified in the role's trust policy.
|
|
1315
1448
|
#
|
|
1316
1449
|
# Calling `AssumeRoleWithWebIdentity` can result in an entry in your
|
|
1317
|
-
# CloudTrail logs. The entry includes the [Subject][
|
|
1450
|
+
# CloudTrail logs. The entry includes the [Subject][13] of the provided
|
|
1318
1451
|
# web identity token. We recommend that you avoid using any personally
|
|
1319
1452
|
# identifiable information (PII) in this field. For example, you could
|
|
1320
1453
|
# instead use a GUID or a pairwise identifier, as [suggested in the OIDC
|
|
1321
|
-
# specification][
|
|
1454
|
+
# specification][14].
|
|
1322
1455
|
#
|
|
1323
|
-
# For more information about how to use
|
|
1456
|
+
# For more information about how to use OIDC federation and the
|
|
1324
1457
|
# `AssumeRoleWithWebIdentity` API, see the following resources:
|
|
1325
1458
|
#
|
|
1326
|
-
# * [Using Web Identity Federation API Operations for Mobile Apps][
|
|
1327
|
-
# and [Federation Through a Web-based Identity Provider][
|
|
1328
|
-
#
|
|
1329
|
-
# * [ Web Identity Federation Playground][19]. Walk through the process
|
|
1330
|
-
# of authenticating through Login with Amazon, Facebook, or Google,
|
|
1331
|
-
# getting temporary security credentials, and then using those
|
|
1332
|
-
# credentials to make a request to Amazon Web Services.
|
|
1459
|
+
# * [Using Web Identity Federation API Operations for Mobile Apps][15]
|
|
1460
|
+
# and [Federation Through a Web-based Identity Provider][16].
|
|
1333
1461
|
#
|
|
1334
1462
|
# * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
|
|
1335
1463
|
# Services SDK for Android Developer Guide][3]. These toolkits contain
|
|
@@ -1337,37 +1465,47 @@ module Aws::STS
|
|
|
1337
1465
|
# toolkits then show how to use the information from these providers
|
|
1338
1466
|
# to get and use temporary security credentials.
|
|
1339
1467
|
#
|
|
1340
|
-
# * [Web Identity Federation with Mobile Applications][20]. This article
|
|
1341
|
-
# discusses web identity federation and shows an example of how to use
|
|
1342
|
-
# web identity federation to get access to content in Amazon S3.
|
|
1343
|
-
#
|
|
1344
1468
|
#
|
|
1345
1469
|
#
|
|
1346
1470
|
# [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
|
1347
1471
|
# [2]: http://aws.amazon.com/sdkforios/
|
|
1348
1472
|
# [3]: http://aws.amazon.com/sdkforandroid/
|
|
1349
|
-
# [4]: https://docs.aws.amazon.com/
|
|
1350
|
-
# [5]: https://docs.aws.amazon.com/
|
|
1351
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1352
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1353
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1354
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1355
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1356
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1357
|
-
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1358
|
-
# [13]:
|
|
1359
|
-
# [14]:
|
|
1360
|
-
# [15]:
|
|
1361
|
-
# [16]:
|
|
1362
|
-
# [17]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
|
1363
|
-
# [18]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
|
1364
|
-
# [19]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
|
|
1365
|
-
# [20]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
|
1473
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
1474
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
1475
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
|
1476
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
|
1477
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
|
1478
|
+
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
|
1479
|
+
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
|
1480
|
+
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
|
1481
|
+
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
|
1482
|
+
# [13]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
|
|
1483
|
+
# [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
|
1484
|
+
# [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
|
1485
|
+
# [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
|
1366
1486
|
#
|
|
1367
1487
|
# @option params [required, String] :role_arn
|
|
1368
1488
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
|
1369
1489
|
# assuming.
|
|
1370
1490
|
#
|
|
1491
|
+
# <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools that
|
|
1492
|
+
# assume [cross-account IAM roles][1]. The trust policies of these roles
|
|
1493
|
+
# must accept the `cognito-identity.amazonaws.com` service principal and
|
|
1494
|
+
# must contain the `cognito-identity.amazonaws.com:aud` condition key to
|
|
1495
|
+
# restrict role assumption to users from your intended identity pools. A
|
|
1496
|
+
# policy that trusts Amazon Cognito identity pools without this
|
|
1497
|
+
# condition creates a risk that a user from an unintended identity pool
|
|
1498
|
+
# can assume the role. For more information, see [ Trust policies for
|
|
1499
|
+
# IAM roles in Basic (Classic) authentication ][2] in the *Amazon
|
|
1500
|
+
# Cognito Developer Guide*.
|
|
1501
|
+
#
|
|
1502
|
+
# </note>
|
|
1503
|
+
#
|
|
1504
|
+
#
|
|
1505
|
+
#
|
|
1506
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
|
|
1507
|
+
# [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
|
|
1508
|
+
#
|
|
1371
1509
|
# @option params [required, String] :role_session_name
|
|
1372
1510
|
# An identifier for the assumed role session. Typically, you pass the
|
|
1373
1511
|
# name or identifier that is associated with the user who is using your
|
|
@@ -1376,17 +1514,31 @@ module Aws::STS
|
|
|
1376
1514
|
# is included as part of the ARN and assumed role ID in the
|
|
1377
1515
|
# `AssumedRoleUser` response element.
|
|
1378
1516
|
#
|
|
1517
|
+
# For security purposes, administrators can view this field in
|
|
1518
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
|
1519
|
+
# Amazon Web Services. Your administrator might require that you specify
|
|
1520
|
+
# your user name as the session name when you assume the role. For more
|
|
1521
|
+
# information, see [ `sts:RoleSessionName` ][2].
|
|
1522
|
+
#
|
|
1379
1523
|
# The regex used to validate this parameter is a string of characters
|
|
1380
1524
|
# consisting of upper- and lower-case alphanumeric characters with no
|
|
1381
1525
|
# spaces. You can also include underscores or any of the following
|
|
1382
1526
|
# characters: =,.@-
|
|
1383
1527
|
#
|
|
1528
|
+
#
|
|
1529
|
+
#
|
|
1530
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
|
1531
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
|
1532
|
+
#
|
|
1384
1533
|
# @option params [required, String] :web_identity_token
|
|
1385
1534
|
# The OAuth 2.0 access token or OpenID Connect ID token that is provided
|
|
1386
1535
|
# by the identity provider. Your application must get this token by
|
|
1387
1536
|
# authenticating the user who is using your application with a web
|
|
1388
1537
|
# identity provider before the application makes an
|
|
1389
|
-
# `AssumeRoleWithWebIdentity` call.
|
|
1538
|
+
# `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
|
|
1539
|
+
# formatted as either an integer or a long integer. Tokens must be
|
|
1540
|
+
# signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
|
|
1541
|
+
# (ES256, ES384, or ES512).
|
|
1390
1542
|
#
|
|
1391
1543
|
# @option params [String] :provider_id
|
|
1392
1544
|
# The fully qualified host component of the domain name of the OAuth 2.0
|
|
@@ -1455,6 +1607,9 @@ module Aws::STS
|
|
|
1455
1607
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
|
1456
1608
|
# characters.
|
|
1457
1609
|
#
|
|
1610
|
+
# For more information about role session permissions, see [Session
|
|
1611
|
+
# policies][1].
|
|
1612
|
+
#
|
|
1458
1613
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1459
1614
|
# policy, managed policy ARNs, and session tags into a packed binary
|
|
1460
1615
|
# format that has a separate limit. Your request can fail for this limit
|
|
@@ -1575,6 +1730,121 @@ module Aws::STS
|
|
|
1575
1730
|
req.send_request(options)
|
|
1576
1731
|
end
|
|
1577
1732
|
|
|
1733
|
+
# Returns a set of short term credentials you can use to perform
|
|
1734
|
+
# privileged tasks on a member account in your organization.
|
|
1735
|
+
#
|
|
1736
|
+
# Before you can launch a privileged session, you must have centralized
|
|
1737
|
+
# root access in your organization. For steps to enable this feature,
|
|
1738
|
+
# see [Centralize root access for member accounts][1] in the *IAM User
|
|
1739
|
+
# Guide*.
|
|
1740
|
+
#
|
|
1741
|
+
# <note markdown="1"> The STS global endpoint is not supported for AssumeRoot. You must send
|
|
1742
|
+
# this request to a Regional STS endpoint. For more information, see
|
|
1743
|
+
# [Endpoints][2].
|
|
1744
|
+
#
|
|
1745
|
+
# </note>
|
|
1746
|
+
#
|
|
1747
|
+
# You can track AssumeRoot in CloudTrail logs to determine what actions
|
|
1748
|
+
# were performed in a session. For more information, see [Track
|
|
1749
|
+
# privileged tasks in CloudTrail][3] in the *IAM User Guide*.
|
|
1750
|
+
#
|
|
1751
|
+
#
|
|
1752
|
+
#
|
|
1753
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
|
|
1754
|
+
# [2]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
|
|
1755
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
|
|
1756
|
+
#
|
|
1757
|
+
# @option params [required, String] :target_principal
|
|
1758
|
+
# The member account principal ARN or account ID.
|
|
1759
|
+
#
|
|
1760
|
+
# @option params [required, Types::PolicyDescriptorType] :task_policy_arn
|
|
1761
|
+
# The identity based policy that scopes the session to the privileged
|
|
1762
|
+
# tasks that can be performed. You can use one of following Amazon Web
|
|
1763
|
+
# Services managed policies to scope root session actions.
|
|
1764
|
+
#
|
|
1765
|
+
# * [IAMAuditRootUserCredentials][1]
|
|
1766
|
+
#
|
|
1767
|
+
# * [IAMCreateRootUserPassword][2]
|
|
1768
|
+
#
|
|
1769
|
+
# * [IAMDeleteRootUserCredentials][3]
|
|
1770
|
+
#
|
|
1771
|
+
# * [S3UnlockBucketPolicy][4]
|
|
1772
|
+
#
|
|
1773
|
+
# * [SQSUnlockQueuePolicy][5]
|
|
1774
|
+
#
|
|
1775
|
+
#
|
|
1776
|
+
#
|
|
1777
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
|
|
1778
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
|
|
1779
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
|
|
1780
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
|
|
1781
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
|
|
1782
|
+
#
|
|
1783
|
+
# @option params [Integer] :duration_seconds
|
|
1784
|
+
# The duration, in seconds, of the privileged session. The value can
|
|
1785
|
+
# range from 0 seconds up to the maximum session duration of 900 seconds
|
|
1786
|
+
# (15 minutes). If you specify a value higher than this setting, the
|
|
1787
|
+
# operation fails.
|
|
1788
|
+
#
|
|
1789
|
+
# By default, the value is set to `900` seconds.
|
|
1790
|
+
#
|
|
1791
|
+
# @return [Types::AssumeRootResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1792
|
+
#
|
|
1793
|
+
# * {Types::AssumeRootResponse#credentials #credentials} => Types::Credentials
|
|
1794
|
+
# * {Types::AssumeRootResponse#source_identity #source_identity} => String
|
|
1795
|
+
#
|
|
1796
|
+
#
|
|
1797
|
+
# @example Example: To launch a privileged session
|
|
1798
|
+
#
|
|
1799
|
+
# # The following command retrieves a set of short-term credentials you can use to unlock an S3 bucket for a member account
|
|
1800
|
+
# # by removing the bucket policy.
|
|
1801
|
+
#
|
|
1802
|
+
# resp = client.assume_root({
|
|
1803
|
+
# duration_seconds: 900,
|
|
1804
|
+
# target_principal: "111122223333",
|
|
1805
|
+
# task_policy_arn: {
|
|
1806
|
+
# arn: "arn:aws:iam::aws:policy/root-task/S3UnlockBucketPolicy",
|
|
1807
|
+
# },
|
|
1808
|
+
# })
|
|
1809
|
+
#
|
|
1810
|
+
# resp.to_h outputs the following:
|
|
1811
|
+
# {
|
|
1812
|
+
# credentials: {
|
|
1813
|
+
# access_key_id: "ASIAJEXAMPLEXEG2JICEA",
|
|
1814
|
+
# expiration: Time.parse("2024-11-15T00:05:07Z"),
|
|
1815
|
+
# secret_access_key: "9drTJvcXLB89EXAMPLELB8923FB892xMFI",
|
|
1816
|
+
# session_token: "AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=",
|
|
1817
|
+
# },
|
|
1818
|
+
# source_identity: "Alice",
|
|
1819
|
+
# }
|
|
1820
|
+
#
|
|
1821
|
+
# @example Request syntax with placeholder values
|
|
1822
|
+
#
|
|
1823
|
+
# resp = client.assume_root({
|
|
1824
|
+
# target_principal: "TargetPrincipalType", # required
|
|
1825
|
+
# task_policy_arn: { # required
|
|
1826
|
+
# arn: "arnType",
|
|
1827
|
+
# },
|
|
1828
|
+
# duration_seconds: 1,
|
|
1829
|
+
# })
|
|
1830
|
+
#
|
|
1831
|
+
# @example Response structure
|
|
1832
|
+
#
|
|
1833
|
+
# resp.credentials.access_key_id #=> String
|
|
1834
|
+
# resp.credentials.secret_access_key #=> String
|
|
1835
|
+
# resp.credentials.session_token #=> String
|
|
1836
|
+
# resp.credentials.expiration #=> Time
|
|
1837
|
+
# resp.source_identity #=> String
|
|
1838
|
+
#
|
|
1839
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoot AWS API Documentation
|
|
1840
|
+
#
|
|
1841
|
+
# @overload assume_root(params = {})
|
|
1842
|
+
# @param [Hash] params ({})
|
|
1843
|
+
def assume_root(params = {}, options = {})
|
|
1844
|
+
req = build_request(:assume_root, params)
|
|
1845
|
+
req.send_request(options)
|
|
1846
|
+
end
|
|
1847
|
+
|
|
1578
1848
|
# Decodes additional information about the authorization status of a
|
|
1579
1849
|
# request from an encoded message returned in response to an Amazon Web
|
|
1580
1850
|
# Services request.
|
|
@@ -1721,11 +1991,11 @@ module Aws::STS
|
|
|
1721
1991
|
# to call the operation.
|
|
1722
1992
|
#
|
|
1723
1993
|
# <note markdown="1"> No permissions are required to perform this operation. If an
|
|
1724
|
-
# administrator
|
|
1994
|
+
# administrator attaches a policy to your identity that explicitly
|
|
1725
1995
|
# denies access to the `sts:GetCallerIdentity` action, you can still
|
|
1726
1996
|
# perform this operation. Permissions are not required because the same
|
|
1727
|
-
# information is returned when
|
|
1728
|
-
#
|
|
1997
|
+
# information is returned when access is denied. To view an example
|
|
1998
|
+
# response, see [I Am Not Authorized to Perform:
|
|
1729
1999
|
# iam:DeleteVirtualMFADevice][1] in the *IAM User Guide*.
|
|
1730
2000
|
#
|
|
1731
2001
|
# </note>
|
|
@@ -1802,54 +2072,57 @@ module Aws::STS
|
|
|
1802
2072
|
end
|
|
1803
2073
|
|
|
1804
2074
|
# Returns a set of temporary security credentials (consisting of an
|
|
1805
|
-
# access key ID, a secret access key, and a security token) for a
|
|
1806
|
-
#
|
|
1807
|
-
#
|
|
1808
|
-
#
|
|
1809
|
-
#
|
|
1810
|
-
#
|
|
1811
|
-
#
|
|
1812
|
-
#
|
|
1813
|
-
#
|
|
1814
|
-
#
|
|
1815
|
-
#
|
|
2075
|
+
# access key ID, a secret access key, and a security token) for a user.
|
|
2076
|
+
# A typical use is in a proxy application that gets temporary security
|
|
2077
|
+
# credentials on behalf of distributed applications inside a corporate
|
|
2078
|
+
# network.
|
|
2079
|
+
#
|
|
2080
|
+
# You must call the `GetFederationToken` operation using the long-term
|
|
2081
|
+
# security credentials of an IAM user. As a result, this call is
|
|
2082
|
+
# appropriate in contexts where those credentials can be safeguarded,
|
|
2083
|
+
# usually in a server-based application. For a comparison of
|
|
2084
|
+
# `GetFederationToken` with the other API operations that produce
|
|
2085
|
+
# temporary credentials, see [Requesting Temporary Security
|
|
2086
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
|
2087
|
+
# Guide*.
|
|
2088
|
+
#
|
|
2089
|
+
# Although it is possible to call `GetFederationToken` using the
|
|
2090
|
+
# security credentials of an Amazon Web Services account root user
|
|
2091
|
+
# rather than an IAM user that you create for the purpose of a proxy
|
|
2092
|
+
# application, we do not recommend it. For more information, see
|
|
2093
|
+
# [Safeguard your root user credentials and don't use them for everyday
|
|
2094
|
+
# tasks][3] in the *IAM User Guide*.
|
|
1816
2095
|
#
|
|
1817
2096
|
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
|
1818
2097
|
# authenticate users using a web identity provider like Login with
|
|
1819
2098
|
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
|
1820
|
-
# provider. In this case, we recommend that you use [Amazon Cognito][
|
|
2099
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][4]
|
|
1821
2100
|
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
|
1822
|
-
# Through a Web-based Identity Provider][
|
|
2101
|
+
# Through a Web-based Identity Provider][5] in the *IAM User Guide*.
|
|
1823
2102
|
#
|
|
1824
2103
|
# </note>
|
|
1825
2104
|
#
|
|
1826
|
-
# You can also call `GetFederationToken` using the security credentials
|
|
1827
|
-
# of an Amazon Web Services account root user, but we do not recommend
|
|
1828
|
-
# it. Instead, we recommend that you create an IAM user for the purpose
|
|
1829
|
-
# of the proxy application. Then attach a policy to the IAM user that
|
|
1830
|
-
# limits federated users to only the actions and resources that they
|
|
1831
|
-
# need to access. For more information, see [IAM Best Practices][5] in
|
|
1832
|
-
# the *IAM User Guide*.
|
|
1833
|
-
#
|
|
1834
2105
|
# **Session duration**
|
|
1835
2106
|
#
|
|
1836
2107
|
# The temporary credentials are valid for the specified duration, from
|
|
1837
2108
|
# 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
|
|
1838
2109
|
# hours). The default session duration is 43,200 seconds (12 hours).
|
|
1839
|
-
# Temporary credentials obtained by using the
|
|
1840
|
-
#
|
|
1841
|
-
# (1 hour).
|
|
2110
|
+
# Temporary credentials obtained by using the root user credentials have
|
|
2111
|
+
# a maximum duration of 3,600 seconds (1 hour).
|
|
1842
2112
|
#
|
|
1843
2113
|
# **Permissions**
|
|
1844
2114
|
#
|
|
1845
2115
|
# You can use the temporary credentials created by `GetFederationToken`
|
|
1846
|
-
# in any Amazon Web Services service
|
|
2116
|
+
# in any Amazon Web Services service with the following exceptions:
|
|
1847
2117
|
#
|
|
1848
2118
|
# * You cannot call any IAM operations using the CLI or the Amazon Web
|
|
1849
|
-
# Services API.
|
|
2119
|
+
# Services API. This limitation does not apply to console sessions.
|
|
1850
2120
|
#
|
|
1851
2121
|
# * You cannot call any STS operations except `GetCallerIdentity`.
|
|
1852
2122
|
#
|
|
2123
|
+
# You can use temporary credentials for single sign-on (SSO) to the
|
|
2124
|
+
# console.
|
|
2125
|
+
#
|
|
1853
2126
|
# You must pass an inline or managed [session policy][6] to this
|
|
1854
2127
|
# operation. You can pass a single JSON policy document to use as an
|
|
1855
2128
|
# inline session policy. You can also specify up to 10 managed policy
|
|
@@ -1885,9 +2158,9 @@ module Aws::STS
|
|
|
1885
2158
|
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
|
1886
2159
|
# authenticate users using a web identity provider like Login with
|
|
1887
2160
|
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
|
1888
|
-
# provider. In this case, we recommend that you use [Amazon Cognito][
|
|
2161
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][4]
|
|
1889
2162
|
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
|
1890
|
-
# Through a Web-based Identity Provider][
|
|
2163
|
+
# Through a Web-based Identity Provider][5] in the *IAM User Guide*.
|
|
1891
2164
|
#
|
|
1892
2165
|
# </note>
|
|
1893
2166
|
#
|
|
@@ -1908,10 +2181,10 @@ module Aws::STS
|
|
|
1908
2181
|
#
|
|
1909
2182
|
#
|
|
1910
2183
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
1911
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1912
|
-
# [3]:
|
|
1913
|
-
# [4]:
|
|
1914
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
2184
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
2185
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
|
2186
|
+
# [4]: http://aws.amazon.com/cognito/
|
|
2187
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
|
1915
2188
|
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
|
1916
2189
|
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
|
|
1917
2190
|
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
|
@@ -2028,10 +2301,10 @@ module Aws::STS
|
|
|
2028
2301
|
# The duration, in seconds, that the session should last. Acceptable
|
|
2029
2302
|
# durations for federation sessions range from 900 seconds (15 minutes)
|
|
2030
2303
|
# to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
|
|
2031
|
-
# default. Sessions obtained using
|
|
2032
|
-
#
|
|
2033
|
-
#
|
|
2034
|
-
#
|
|
2304
|
+
# default. Sessions obtained using root user credentials are restricted
|
|
2305
|
+
# to a maximum of 3,600 seconds (one hour). If the specified duration is
|
|
2306
|
+
# longer than one hour, the session obtained by using root user
|
|
2307
|
+
# credentials defaults to one hour.
|
|
2035
2308
|
#
|
|
2036
2309
|
# @option params [Array<Types::Tag>] :tags
|
|
2037
2310
|
# A list of session tags. Each session tag consists of a key name and an
|
|
@@ -2151,16 +2424,17 @@ module Aws::STS
|
|
|
2151
2424
|
# secret access key, and a security token. Typically, you use
|
|
2152
2425
|
# `GetSessionToken` if you want to use MFA to protect programmatic calls
|
|
2153
2426
|
# to specific Amazon Web Services API operations like Amazon EC2
|
|
2154
|
-
# `StopInstances`.
|
|
2155
|
-
#
|
|
2156
|
-
# MFA
|
|
2157
|
-
#
|
|
2158
|
-
#
|
|
2159
|
-
#
|
|
2160
|
-
#
|
|
2161
|
-
#
|
|
2162
|
-
#
|
|
2163
|
-
#
|
|
2427
|
+
# `StopInstances`.
|
|
2428
|
+
#
|
|
2429
|
+
# MFA-enabled IAM users must call `GetSessionToken` and submit an MFA
|
|
2430
|
+
# code that is associated with their MFA device. Using the temporary
|
|
2431
|
+
# security credentials that the call returns, IAM users can then make
|
|
2432
|
+
# programmatic calls to API operations that require MFA authentication.
|
|
2433
|
+
# An incorrect MFA code causes the API to return an access denied error.
|
|
2434
|
+
# For a comparison of `GetSessionToken` with the other API operations
|
|
2435
|
+
# that produce temporary credentials, see [Requesting Temporary Security
|
|
2436
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
|
2437
|
+
# Guide*.
|
|
2164
2438
|
#
|
|
2165
2439
|
# <note markdown="1"> No permissions are required for users to perform this operation. The
|
|
2166
2440
|
# purpose of the `sts:GetSessionToken` operation is to authenticate the
|
|
@@ -2173,13 +2447,13 @@ module Aws::STS
|
|
|
2173
2447
|
# **Session Duration**
|
|
2174
2448
|
#
|
|
2175
2449
|
# The `GetSessionToken` operation must be called by using the long-term
|
|
2176
|
-
# Amazon Web Services security credentials of
|
|
2177
|
-
#
|
|
2178
|
-
#
|
|
2179
|
-
#
|
|
2180
|
-
# (
|
|
2181
|
-
#
|
|
2182
|
-
#
|
|
2450
|
+
# Amazon Web Services security credentials of an IAM user. Credentials
|
|
2451
|
+
# that are created by IAM users are valid for the duration that you
|
|
2452
|
+
# specify. This duration can range from 900 seconds (15 minutes) up to a
|
|
2453
|
+
# maximum of 129,600 seconds (36 hours), with a default of 43,200
|
|
2454
|
+
# seconds (12 hours). Credentials based on account credentials can range
|
|
2455
|
+
# from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a
|
|
2456
|
+
# default of 1 hour.
|
|
2183
2457
|
#
|
|
2184
2458
|
# **Permissions**
|
|
2185
2459
|
#
|
|
@@ -2193,32 +2467,31 @@ module Aws::STS
|
|
|
2193
2467
|
# * You cannot call any STS API *except* `AssumeRole` or
|
|
2194
2468
|
# `GetCallerIdentity`.
|
|
2195
2469
|
#
|
|
2196
|
-
#
|
|
2197
|
-
#
|
|
2198
|
-
#
|
|
2199
|
-
#
|
|
2200
|
-
# with Amazon Web Services.
|
|
2470
|
+
# The credentials that `GetSessionToken` returns are based on
|
|
2471
|
+
# permissions associated with the IAM user whose credentials were used
|
|
2472
|
+
# to call the operation. The temporary credentials have the same
|
|
2473
|
+
# permissions as the IAM user.
|
|
2201
2474
|
#
|
|
2202
|
-
#
|
|
2475
|
+
# <note markdown="1"> Although it is possible to call `GetSessionToken` using the security
|
|
2476
|
+
# credentials of an Amazon Web Services account root user rather than an
|
|
2477
|
+
# IAM user, we do not recommend it. If `GetSessionToken` is called using
|
|
2478
|
+
# root user credentials, the temporary credentials have root user
|
|
2479
|
+
# permissions. For more information, see [Safeguard your root user
|
|
2480
|
+
# credentials and don't use them for everyday tasks][4] in the *IAM
|
|
2481
|
+
# User Guide*
|
|
2203
2482
|
#
|
|
2204
|
-
#
|
|
2205
|
-
# permissions associated with the user whose credentials were used to
|
|
2206
|
-
# call the operation. If `GetSessionToken` is called using Amazon Web
|
|
2207
|
-
# Services account root user credentials, the temporary credentials have
|
|
2208
|
-
# root user permissions. Similarly, if `GetSessionToken` is called using
|
|
2209
|
-
# the credentials of an IAM user, the temporary credentials have the
|
|
2210
|
-
# same permissions as the IAM user.
|
|
2483
|
+
# </note>
|
|
2211
2484
|
#
|
|
2212
2485
|
# For more information about using `GetSessionToken` to create temporary
|
|
2213
|
-
# credentials,
|
|
2486
|
+
# credentials, see [Temporary Credentials for Users in Untrusted
|
|
2214
2487
|
# Environments][5] in the *IAM User Guide*.
|
|
2215
2488
|
#
|
|
2216
2489
|
#
|
|
2217
2490
|
#
|
|
2218
2491
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
2219
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
2492
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
2220
2493
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
|
|
2221
|
-
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#
|
|
2494
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
|
2222
2495
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
|
|
2223
2496
|
#
|
|
2224
2497
|
# @option params [Integer] :duration_seconds
|
|
@@ -2309,14 +2582,19 @@ module Aws::STS
|
|
|
2309
2582
|
# @api private
|
|
2310
2583
|
def build_request(operation_name, params = {})
|
|
2311
2584
|
handlers = @handlers.for(operation_name)
|
|
2585
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
|
2586
|
+
Aws::Telemetry.module_to_tracer_name('Aws::STS')
|
|
2587
|
+
)
|
|
2312
2588
|
context = Seahorse::Client::RequestContext.new(
|
|
2313
2589
|
operation_name: operation_name,
|
|
2314
2590
|
operation: config.api.operation(operation_name),
|
|
2315
2591
|
client: self,
|
|
2316
2592
|
params: params,
|
|
2317
|
-
config: config
|
|
2593
|
+
config: config,
|
|
2594
|
+
tracer: tracer
|
|
2595
|
+
)
|
|
2318
2596
|
context[:gem_name] = 'aws-sdk-core'
|
|
2319
|
-
context[:gem_version] = '3.
|
|
2597
|
+
context[:gem_version] = '3.224.1'
|
|
2320
2598
|
Seahorse::Client::Request.new(handlers, context)
|
|
2321
2599
|
end
|
|
2322
2600
|
|