aws-sdk-core 3.152.0 → 3.234.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +942 -1
- 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 +14 -3
- data/lib/aws-sdk-core/assume_role_credentials.rb +21 -13
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +16 -9
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
- data/lib/aws-sdk-core/binary/encode_handler.rb +13 -2
- 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 +81 -29
- 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 +186 -60
- data/lib/aws-sdk-core/endpoints/condition.rb +41 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +19 -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 +129 -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 +158 -0
- data/lib/aws-sdk-core/error_handler.rb +46 -0
- data/lib/aws-sdk-core/errors.rb +14 -5
- data/lib/aws-sdk-core/event_emitter.rb +1 -17
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +168 -155
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +46 -11
- data/lib/aws-sdk-core/json/handler.rb +13 -6
- data/lib/aws-sdk-core/json/json_engine.rb +3 -1
- data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
- data/lib/aws-sdk-core/json/parser.rb +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 +348 -169
- 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 +84 -38
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +6 -2
- 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 +164 -34
- data/lib/aws-sdk-core/plugins/request_compression.rb +226 -0
- data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +2 -1
- data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
- data/lib/aws-sdk-core/plugins/sign.rb +222 -0
- data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -0
- data/lib/aws-sdk-core/plugins/stub_responses.rb +59 -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 +192 -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 +20 -23
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/body.rb +32 -5
- data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +14 -10
- 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 +95 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +98 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +160 -36
- data/lib/aws-sdk-core/shared_credentials.rb +1 -7
- data/lib/aws-sdk-core/sso_credentials.rb +84 -46
- data/lib/aws-sdk-core/sso_token_provider.rb +3 -2
- data/lib/aws-sdk-core/static_token_provider.rb +1 -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/token.rb +3 -3
- data/lib/aws-sdk-core/token_provider.rb +4 -0
- data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
- data/lib/aws-sdk-core/util.rb +41 -1
- 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 +35 -43
- 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 -103
- data/lib/aws-sdk-sso/client.rb +219 -89
- data/lib/aws-sdk-sso/client_api.rb +7 -0
- data/lib/aws-sdk-sso/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-sso/endpoint_provider.rb +53 -0
- data/lib/aws-sdk-sso/endpoints.rb +20 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-sso/types.rb +1 -35
- data/lib/aws-sdk-sso.rb +15 -7
- data/lib/aws-sdk-ssooidc/client.rb +650 -118
- data/lib/aws-sdk-ssooidc/client_api.rb +94 -1
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +53 -0
- data/lib/aws-sdk-ssooidc/endpoints.rb +20 -0
- data/lib/aws-sdk-ssooidc/errors.rb +62 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-ssooidc/types.rb +437 -67
- data/lib/aws-sdk-ssooidc.rb +15 -7
- data/lib/aws-sdk-sts/client.rb +670 -368
- data/lib/aws-sdk-sts/client_api.rb +48 -9
- data/lib/aws-sdk-sts/customizations.rb +5 -2
- data/lib/aws-sdk-sts/endpoint_parameters.rb +79 -0
- data/lib/aws-sdk-sts/endpoint_provider.rb +107 -0
- data/lib/aws-sdk-sts/endpoints.rb +20 -0
- data/lib/aws-sdk-sts/errors.rb +15 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-sts/presigner.rb +12 -18
- data/lib/aws-sdk-sts/types.rb +296 -222
- data/lib/aws-sdk-sts.rb +15 -7
- data/lib/seahorse/client/async_base.rb +4 -6
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +18 -21
- data/lib/seahorse/client/configuration.rb +1 -5
- data/lib/seahorse/client/h2/connection.rb +27 -36
- 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 +15 -12
- 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 +40 -9
- data/lib/seahorse/client/request_context.rb +9 -2
- 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/lib/seahorse/util.rb +6 -1
- 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 +133 -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,23 +73,32 @@ 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)
|
|
83
|
-
add_plugin(Aws::Plugins::
|
|
86
|
+
add_plugin(Aws::Plugins::Telemetry)
|
|
87
|
+
add_plugin(Aws::Plugins::Sign)
|
|
84
88
|
add_plugin(Aws::Plugins::Protocols::Query)
|
|
85
89
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
|
90
|
+
add_plugin(Aws::STS::Plugins::Endpoints)
|
|
86
91
|
|
|
87
92
|
# @overload initialize(options)
|
|
88
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
|
+
#
|
|
89
99
|
# @option options [required, Aws::CredentialProvider] :credentials
|
|
90
|
-
# Your AWS credentials. This can be
|
|
91
|
-
# following classes:
|
|
100
|
+
# Your AWS credentials used for authentication. This can be any class that includes and implements
|
|
101
|
+
# `Aws::CredentialProvider`, or instance of any one of the following classes:
|
|
92
102
|
#
|
|
93
103
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
|
94
104
|
# credentials.
|
|
@@ -116,20 +126,24 @@ module Aws::STS
|
|
|
116
126
|
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
|
117
127
|
# from the Cognito Identity service.
|
|
118
128
|
#
|
|
119
|
-
# When `:credentials` are not configured directly, the following
|
|
120
|
-
# locations will be searched for credentials:
|
|
129
|
+
# When `:credentials` are not configured directly, the following locations will be searched for credentials:
|
|
121
130
|
#
|
|
122
131
|
# * `Aws.config[:credentials]`
|
|
123
|
-
#
|
|
124
|
-
# *
|
|
132
|
+
#
|
|
133
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
|
134
|
+
# `:account_id` options.
|
|
135
|
+
#
|
|
136
|
+
# * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
|
|
137
|
+
# `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
|
|
138
|
+
#
|
|
125
139
|
# * `~/.aws/credentials`
|
|
140
|
+
#
|
|
126
141
|
# * `~/.aws/config`
|
|
127
|
-
#
|
|
128
|
-
#
|
|
129
|
-
# `Aws::
|
|
130
|
-
# enable retries and extended timeouts. Instance profile credential
|
|
131
|
-
#
|
|
132
|
-
# to true.
|
|
142
|
+
#
|
|
143
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive.
|
|
144
|
+
# Construct and pass an instance of `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
|
145
|
+
# enable retries and extended timeouts. Instance profile credential fetching can be disabled by
|
|
146
|
+
# setting `ENV['AWS_EC2_METADATA_DISABLED']` to `true`.
|
|
133
147
|
#
|
|
134
148
|
# @option options [required, String] :region
|
|
135
149
|
# The AWS region to connect to. The configured `:region` is
|
|
@@ -145,6 +159,8 @@ module Aws::STS
|
|
|
145
159
|
#
|
|
146
160
|
# @option options [String] :access_key_id
|
|
147
161
|
#
|
|
162
|
+
# @option options [String] :account_id
|
|
163
|
+
#
|
|
148
164
|
# @option options [Boolean] :active_endpoint_cache (false)
|
|
149
165
|
# When set to `true`, a thread polling for endpoints will be running in
|
|
150
166
|
# the background every 60 secs (default). Defaults to `false`.
|
|
@@ -155,6 +171,11 @@ module Aws::STS
|
|
|
155
171
|
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
|
156
172
|
# not retry instead of sleeping.
|
|
157
173
|
#
|
|
174
|
+
# @option options [Array<String>] :auth_scheme_preference
|
|
175
|
+
# A list of preferred authentication schemes to use when making a request. Supported values are:
|
|
176
|
+
# `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
|
|
177
|
+
# shared config as `auth_scheme_preference`, the value should be a comma-separated list.
|
|
178
|
+
#
|
|
158
179
|
# @option options [Boolean] :client_side_monitoring (false)
|
|
159
180
|
# When `true`, client-side metrics will be collected for all API requests from
|
|
160
181
|
# this client.
|
|
@@ -188,13 +209,22 @@ module Aws::STS
|
|
|
188
209
|
# accepted modes and the configuration defaults that are included.
|
|
189
210
|
#
|
|
190
211
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
|
191
|
-
#
|
|
192
|
-
#
|
|
212
|
+
# When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
|
|
213
|
+
#
|
|
214
|
+
# @option options [Boolean] :disable_request_compression (false)
|
|
215
|
+
# When set to 'true' the request body will not be compressed
|
|
216
|
+
# for supported operations.
|
|
193
217
|
#
|
|
194
|
-
# @option options [String] :endpoint
|
|
195
|
-
#
|
|
196
|
-
#
|
|
197
|
-
#
|
|
218
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
|
219
|
+
# Normally you should not configure the `:endpoint` option
|
|
220
|
+
# directly. This is normally constructed from the `:region`
|
|
221
|
+
# option. Configuring `:endpoint` is normally reserved for
|
|
222
|
+
# connecting to test or custom endpoints. The endpoint should
|
|
223
|
+
# be a URI formatted like:
|
|
224
|
+
#
|
|
225
|
+
# 'http://example.com'
|
|
226
|
+
# 'https://example.com'
|
|
227
|
+
# 'http://example.com:123'
|
|
198
228
|
#
|
|
199
229
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
200
230
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
@@ -211,6 +241,10 @@ module Aws::STS
|
|
|
211
241
|
# @option options [Boolean] :endpoint_discovery (false)
|
|
212
242
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
|
213
243
|
#
|
|
244
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
|
245
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
|
246
|
+
# variables and the shared configuration file.
|
|
247
|
+
#
|
|
214
248
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
|
215
249
|
# The log formatter.
|
|
216
250
|
#
|
|
@@ -228,8 +262,36 @@ module Aws::STS
|
|
|
228
262
|
# 4 times. Used in `standard` and `adaptive` retry modes.
|
|
229
263
|
#
|
|
230
264
|
# @option options [String] :profile ("default")
|
|
231
|
-
# Used when loading credentials from the shared credentials file
|
|
232
|
-
#
|
|
265
|
+
# Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
|
|
266
|
+
# When not specified, 'default' is used.
|
|
267
|
+
#
|
|
268
|
+
# @option options [String] :request_checksum_calculation ("when_supported")
|
|
269
|
+
# Determines when a checksum will be calculated for request payloads. Values are:
|
|
270
|
+
#
|
|
271
|
+
# * `when_supported` - (default) When set, a checksum will be
|
|
272
|
+
# calculated for all request payloads of operations modeled with the
|
|
273
|
+
# `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
|
|
274
|
+
# `requestAlgorithmMember` is modeled.
|
|
275
|
+
# * `when_required` - When set, a checksum will only be calculated for
|
|
276
|
+
# request payloads of operations modeled with the `httpChecksum` trait where
|
|
277
|
+
# `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
|
|
278
|
+
# is modeled and supplied.
|
|
279
|
+
#
|
|
280
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
|
281
|
+
# The minimum size in bytes that triggers compression for request
|
|
282
|
+
# bodies. The value must be non-negative integer value between 0
|
|
283
|
+
# and 10485780 bytes inclusive.
|
|
284
|
+
#
|
|
285
|
+
# @option options [String] :response_checksum_validation ("when_supported")
|
|
286
|
+
# Determines when checksum validation will be performed on response payloads. Values are:
|
|
287
|
+
#
|
|
288
|
+
# * `when_supported` - (default) When set, checksum validation is performed on all
|
|
289
|
+
# response payloads of operations modeled with the `httpChecksum` trait where
|
|
290
|
+
# `responseAlgorithms` is modeled, except when no modeled checksum algorithms
|
|
291
|
+
# are supported.
|
|
292
|
+
# * `when_required` - When set, checksum validation is not performed on
|
|
293
|
+
# response payloads of operations unless the checksum algorithm is supported and
|
|
294
|
+
# the `requestValidationModeMember` member is set to `ENABLED`.
|
|
233
295
|
#
|
|
234
296
|
# @option options [Proc] :retry_backoff
|
|
235
297
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
|
@@ -275,11 +337,25 @@ module Aws::STS
|
|
|
275
337
|
# throttling. This is a provisional mode that may change behavior
|
|
276
338
|
# in the future.
|
|
277
339
|
#
|
|
340
|
+
# @option options [String] :sdk_ua_app_id
|
|
341
|
+
# A unique and opaque application ID that is appended to the
|
|
342
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
|
343
|
+
# maximum length of 50. This variable is sourced from environment
|
|
344
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
|
278
345
|
#
|
|
279
346
|
# @option options [String] :secret_access_key
|
|
280
347
|
#
|
|
281
348
|
# @option options [String] :session_token
|
|
282
349
|
#
|
|
350
|
+
# @option options [Array] :sigv4a_signing_region_set
|
|
351
|
+
# A list of regions that should be signed with SigV4a signing. When
|
|
352
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
|
353
|
+
# in the following locations:
|
|
354
|
+
#
|
|
355
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
|
356
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
|
357
|
+
# * `~/.aws/config`
|
|
358
|
+
#
|
|
283
359
|
# @option options [String] :sts_regional_endpoints ("regional")
|
|
284
360
|
# Passing in 'regional' to enable regional endpoint for STS for all supported
|
|
285
361
|
# regions (except 'aws-global'). Using 'legacy' mode will force all legacy
|
|
@@ -294,6 +370,29 @@ module Aws::STS
|
|
|
294
370
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
|
295
371
|
# requests are made, and retries are disabled.
|
|
296
372
|
#
|
|
373
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
|
374
|
+
# Allows you to provide a telemetry provider, which is used to
|
|
375
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
|
376
|
+
# will not record or emit any telemetry data. The SDK supports the
|
|
377
|
+
# following telemetry providers:
|
|
378
|
+
#
|
|
379
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
|
380
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
|
381
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
|
382
|
+
#
|
|
383
|
+
# @option options [Aws::TokenProvider] :token_provider
|
|
384
|
+
# Your Bearer token used for authentication. This can be any class that includes and implements
|
|
385
|
+
# `Aws::TokenProvider`, or instance of any one of the following classes:
|
|
386
|
+
#
|
|
387
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
|
388
|
+
# tokens.
|
|
389
|
+
#
|
|
390
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
|
391
|
+
# access token generated from `aws login`.
|
|
392
|
+
#
|
|
393
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
|
394
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
|
395
|
+
#
|
|
297
396
|
# @option options [Boolean] :use_dualstack_endpoint
|
|
298
397
|
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
|
299
398
|
# will be used if available.
|
|
@@ -307,50 +406,76 @@ module Aws::STS
|
|
|
307
406
|
# When `true`, request parameters are validated before
|
|
308
407
|
# sending the request.
|
|
309
408
|
#
|
|
310
|
-
# @option options [
|
|
311
|
-
#
|
|
312
|
-
#
|
|
313
|
-
#
|
|
314
|
-
#
|
|
315
|
-
#
|
|
316
|
-
#
|
|
317
|
-
#
|
|
318
|
-
#
|
|
319
|
-
# safely be set per
|
|
320
|
-
#
|
|
321
|
-
# @option options [Float] :http_idle_timeout (5)
|
|
322
|
-
# seconds a connection is allowed to sit idle before it
|
|
323
|
-
# considered stale. Stale connections are closed and removed
|
|
324
|
-
#
|
|
325
|
-
#
|
|
326
|
-
# @option options [Float] :
|
|
327
|
-
# seconds to wait for
|
|
328
|
-
#
|
|
329
|
-
#
|
|
330
|
-
#
|
|
331
|
-
#
|
|
409
|
+
# @option options [Aws::STS::EndpointProvider] :endpoint_provider
|
|
410
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
|
411
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
|
412
|
+
# `Aws::STS::EndpointParameters`.
|
|
413
|
+
#
|
|
414
|
+
# @option options [Float] :http_continue_timeout (1)
|
|
415
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
|
416
|
+
# request body. This option has no effect unless the request has "Expect"
|
|
417
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
|
418
|
+
# behaviour. This value can safely be set per request on the session.
|
|
419
|
+
#
|
|
420
|
+
# @option options [Float] :http_idle_timeout (5)
|
|
421
|
+
# The number of seconds a connection is allowed to sit idle before it
|
|
422
|
+
# is considered stale. Stale connections are closed and removed from the
|
|
423
|
+
# pool before making a request.
|
|
424
|
+
#
|
|
425
|
+
# @option options [Float] :http_open_timeout (15)
|
|
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 [URI::HTTP,String] :http_proxy
|
|
430
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
|
431
|
+
#
|
|
432
|
+
# @option options [Float] :http_read_timeout (60)
|
|
433
|
+
# The default number of seconds to wait for response data.
|
|
434
|
+
# This value can safely be set per-request on the session.
|
|
435
|
+
#
|
|
436
|
+
# @option options [Boolean] :http_wire_trace (false)
|
|
437
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
|
438
|
+
#
|
|
439
|
+
# @option options [Proc] :on_chunk_received
|
|
440
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
441
|
+
# of the response body is received. It provides three arguments: the chunk,
|
|
442
|
+
# the number of bytes received, and the total number of
|
|
443
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
|
444
|
+
#
|
|
445
|
+
# @option options [Proc] :on_chunk_sent
|
|
446
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
447
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
|
448
|
+
# the number of bytes read from the body, and the total number of
|
|
449
|
+
# bytes in the body.
|
|
450
|
+
#
|
|
451
|
+
# @option options [Boolean] :raise_response_errors (true)
|
|
452
|
+
# When `true`, response errors are raised.
|
|
453
|
+
#
|
|
454
|
+
# @option options [String] :ssl_ca_bundle
|
|
455
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
|
456
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
|
457
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
|
458
|
+
#
|
|
459
|
+
# @option options [String] :ssl_ca_directory
|
|
460
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
|
461
|
+
# authority files for verifying peer certificates. If you do
|
|
462
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
|
463
|
+
# default will be used if available.
|
|
332
464
|
#
|
|
333
|
-
# @option options [
|
|
334
|
-
#
|
|
465
|
+
# @option options [String] :ssl_ca_store
|
|
466
|
+
# Sets the X509::Store to verify peer certificate.
|
|
335
467
|
#
|
|
336
|
-
# @option options [
|
|
337
|
-
#
|
|
468
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
|
469
|
+
# Sets a client certificate when creating http connections.
|
|
338
470
|
#
|
|
339
|
-
# @option options [
|
|
340
|
-
#
|
|
341
|
-
# connection.
|
|
471
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
|
472
|
+
# Sets a client key when creating http connections.
|
|
342
473
|
#
|
|
343
|
-
# @option options [
|
|
344
|
-
#
|
|
345
|
-
# verifying peer certificates. If you do not pass
|
|
346
|
-
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
|
347
|
-
# will be used if available.
|
|
474
|
+
# @option options [Float] :ssl_timeout
|
|
475
|
+
# Sets the SSL timeout in seconds
|
|
348
476
|
#
|
|
349
|
-
# @option options [
|
|
350
|
-
#
|
|
351
|
-
# authority files for verifying peer certificates. If you do
|
|
352
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
|
353
|
-
# system default will be used if available.
|
|
477
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
|
478
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
|
354
479
|
#
|
|
355
480
|
def initialize(*args)
|
|
356
481
|
super
|
|
@@ -359,14 +484,13 @@ module Aws::STS
|
|
|
359
484
|
# @!group API Operations
|
|
360
485
|
|
|
361
486
|
# Returns a set of temporary security credentials that you can use to
|
|
362
|
-
# access Amazon Web Services resources
|
|
363
|
-
#
|
|
364
|
-
#
|
|
365
|
-
#
|
|
366
|
-
#
|
|
367
|
-
#
|
|
368
|
-
#
|
|
369
|
-
# operations][2] in the *IAM User Guide*.
|
|
487
|
+
# access Amazon Web Services resources. These temporary credentials
|
|
488
|
+
# consist of an access key ID, a secret access key, and a security
|
|
489
|
+
# token. Typically, you use `AssumeRole` within your account or for
|
|
490
|
+
# cross-account access. For a comparison of `AssumeRole` with other API
|
|
491
|
+
# operations that produce temporary credentials, see [Requesting
|
|
492
|
+
# Temporary Security Credentials][1] and [Compare STS credentials][2] in
|
|
493
|
+
# the *IAM User Guide*.
|
|
370
494
|
#
|
|
371
495
|
# **Permissions**
|
|
372
496
|
#
|
|
@@ -375,25 +499,26 @@ module Aws::STS
|
|
|
375
499
|
# following exception: You cannot call the Amazon Web Services STS
|
|
376
500
|
# `GetFederationToken` or `GetSessionToken` API operations.
|
|
377
501
|
#
|
|
378
|
-
# (Optional) You can pass inline or managed
|
|
379
|
-
#
|
|
380
|
-
#
|
|
381
|
-
#
|
|
382
|
-
# use for both inline and managed session policies
|
|
383
|
-
# characters. Passing policies to this operation
|
|
384
|
-
# credentials. The resulting session's
|
|
385
|
-
# of the role's identity-based policy
|
|
386
|
-
# use the role's temporary
|
|
387
|
-
# Services API calls to access
|
|
388
|
-
# role. You cannot use session
|
|
389
|
-
#
|
|
390
|
-
#
|
|
391
|
-
# User Guide*.
|
|
392
|
-
#
|
|
393
|
-
# When you create a role, you create two policies:
|
|
394
|
-
# that specifies *who* can assume the role and a permissions policy
|
|
395
|
-
# specifies *what* can be done with the role. You specify the
|
|
396
|
-
# principal
|
|
502
|
+
# (Optional) You can pass inline or managed session policies to this
|
|
503
|
+
# operation. You can pass a single JSON policy document to use as an
|
|
504
|
+
# inline session policy. You can also specify up to 10 managed policy
|
|
505
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
|
506
|
+
# plaintext that you use for both inline and managed session policies
|
|
507
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
|
508
|
+
# returns new temporary credentials. The resulting session's
|
|
509
|
+
# permissions are the intersection of the role's identity-based policy
|
|
510
|
+
# and the session policies. You can use the role's temporary
|
|
511
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
|
512
|
+
# resources in the account that owns the role. You cannot use session
|
|
513
|
+
# policies to grant more permissions than those allowed by the
|
|
514
|
+
# identity-based policy of the role that is being assumed. For more
|
|
515
|
+
# information, see [Session Policies][3] in the *IAM User Guide*.
|
|
516
|
+
#
|
|
517
|
+
# When you create a role, you create two policies: a role trust policy
|
|
518
|
+
# that specifies *who* can assume the role, and a permissions policy
|
|
519
|
+
# that specifies *what* can be done with the role. You specify the
|
|
520
|
+
# trusted principal that is allowed to assume the role in the role trust
|
|
521
|
+
# policy.
|
|
397
522
|
#
|
|
398
523
|
# To assume a role from a different account, your Amazon Web Services
|
|
399
524
|
# account must be trusted by the role. The trust relationship is defined
|
|
@@ -402,10 +527,9 @@ module Aws::STS
|
|
|
402
527
|
# users in the account.
|
|
403
528
|
#
|
|
404
529
|
# A user who wants to access a role in a different account must also
|
|
405
|
-
# have permissions that are delegated from the
|
|
406
|
-
#
|
|
407
|
-
#
|
|
408
|
-
# account.
|
|
530
|
+
# have permissions that are delegated from the account administrator.
|
|
531
|
+
# The administrator must attach a policy that allows the user to call
|
|
532
|
+
# `AssumeRole` for the ARN of the role in the other account.
|
|
409
533
|
#
|
|
410
534
|
# To allow a user to assume a role in the same account, you can do
|
|
411
535
|
# either of the following:
|
|
@@ -450,7 +574,7 @@ module Aws::STS
|
|
|
450
574
|
# denied. The condition in a trust policy that tests for MFA
|
|
451
575
|
# authentication might look like the following example.
|
|
452
576
|
#
|
|
453
|
-
# `"Condition":
|
|
577
|
+
# `"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}`
|
|
454
578
|
#
|
|
455
579
|
# For more information, see [Configuring MFA-Protected API Access][8] in
|
|
456
580
|
# the *IAM User Guide* guide.
|
|
@@ -463,7 +587,7 @@ module Aws::STS
|
|
|
463
587
|
#
|
|
464
588
|
#
|
|
465
589
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
466
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
590
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
467
591
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
|
468
592
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
|
|
469
593
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
|
@@ -486,11 +610,22 @@ module Aws::STS
|
|
|
486
610
|
# credentials will expose the role session name to the external account
|
|
487
611
|
# in their CloudTrail logs.
|
|
488
612
|
#
|
|
613
|
+
# For security purposes, administrators can view this field in
|
|
614
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
|
615
|
+
# Amazon Web Services. Your administrator might require that you specify
|
|
616
|
+
# your user name as the session name when you assume the role. For more
|
|
617
|
+
# information, see [ `sts:RoleSessionName` ][2].
|
|
618
|
+
#
|
|
489
619
|
# The regex used to validate this parameter is a string of characters
|
|
490
620
|
# consisting of upper- and lower-case alphanumeric characters with no
|
|
491
621
|
# spaces. You can also include underscores or any of the following
|
|
492
622
|
# characters: =,.@-
|
|
493
623
|
#
|
|
624
|
+
#
|
|
625
|
+
#
|
|
626
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
|
627
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
|
628
|
+
#
|
|
494
629
|
# @option params [Array<Types::PolicyDescriptorType>] :policy_arns
|
|
495
630
|
# The Amazon Resource Names (ARNs) of the IAM managed policies that you
|
|
496
631
|
# want to use as managed session policies. The policies must exist in
|
|
@@ -502,12 +637,12 @@ module Aws::STS
|
|
|
502
637
|
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
|
503
638
|
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
|
504
639
|
#
|
|
505
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
506
|
-
#
|
|
507
|
-
# separate limit. Your request can fail for this limit
|
|
508
|
-
# plaintext meets the other requirements. The
|
|
509
|
-
# response element indicates by percentage how close
|
|
510
|
-
# tags for your request are to the upper size limit.
|
|
640
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
641
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
642
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
643
|
+
# even if your plaintext meets the other requirements. The
|
|
644
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
645
|
+
# the policies and tags for your request are to the upper size limit.
|
|
511
646
|
#
|
|
512
647
|
# </note>
|
|
513
648
|
#
|
|
@@ -547,15 +682,18 @@ module Aws::STS
|
|
|
547
682
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
|
548
683
|
# characters.
|
|
549
684
|
#
|
|
550
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
551
|
-
#
|
|
552
|
-
# separate limit. Your request can fail for this limit
|
|
553
|
-
# plaintext meets the other requirements. The
|
|
554
|
-
# response element indicates by percentage how close
|
|
555
|
-
# tags for your request are to the upper size limit.
|
|
685
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
686
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
687
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
688
|
+
# even if your plaintext meets the other requirements. The
|
|
689
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
690
|
+
# the policies and tags for your request are to the upper size limit.
|
|
556
691
|
#
|
|
557
692
|
# </note>
|
|
558
693
|
#
|
|
694
|
+
# For more information about role session permissions, see [Session
|
|
695
|
+
# policies][1].
|
|
696
|
+
#
|
|
559
697
|
#
|
|
560
698
|
#
|
|
561
699
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
|
@@ -578,9 +716,8 @@ module Aws::STS
|
|
|
578
716
|
# depending on the maximum session duration setting for your role.
|
|
579
717
|
# However, if you assume a role using role chaining and provide a
|
|
580
718
|
# `DurationSeconds` parameter value greater than one hour, the operation
|
|
581
|
-
# fails. To learn how to view the maximum value for your role, see
|
|
582
|
-
# the
|
|
583
|
-
# Guide*.
|
|
719
|
+
# fails. To learn how to view the maximum value for your role, see
|
|
720
|
+
# [Update the maximum session duration for a role][1].
|
|
584
721
|
#
|
|
585
722
|
# By default, the value is set to `3600` seconds.
|
|
586
723
|
#
|
|
@@ -596,7 +733,7 @@ module Aws::STS
|
|
|
596
733
|
#
|
|
597
734
|
#
|
|
598
735
|
#
|
|
599
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
736
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
|
600
737
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
|
|
601
738
|
#
|
|
602
739
|
# @option params [Array<Types::Tag>] :tags
|
|
@@ -610,12 +747,12 @@ module Aws::STS
|
|
|
610
747
|
# can’t exceed 256 characters. For these and additional limits, see [IAM
|
|
611
748
|
# and STS Character Limits][2] in the *IAM User Guide*.
|
|
612
749
|
#
|
|
613
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
614
|
-
#
|
|
615
|
-
# separate limit. Your request can fail for this limit
|
|
616
|
-
# plaintext meets the other requirements. The
|
|
617
|
-
# response element indicates by percentage how close
|
|
618
|
-
# tags for your request are to the upper size limit.
|
|
750
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
751
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
752
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
753
|
+
# even if your plaintext meets the other requirements. The
|
|
754
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
755
|
+
# the policies and tags for your request are to the upper size limit.
|
|
619
756
|
#
|
|
620
757
|
# </note>
|
|
621
758
|
#
|
|
@@ -649,9 +786,8 @@ module Aws::STS
|
|
|
649
786
|
# passes to subsequent sessions in a role chain. For more information,
|
|
650
787
|
# see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
|
|
651
788
|
#
|
|
652
|
-
# This parameter is optional.
|
|
653
|
-
#
|
|
654
|
-
# affected.
|
|
789
|
+
# This parameter is optional. The transitive status of a session tag
|
|
790
|
+
# does not impact its packed binary size.
|
|
655
791
|
#
|
|
656
792
|
# If you choose not to specify a transitive tag key, then no tags are
|
|
657
793
|
# passed from this session to any subsequent sessions.
|
|
@@ -709,26 +845,40 @@ module Aws::STS
|
|
|
709
845
|
#
|
|
710
846
|
# @option params [String] :source_identity
|
|
711
847
|
# The source identity specified by the principal that is calling the
|
|
712
|
-
# `AssumeRole` operation.
|
|
848
|
+
# `AssumeRole` operation. The source identity value persists across
|
|
849
|
+
# [chained role][1] sessions.
|
|
713
850
|
#
|
|
714
851
|
# You can require users to specify a source identity when they assume a
|
|
715
|
-
# role. You do this by using the `sts:SourceIdentity` condition
|
|
716
|
-
# role trust policy. You can use source identity information in
|
|
852
|
+
# role. You do this by using the [ `sts:SourceIdentity` ][2] condition
|
|
853
|
+
# key in a role trust policy. You can use source identity information in
|
|
717
854
|
# CloudTrail logs to determine who took actions with a role. You can use
|
|
718
855
|
# the `aws:SourceIdentity` condition key to further control access to
|
|
719
856
|
# Amazon Web Services resources based on the value of source identity.
|
|
720
857
|
# For more information about using source identity, see [Monitor and
|
|
721
|
-
# control actions taken with assumed roles][
|
|
858
|
+
# control actions taken with assumed roles][3] in the *IAM User Guide*.
|
|
722
859
|
#
|
|
723
860
|
# The regex used to validate this parameter is a string of characters
|
|
724
861
|
# consisting of upper- and lower-case alphanumeric characters with no
|
|
725
862
|
# spaces. You can also include underscores or any of the following
|
|
726
|
-
# characters:
|
|
863
|
+
# characters: +=,.@-. You cannot use a value that begins with the text
|
|
727
864
|
# `aws:`. This prefix is reserved for Amazon Web Services internal use.
|
|
728
865
|
#
|
|
729
866
|
#
|
|
730
867
|
#
|
|
731
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
868
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
|
|
869
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
|
|
870
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
|
871
|
+
#
|
|
872
|
+
# @option params [Array<Types::ProvidedContext>] :provided_contexts
|
|
873
|
+
# A list of previously acquired trusted context assertions in the format
|
|
874
|
+
# of a JSON array. The trusted context assertion is signed and encrypted
|
|
875
|
+
# by Amazon Web Services STS.
|
|
876
|
+
#
|
|
877
|
+
# The following is an example of a `ProvidedContext` value that includes
|
|
878
|
+
# a single trusted context assertion and the ARN of the context provider
|
|
879
|
+
# from which the trusted context assertion was generated.
|
|
880
|
+
#
|
|
881
|
+
# `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
|
|
732
882
|
#
|
|
733
883
|
# @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
734
884
|
#
|
|
@@ -790,7 +940,7 @@ module Aws::STS
|
|
|
790
940
|
# arn: "arnType",
|
|
791
941
|
# },
|
|
792
942
|
# ],
|
|
793
|
-
# policy: "
|
|
943
|
+
# policy: "unrestrictedSessionPolicyDocumentType",
|
|
794
944
|
# duration_seconds: 1,
|
|
795
945
|
# tags: [
|
|
796
946
|
# {
|
|
@@ -803,6 +953,12 @@ module Aws::STS
|
|
|
803
953
|
# serial_number: "serialNumberType",
|
|
804
954
|
# token_code: "tokenCodeType",
|
|
805
955
|
# source_identity: "sourceIdentityType",
|
|
956
|
+
# provided_contexts: [
|
|
957
|
+
# {
|
|
958
|
+
# provider_arn: "arnType",
|
|
959
|
+
# context_assertion: "contextAssertionType",
|
|
960
|
+
# },
|
|
961
|
+
# ],
|
|
806
962
|
# })
|
|
807
963
|
#
|
|
808
964
|
# @example Response structure
|
|
@@ -832,8 +988,8 @@ module Aws::STS
|
|
|
832
988
|
# user-specific credentials or configuration. For a comparison of
|
|
833
989
|
# `AssumeRoleWithSAML` with the other API operations that produce
|
|
834
990
|
# temporary credentials, see [Requesting Temporary Security
|
|
835
|
-
# Credentials][1] and [
|
|
836
|
-
#
|
|
991
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
|
992
|
+
# Guide*.
|
|
837
993
|
#
|
|
838
994
|
# The temporary security credentials returned by this operation consist
|
|
839
995
|
# of an access key ID, a secret access key, and a security token.
|
|
@@ -878,18 +1034,18 @@ module Aws::STS
|
|
|
878
1034
|
#
|
|
879
1035
|
# (Optional) You can pass inline or managed [session policies][6] to
|
|
880
1036
|
# this operation. You can pass a single JSON policy document to use as
|
|
881
|
-
# an inline session policy. You can also specify up to 10 managed
|
|
882
|
-
#
|
|
883
|
-
# use for both inline and managed session policies
|
|
884
|
-
# characters. Passing policies to this operation
|
|
885
|
-
# credentials. The resulting session's
|
|
886
|
-
# of the role's identity-based policy
|
|
887
|
-
# use the role's temporary
|
|
888
|
-
# Services API calls to access
|
|
889
|
-
# role. You cannot use session
|
|
890
|
-
#
|
|
891
|
-
#
|
|
892
|
-
# User Guide*.
|
|
1037
|
+
# an inline session policy. You can also specify up to 10 managed policy
|
|
1038
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
|
1039
|
+
# plaintext that you use for both inline and managed session policies
|
|
1040
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
|
1041
|
+
# returns new temporary credentials. The resulting session's
|
|
1042
|
+
# permissions are the intersection of the role's identity-based policy
|
|
1043
|
+
# and the session policies. You can use the role's temporary
|
|
1044
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
|
1045
|
+
# resources in the account that owns the role. You cannot use session
|
|
1046
|
+
# policies to grant more permissions than those allowed by the
|
|
1047
|
+
# identity-based policy of the role that is being assumed. For more
|
|
1048
|
+
# information, see [Session Policies][6] in the *IAM User Guide*.
|
|
893
1049
|
#
|
|
894
1050
|
# Calling `AssumeRoleWithSAML` does not require the use of Amazon Web
|
|
895
1051
|
# Services security credentials. The identity of the caller is validated
|
|
@@ -915,12 +1071,12 @@ module Aws::STS
|
|
|
915
1071
|
# characters. For these and additional limits, see [IAM and STS
|
|
916
1072
|
# Character Limits][8] in the *IAM User Guide*.
|
|
917
1073
|
#
|
|
918
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
919
|
-
#
|
|
920
|
-
# separate limit. Your request can fail for this limit
|
|
921
|
-
# plaintext meets the other requirements. The
|
|
922
|
-
# response element indicates by percentage how close
|
|
923
|
-
# tags for your request are to the upper size limit.
|
|
1074
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1075
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
1076
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
1077
|
+
# even if your plaintext meets the other requirements. The
|
|
1078
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
1079
|
+
# the policies and tags for your request are to the upper size limit.
|
|
924
1080
|
#
|
|
925
1081
|
# </note>
|
|
926
1082
|
#
|
|
@@ -963,7 +1119,7 @@ module Aws::STS
|
|
|
963
1119
|
#
|
|
964
1120
|
#
|
|
965
1121
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
966
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1122
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
967
1123
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
|
|
968
1124
|
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
|
969
1125
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
|
|
@@ -1006,12 +1162,12 @@ module Aws::STS
|
|
|
1006
1162
|
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
|
1007
1163
|
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
|
1008
1164
|
#
|
|
1009
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
1010
|
-
#
|
|
1011
|
-
# separate limit. Your request can fail for this limit
|
|
1012
|
-
# plaintext meets the other requirements. The
|
|
1013
|
-
# response element indicates by percentage how close
|
|
1014
|
-
# tags for your request are to the upper size limit.
|
|
1165
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1166
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
1167
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
1168
|
+
# even if your plaintext meets the other requirements. The
|
|
1169
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
1170
|
+
# the policies and tags for your request are to the upper size limit.
|
|
1015
1171
|
#
|
|
1016
1172
|
# </note>
|
|
1017
1173
|
#
|
|
@@ -1051,12 +1207,15 @@ module Aws::STS
|
|
|
1051
1207
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
|
1052
1208
|
# characters.
|
|
1053
1209
|
#
|
|
1054
|
-
#
|
|
1055
|
-
# policies
|
|
1056
|
-
#
|
|
1057
|
-
#
|
|
1058
|
-
#
|
|
1059
|
-
#
|
|
1210
|
+
# For more information about role session permissions, see [Session
|
|
1211
|
+
# policies][1].
|
|
1212
|
+
#
|
|
1213
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1214
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
1215
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
1216
|
+
# even if your plaintext meets the other requirements. The
|
|
1217
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
1218
|
+
# the policies and tags for your request are to the upper size limit.
|
|
1060
1219
|
#
|
|
1061
1220
|
# </note>
|
|
1062
1221
|
#
|
|
@@ -1190,10 +1349,8 @@ module Aws::STS
|
|
|
1190
1349
|
# the user with a consistent identity throughout the lifetime of an
|
|
1191
1350
|
# application.
|
|
1192
1351
|
#
|
|
1193
|
-
# To learn more about Amazon Cognito, see [Amazon Cognito
|
|
1194
|
-
# in *Amazon
|
|
1195
|
-
# Cognito Overview][5] in the *Amazon Web Services SDK for iOS Developer
|
|
1196
|
-
# Guide*.
|
|
1352
|
+
# To learn more about Amazon Cognito, see [Amazon Cognito identity
|
|
1353
|
+
# pools][1] in *Amazon Cognito Developer Guide*.
|
|
1197
1354
|
#
|
|
1198
1355
|
# </note>
|
|
1199
1356
|
#
|
|
@@ -1207,8 +1364,8 @@ module Aws::STS
|
|
|
1207
1364
|
# a token from the web identity provider. For a comparison of
|
|
1208
1365
|
# `AssumeRoleWithWebIdentity` with the other API operations that produce
|
|
1209
1366
|
# temporary credentials, see [Requesting Temporary Security
|
|
1210
|
-
# Credentials][
|
|
1211
|
-
#
|
|
1367
|
+
# Credentials][4] and [Compare STS credentials][5] in the *IAM User
|
|
1368
|
+
# Guide*.
|
|
1212
1369
|
#
|
|
1213
1370
|
# The temporary security credentials returned by this API consist of an
|
|
1214
1371
|
# access key ID, a secret access key, and a security token. Applications
|
|
@@ -1223,12 +1380,12 @@ module Aws::STS
|
|
|
1223
1380
|
# your session. You can provide a value from 900 seconds (15 minutes) up
|
|
1224
1381
|
# to the maximum session duration setting for the role. This setting can
|
|
1225
1382
|
# have a value from 1 hour to 12 hours. To learn how to view the maximum
|
|
1226
|
-
# value for your role, see [
|
|
1227
|
-
#
|
|
1228
|
-
#
|
|
1383
|
+
# value for your role, see [Update the maximum session duration for a
|
|
1384
|
+
# role ][6] in the *IAM User Guide*. The maximum session duration limit
|
|
1385
|
+
# applies when you use the `AssumeRole*` API operations or the
|
|
1229
1386
|
# `assume-role*` CLI commands. However the limit does not apply when you
|
|
1230
1387
|
# use those operations to create a console URL. For more information,
|
|
1231
|
-
# see [Using IAM Roles][
|
|
1388
|
+
# see [Using IAM Roles][7] in the *IAM User Guide*.
|
|
1232
1389
|
#
|
|
1233
1390
|
# **Permissions**
|
|
1234
1391
|
#
|
|
@@ -1237,39 +1394,39 @@ module Aws::STS
|
|
|
1237
1394
|
# Amazon Web Services service with the following exception: you cannot
|
|
1238
1395
|
# call the STS `GetFederationToken` or `GetSessionToken` API operations.
|
|
1239
1396
|
#
|
|
1240
|
-
# (Optional) You can pass inline or managed [session policies][
|
|
1397
|
+
# (Optional) You can pass inline or managed [session policies][8] to
|
|
1241
1398
|
# this operation. You can pass a single JSON policy document to use as
|
|
1242
|
-
# an inline session policy. You can also specify up to 10 managed
|
|
1243
|
-
#
|
|
1244
|
-
# use for both inline and managed session policies
|
|
1245
|
-
# characters. Passing policies to this operation
|
|
1246
|
-
# credentials. The resulting session's
|
|
1247
|
-
# of the role's identity-based policy
|
|
1248
|
-
# use the role's temporary
|
|
1249
|
-
# Services API calls to access
|
|
1250
|
-
# role. You cannot use session
|
|
1251
|
-
#
|
|
1252
|
-
#
|
|
1253
|
-
# User Guide*.
|
|
1399
|
+
# an inline session policy. You can also specify up to 10 managed policy
|
|
1400
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
|
1401
|
+
# plaintext that you use for both inline and managed session policies
|
|
1402
|
+
# can't exceed 2,048 characters. Passing policies to this operation
|
|
1403
|
+
# returns new temporary credentials. The resulting session's
|
|
1404
|
+
# permissions are the intersection of the role's identity-based policy
|
|
1405
|
+
# and the session policies. You can use the role's temporary
|
|
1406
|
+
# credentials in subsequent Amazon Web Services API calls to access
|
|
1407
|
+
# resources in the account that owns the role. You cannot use session
|
|
1408
|
+
# policies to grant more permissions than those allowed by the
|
|
1409
|
+
# identity-based policy of the role that is being assumed. For more
|
|
1410
|
+
# information, see [Session Policies][8] in the *IAM User Guide*.
|
|
1254
1411
|
#
|
|
1255
1412
|
# **Tags**
|
|
1256
1413
|
#
|
|
1257
1414
|
# (Optional) You can configure your IdP to pass attributes into your web
|
|
1258
1415
|
# identity token as session tags. Each session tag consists of a key
|
|
1259
1416
|
# name and an associated value. For more information about session tags,
|
|
1260
|
-
# see [Passing Session Tags in STS][
|
|
1417
|
+
# see [Passing Session Tags in STS][9] in the *IAM User Guide*.
|
|
1261
1418
|
#
|
|
1262
1419
|
# You can pass up to 50 session tags. The plaintext session tag keys
|
|
1263
1420
|
# can’t exceed 128 characters and the values can’t exceed 256
|
|
1264
1421
|
# characters. For these and additional limits, see [IAM and STS
|
|
1265
|
-
# Character Limits][
|
|
1422
|
+
# Character Limits][10] in the *IAM User Guide*.
|
|
1266
1423
|
#
|
|
1267
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
1268
|
-
#
|
|
1269
|
-
# separate limit. Your request can fail for this limit
|
|
1270
|
-
# plaintext meets the other requirements. The
|
|
1271
|
-
# response element indicates by percentage how close
|
|
1272
|
-
# tags for your request are to the upper size limit.
|
|
1424
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1425
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
1426
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
1427
|
+
# even if your plaintext meets the other requirements. The
|
|
1428
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
1429
|
+
# the policies and tags for your request are to the upper size limit.
|
|
1273
1430
|
#
|
|
1274
1431
|
# </note>
|
|
1275
1432
|
#
|
|
@@ -1280,12 +1437,12 @@ module Aws::STS
|
|
|
1280
1437
|
# An administrator must grant you the permissions necessary to pass
|
|
1281
1438
|
# session tags. The administrator can also create granular permissions
|
|
1282
1439
|
# to allow you to pass only specific session tags. For more information,
|
|
1283
|
-
# see [Tutorial: Using Tags for Attribute-Based Access Control][
|
|
1440
|
+
# see [Tutorial: Using Tags for Attribute-Based Access Control][11] in
|
|
1284
1441
|
# the *IAM User Guide*.
|
|
1285
1442
|
#
|
|
1286
1443
|
# You can set the session tags as transitive. Transitive tags persist
|
|
1287
1444
|
# during role chaining. For more information, see [Chaining Roles with
|
|
1288
|
-
# Session Tags][
|
|
1445
|
+
# Session Tags][12] in the *IAM User Guide*.
|
|
1289
1446
|
#
|
|
1290
1447
|
# **Identities**
|
|
1291
1448
|
#
|
|
@@ -1297,22 +1454,17 @@ module Aws::STS
|
|
|
1297
1454
|
# specified in the role's trust policy.
|
|
1298
1455
|
#
|
|
1299
1456
|
# Calling `AssumeRoleWithWebIdentity` can result in an entry in your
|
|
1300
|
-
# CloudTrail logs. The entry includes the [Subject][
|
|
1457
|
+
# CloudTrail logs. The entry includes the [Subject][13] of the provided
|
|
1301
1458
|
# web identity token. We recommend that you avoid using any personally
|
|
1302
1459
|
# identifiable information (PII) in this field. For example, you could
|
|
1303
1460
|
# instead use a GUID or a pairwise identifier, as [suggested in the OIDC
|
|
1304
|
-
# specification][
|
|
1461
|
+
# specification][14].
|
|
1305
1462
|
#
|
|
1306
|
-
# For more information about how to use
|
|
1463
|
+
# For more information about how to use OIDC federation and the
|
|
1307
1464
|
# `AssumeRoleWithWebIdentity` API, see the following resources:
|
|
1308
1465
|
#
|
|
1309
|
-
# * [Using Web Identity Federation API Operations for Mobile Apps][
|
|
1310
|
-
# and [Federation Through a Web-based Identity Provider][
|
|
1311
|
-
#
|
|
1312
|
-
# * [ Web Identity Federation Playground][19]. Walk through the process
|
|
1313
|
-
# of authenticating through Login with Amazon, Facebook, or Google,
|
|
1314
|
-
# getting temporary security credentials, and then using those
|
|
1315
|
-
# credentials to make a request to Amazon Web Services.
|
|
1466
|
+
# * [Using Web Identity Federation API Operations for Mobile Apps][15]
|
|
1467
|
+
# and [Federation Through a Web-based Identity Provider][16].
|
|
1316
1468
|
#
|
|
1317
1469
|
# * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
|
|
1318
1470
|
# Services SDK for Android Developer Guide][3]. These toolkits contain
|
|
@@ -1320,37 +1472,47 @@ module Aws::STS
|
|
|
1320
1472
|
# toolkits then show how to use the information from these providers
|
|
1321
1473
|
# to get and use temporary security credentials.
|
|
1322
1474
|
#
|
|
1323
|
-
# * [Web Identity Federation with Mobile Applications][20]. This article
|
|
1324
|
-
# discusses web identity federation and shows an example of how to use
|
|
1325
|
-
# web identity federation to get access to content in Amazon S3.
|
|
1326
|
-
#
|
|
1327
1475
|
#
|
|
1328
1476
|
#
|
|
1329
1477
|
# [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
|
|
1330
1478
|
# [2]: http://aws.amazon.com/sdkforios/
|
|
1331
1479
|
# [3]: http://aws.amazon.com/sdkforandroid/
|
|
1332
|
-
# [4]: https://docs.aws.amazon.com/
|
|
1333
|
-
# [5]: https://docs.aws.amazon.com/
|
|
1334
|
-
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1335
|
-
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1336
|
-
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1337
|
-
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1338
|
-
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1339
|
-
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1340
|
-
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1341
|
-
# [13]:
|
|
1342
|
-
# [14]:
|
|
1343
|
-
# [15]:
|
|
1344
|
-
# [16]:
|
|
1345
|
-
# [17]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
|
1346
|
-
# [18]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
|
1347
|
-
# [19]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
|
|
1348
|
-
# [20]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
|
|
1480
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
1481
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
1482
|
+
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
|
1483
|
+
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
|
1484
|
+
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
|
1485
|
+
# [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
|
1486
|
+
# [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
|
|
1487
|
+
# [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
|
|
1488
|
+
# [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
|
|
1489
|
+
# [13]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
|
|
1490
|
+
# [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
|
|
1491
|
+
# [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
|
|
1492
|
+
# [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
|
1349
1493
|
#
|
|
1350
1494
|
# @option params [required, String] :role_arn
|
|
1351
1495
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
|
1352
1496
|
# assuming.
|
|
1353
1497
|
#
|
|
1498
|
+
# <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools that
|
|
1499
|
+
# assume [cross-account IAM roles][1]. The trust policies of these roles
|
|
1500
|
+
# must accept the `cognito-identity.amazonaws.com` service principal and
|
|
1501
|
+
# must contain the `cognito-identity.amazonaws.com:aud` condition key to
|
|
1502
|
+
# restrict role assumption to users from your intended identity pools. A
|
|
1503
|
+
# policy that trusts Amazon Cognito identity pools without this
|
|
1504
|
+
# condition creates a risk that a user from an unintended identity pool
|
|
1505
|
+
# can assume the role. For more information, see [ Trust policies for
|
|
1506
|
+
# IAM roles in Basic (Classic) authentication ][2] in the *Amazon
|
|
1507
|
+
# Cognito Developer Guide*.
|
|
1508
|
+
#
|
|
1509
|
+
# </note>
|
|
1510
|
+
#
|
|
1511
|
+
#
|
|
1512
|
+
#
|
|
1513
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
|
|
1514
|
+
# [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
|
|
1515
|
+
#
|
|
1354
1516
|
# @option params [required, String] :role_session_name
|
|
1355
1517
|
# An identifier for the assumed role session. Typically, you pass the
|
|
1356
1518
|
# name or identifier that is associated with the user who is using your
|
|
@@ -1359,17 +1521,31 @@ module Aws::STS
|
|
|
1359
1521
|
# is included as part of the ARN and assumed role ID in the
|
|
1360
1522
|
# `AssumedRoleUser` response element.
|
|
1361
1523
|
#
|
|
1524
|
+
# For security purposes, administrators can view this field in
|
|
1525
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
|
1526
|
+
# Amazon Web Services. Your administrator might require that you specify
|
|
1527
|
+
# your user name as the session name when you assume the role. For more
|
|
1528
|
+
# information, see [ `sts:RoleSessionName` ][2].
|
|
1529
|
+
#
|
|
1362
1530
|
# The regex used to validate this parameter is a string of characters
|
|
1363
1531
|
# consisting of upper- and lower-case alphanumeric characters with no
|
|
1364
1532
|
# spaces. You can also include underscores or any of the following
|
|
1365
1533
|
# characters: =,.@-
|
|
1366
1534
|
#
|
|
1535
|
+
#
|
|
1536
|
+
#
|
|
1537
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
|
1538
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
|
1539
|
+
#
|
|
1367
1540
|
# @option params [required, String] :web_identity_token
|
|
1368
1541
|
# The OAuth 2.0 access token or OpenID Connect ID token that is provided
|
|
1369
1542
|
# by the identity provider. Your application must get this token by
|
|
1370
1543
|
# authenticating the user who is using your application with a web
|
|
1371
1544
|
# identity provider before the application makes an
|
|
1372
|
-
# `AssumeRoleWithWebIdentity` call.
|
|
1545
|
+
# `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
|
|
1546
|
+
# formatted as either an integer or a long integer. Tokens must be
|
|
1547
|
+
# signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
|
|
1548
|
+
# (ES256, ES384, or ES512).
|
|
1373
1549
|
#
|
|
1374
1550
|
# @option params [String] :provider_id
|
|
1375
1551
|
# The fully qualified host component of the domain name of the OAuth 2.0
|
|
@@ -1393,12 +1569,12 @@ module Aws::STS
|
|
|
1393
1569
|
# about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
|
|
1394
1570
|
# Service Namespaces][1] in the Amazon Web Services General Reference.
|
|
1395
1571
|
#
|
|
1396
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
1397
|
-
#
|
|
1398
|
-
# separate limit. Your request can fail for this limit
|
|
1399
|
-
# plaintext meets the other requirements. The
|
|
1400
|
-
# response element indicates by percentage how close
|
|
1401
|
-
# tags for your request are to the upper size limit.
|
|
1572
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1573
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
1574
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
1575
|
+
# even if your plaintext meets the other requirements. The
|
|
1576
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
1577
|
+
# the policies and tags for your request are to the upper size limit.
|
|
1402
1578
|
#
|
|
1403
1579
|
# </note>
|
|
1404
1580
|
#
|
|
@@ -1438,12 +1614,15 @@ module Aws::STS
|
|
|
1438
1614
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
|
1439
1615
|
# characters.
|
|
1440
1616
|
#
|
|
1441
|
-
#
|
|
1442
|
-
# policies
|
|
1443
|
-
#
|
|
1444
|
-
#
|
|
1445
|
-
#
|
|
1446
|
-
#
|
|
1617
|
+
# For more information about role session permissions, see [Session
|
|
1618
|
+
# policies][1].
|
|
1619
|
+
#
|
|
1620
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
1621
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
1622
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
1623
|
+
# even if your plaintext meets the other requirements. The
|
|
1624
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
1625
|
+
# the policies and tags for your request are to the upper size limit.
|
|
1447
1626
|
#
|
|
1448
1627
|
# </note>
|
|
1449
1628
|
#
|
|
@@ -1558,6 +1737,121 @@ module Aws::STS
|
|
|
1558
1737
|
req.send_request(options)
|
|
1559
1738
|
end
|
|
1560
1739
|
|
|
1740
|
+
# Returns a set of short term credentials you can use to perform
|
|
1741
|
+
# privileged tasks on a member account in your organization.
|
|
1742
|
+
#
|
|
1743
|
+
# Before you can launch a privileged session, you must have centralized
|
|
1744
|
+
# root access in your organization. For steps to enable this feature,
|
|
1745
|
+
# see [Centralize root access for member accounts][1] in the *IAM User
|
|
1746
|
+
# Guide*.
|
|
1747
|
+
#
|
|
1748
|
+
# <note markdown="1"> The STS global endpoint is not supported for AssumeRoot. You must send
|
|
1749
|
+
# this request to a Regional STS endpoint. For more information, see
|
|
1750
|
+
# [Endpoints][2].
|
|
1751
|
+
#
|
|
1752
|
+
# </note>
|
|
1753
|
+
#
|
|
1754
|
+
# You can track AssumeRoot in CloudTrail logs to determine what actions
|
|
1755
|
+
# were performed in a session. For more information, see [Track
|
|
1756
|
+
# privileged tasks in CloudTrail][3] in the *IAM User Guide*.
|
|
1757
|
+
#
|
|
1758
|
+
#
|
|
1759
|
+
#
|
|
1760
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
|
|
1761
|
+
# [2]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
|
|
1762
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
|
|
1763
|
+
#
|
|
1764
|
+
# @option params [required, String] :target_principal
|
|
1765
|
+
# The member account principal ARN or account ID.
|
|
1766
|
+
#
|
|
1767
|
+
# @option params [required, Types::PolicyDescriptorType] :task_policy_arn
|
|
1768
|
+
# The identity based policy that scopes the session to the privileged
|
|
1769
|
+
# tasks that can be performed. You can use one of following Amazon Web
|
|
1770
|
+
# Services managed policies to scope root session actions.
|
|
1771
|
+
#
|
|
1772
|
+
# * [IAMAuditRootUserCredentials][1]
|
|
1773
|
+
#
|
|
1774
|
+
# * [IAMCreateRootUserPassword][2]
|
|
1775
|
+
#
|
|
1776
|
+
# * [IAMDeleteRootUserCredentials][3]
|
|
1777
|
+
#
|
|
1778
|
+
# * [S3UnlockBucketPolicy][4]
|
|
1779
|
+
#
|
|
1780
|
+
# * [SQSUnlockQueuePolicy][5]
|
|
1781
|
+
#
|
|
1782
|
+
#
|
|
1783
|
+
#
|
|
1784
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
|
|
1785
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
|
|
1786
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
|
|
1787
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
|
|
1788
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
|
|
1789
|
+
#
|
|
1790
|
+
# @option params [Integer] :duration_seconds
|
|
1791
|
+
# The duration, in seconds, of the privileged session. The value can
|
|
1792
|
+
# range from 0 seconds up to the maximum session duration of 900 seconds
|
|
1793
|
+
# (15 minutes). If you specify a value higher than this setting, the
|
|
1794
|
+
# operation fails.
|
|
1795
|
+
#
|
|
1796
|
+
# By default, the value is set to `900` seconds.
|
|
1797
|
+
#
|
|
1798
|
+
# @return [Types::AssumeRootResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1799
|
+
#
|
|
1800
|
+
# * {Types::AssumeRootResponse#credentials #credentials} => Types::Credentials
|
|
1801
|
+
# * {Types::AssumeRootResponse#source_identity #source_identity} => String
|
|
1802
|
+
#
|
|
1803
|
+
#
|
|
1804
|
+
# @example Example: To launch a privileged session
|
|
1805
|
+
#
|
|
1806
|
+
# # The following command retrieves a set of short-term credentials you can use to unlock an S3 bucket for a member account
|
|
1807
|
+
# # by removing the bucket policy.
|
|
1808
|
+
#
|
|
1809
|
+
# resp = client.assume_root({
|
|
1810
|
+
# duration_seconds: 900,
|
|
1811
|
+
# target_principal: "111122223333",
|
|
1812
|
+
# task_policy_arn: {
|
|
1813
|
+
# arn: "arn:aws:iam::aws:policy/root-task/S3UnlockBucketPolicy",
|
|
1814
|
+
# },
|
|
1815
|
+
# })
|
|
1816
|
+
#
|
|
1817
|
+
# resp.to_h outputs the following:
|
|
1818
|
+
# {
|
|
1819
|
+
# credentials: {
|
|
1820
|
+
# access_key_id: "ASIAJEXAMPLEXEG2JICEA",
|
|
1821
|
+
# expiration: Time.parse("2024-11-15T00:05:07Z"),
|
|
1822
|
+
# secret_access_key: "9drTJvcXLB89EXAMPLELB8923FB892xMFI",
|
|
1823
|
+
# session_token: "AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=",
|
|
1824
|
+
# },
|
|
1825
|
+
# source_identity: "Alice",
|
|
1826
|
+
# }
|
|
1827
|
+
#
|
|
1828
|
+
# @example Request syntax with placeholder values
|
|
1829
|
+
#
|
|
1830
|
+
# resp = client.assume_root({
|
|
1831
|
+
# target_principal: "TargetPrincipalType", # required
|
|
1832
|
+
# task_policy_arn: { # required
|
|
1833
|
+
# arn: "arnType",
|
|
1834
|
+
# },
|
|
1835
|
+
# duration_seconds: 1,
|
|
1836
|
+
# })
|
|
1837
|
+
#
|
|
1838
|
+
# @example Response structure
|
|
1839
|
+
#
|
|
1840
|
+
# resp.credentials.access_key_id #=> String
|
|
1841
|
+
# resp.credentials.secret_access_key #=> String
|
|
1842
|
+
# resp.credentials.session_token #=> String
|
|
1843
|
+
# resp.credentials.expiration #=> Time
|
|
1844
|
+
# resp.source_identity #=> String
|
|
1845
|
+
#
|
|
1846
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoot AWS API Documentation
|
|
1847
|
+
#
|
|
1848
|
+
# @overload assume_root(params = {})
|
|
1849
|
+
# @param [Hash] params ({})
|
|
1850
|
+
def assume_root(params = {}, options = {})
|
|
1851
|
+
req = build_request(:assume_root, params)
|
|
1852
|
+
req.send_request(options)
|
|
1853
|
+
end
|
|
1854
|
+
|
|
1561
1855
|
# Decodes additional information about the authorization status of a
|
|
1562
1856
|
# request from an encoded message returned in response to an Amazon Web
|
|
1563
1857
|
# Services request.
|
|
@@ -1704,11 +1998,11 @@ module Aws::STS
|
|
|
1704
1998
|
# to call the operation.
|
|
1705
1999
|
#
|
|
1706
2000
|
# <note markdown="1"> No permissions are required to perform this operation. If an
|
|
1707
|
-
# administrator
|
|
2001
|
+
# administrator attaches a policy to your identity that explicitly
|
|
1708
2002
|
# denies access to the `sts:GetCallerIdentity` action, you can still
|
|
1709
2003
|
# perform this operation. Permissions are not required because the same
|
|
1710
|
-
# information is returned when
|
|
1711
|
-
#
|
|
2004
|
+
# information is returned when access is denied. To view an example
|
|
2005
|
+
# response, see [I Am Not Authorized to Perform:
|
|
1712
2006
|
# iam:DeleteVirtualMFADevice][1] in the *IAM User Guide*.
|
|
1713
2007
|
#
|
|
1714
2008
|
# </note>
|
|
@@ -1785,60 +2079,63 @@ module Aws::STS
|
|
|
1785
2079
|
end
|
|
1786
2080
|
|
|
1787
2081
|
# Returns a set of temporary security credentials (consisting of an
|
|
1788
|
-
# access key ID, a secret access key, and a security token) for a
|
|
1789
|
-
#
|
|
1790
|
-
#
|
|
1791
|
-
#
|
|
1792
|
-
#
|
|
1793
|
-
#
|
|
1794
|
-
#
|
|
1795
|
-
#
|
|
1796
|
-
#
|
|
1797
|
-
#
|
|
1798
|
-
#
|
|
2082
|
+
# access key ID, a secret access key, and a security token) for a user.
|
|
2083
|
+
# A typical use is in a proxy application that gets temporary security
|
|
2084
|
+
# credentials on behalf of distributed applications inside a corporate
|
|
2085
|
+
# network.
|
|
2086
|
+
#
|
|
2087
|
+
# You must call the `GetFederationToken` operation using the long-term
|
|
2088
|
+
# security credentials of an IAM user. As a result, this call is
|
|
2089
|
+
# appropriate in contexts where those credentials can be safeguarded,
|
|
2090
|
+
# usually in a server-based application. For a comparison of
|
|
2091
|
+
# `GetFederationToken` with the other API operations that produce
|
|
2092
|
+
# temporary credentials, see [Requesting Temporary Security
|
|
2093
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
|
2094
|
+
# Guide*.
|
|
2095
|
+
#
|
|
2096
|
+
# Although it is possible to call `GetFederationToken` using the
|
|
2097
|
+
# security credentials of an Amazon Web Services account root user
|
|
2098
|
+
# rather than an IAM user that you create for the purpose of a proxy
|
|
2099
|
+
# application, we do not recommend it. For more information, see
|
|
2100
|
+
# [Safeguard your root user credentials and don't use them for everyday
|
|
2101
|
+
# tasks][3] in the *IAM User Guide*.
|
|
1799
2102
|
#
|
|
1800
2103
|
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
|
1801
2104
|
# authenticate users using a web identity provider like Login with
|
|
1802
2105
|
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
|
1803
|
-
# provider. In this case, we recommend that you use [Amazon Cognito][
|
|
2106
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][4]
|
|
1804
2107
|
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
|
1805
|
-
# Through a Web-based Identity Provider][
|
|
2108
|
+
# Through a Web-based Identity Provider][5] in the *IAM User Guide*.
|
|
1806
2109
|
#
|
|
1807
2110
|
# </note>
|
|
1808
2111
|
#
|
|
1809
|
-
# You can also call `GetFederationToken` using the security credentials
|
|
1810
|
-
# of an Amazon Web Services account root user, but we do not recommend
|
|
1811
|
-
# it. Instead, we recommend that you create an IAM user for the purpose
|
|
1812
|
-
# of the proxy application. Then attach a policy to the IAM user that
|
|
1813
|
-
# limits federated users to only the actions and resources that they
|
|
1814
|
-
# need to access. For more information, see [IAM Best Practices][5] in
|
|
1815
|
-
# the *IAM User Guide*.
|
|
1816
|
-
#
|
|
1817
2112
|
# **Session duration**
|
|
1818
2113
|
#
|
|
1819
2114
|
# The temporary credentials are valid for the specified duration, from
|
|
1820
2115
|
# 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
|
|
1821
2116
|
# hours). The default session duration is 43,200 seconds (12 hours).
|
|
1822
|
-
# Temporary credentials obtained by using the
|
|
1823
|
-
#
|
|
1824
|
-
# (1 hour).
|
|
2117
|
+
# Temporary credentials obtained by using the root user credentials have
|
|
2118
|
+
# a maximum duration of 3,600 seconds (1 hour).
|
|
1825
2119
|
#
|
|
1826
2120
|
# **Permissions**
|
|
1827
2121
|
#
|
|
1828
2122
|
# You can use the temporary credentials created by `GetFederationToken`
|
|
1829
|
-
# in any Amazon Web Services service
|
|
2123
|
+
# in any Amazon Web Services service with the following exceptions:
|
|
1830
2124
|
#
|
|
1831
2125
|
# * You cannot call any IAM operations using the CLI or the Amazon Web
|
|
1832
|
-
# Services API.
|
|
2126
|
+
# Services API. This limitation does not apply to console sessions.
|
|
1833
2127
|
#
|
|
1834
2128
|
# * You cannot call any STS operations except `GetCallerIdentity`.
|
|
1835
2129
|
#
|
|
2130
|
+
# You can use temporary credentials for single sign-on (SSO) to the
|
|
2131
|
+
# console.
|
|
2132
|
+
#
|
|
1836
2133
|
# You must pass an inline or managed [session policy][6] to this
|
|
1837
2134
|
# operation. You can pass a single JSON policy document to use as an
|
|
1838
|
-
# inline session policy. You can also specify up to 10 managed
|
|
1839
|
-
# to use as managed session policies. The
|
|
1840
|
-
# both inline and managed session policies
|
|
1841
|
-
# characters.
|
|
2135
|
+
# inline session policy. You can also specify up to 10 managed policy
|
|
2136
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
|
2137
|
+
# plaintext that you use for both inline and managed session policies
|
|
2138
|
+
# can't exceed 2,048 characters.
|
|
1842
2139
|
#
|
|
1843
2140
|
# Though the session policy parameters are optional, if you do not pass
|
|
1844
2141
|
# a policy, then the resulting federated user session has no
|
|
@@ -1868,9 +2165,9 @@ module Aws::STS
|
|
|
1868
2165
|
# <note markdown="1"> You can create a mobile-based or browser-based app that can
|
|
1869
2166
|
# authenticate users using a web identity provider like Login with
|
|
1870
2167
|
# Amazon, Facebook, Google, or an OpenID Connect-compatible identity
|
|
1871
|
-
# provider. In this case, we recommend that you use [Amazon Cognito][
|
|
2168
|
+
# provider. In this case, we recommend that you use [Amazon Cognito][4]
|
|
1872
2169
|
# or `AssumeRoleWithWebIdentity`. For more information, see [Federation
|
|
1873
|
-
# Through a Web-based Identity Provider][
|
|
2170
|
+
# Through a Web-based Identity Provider][5] in the *IAM User Guide*.
|
|
1874
2171
|
#
|
|
1875
2172
|
# </note>
|
|
1876
2173
|
#
|
|
@@ -1891,10 +2188,10 @@ module Aws::STS
|
|
|
1891
2188
|
#
|
|
1892
2189
|
#
|
|
1893
2190
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
1894
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
1895
|
-
# [3]:
|
|
1896
|
-
# [4]:
|
|
1897
|
-
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
2191
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
2192
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
|
2193
|
+
# [4]: http://aws.amazon.com/cognito/
|
|
2194
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
|
|
1898
2195
|
# [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
|
1899
2196
|
# [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
|
|
1900
2197
|
# [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
|
|
@@ -1917,8 +2214,8 @@ module Aws::STS
|
|
|
1917
2214
|
#
|
|
1918
2215
|
# You must pass an inline or managed [session policy][1] to this
|
|
1919
2216
|
# operation. You can pass a single JSON policy document to use as an
|
|
1920
|
-
# inline session policy. You can also specify up to 10 managed
|
|
1921
|
-
# to use as managed session policies.
|
|
2217
|
+
# inline session policy. You can also specify up to 10 managed policy
|
|
2218
|
+
# Amazon Resource Names (ARNs) to use as managed session policies.
|
|
1922
2219
|
#
|
|
1923
2220
|
# This parameter is optional. However, if you do not pass any session
|
|
1924
2221
|
# policies, then the resulting federated user session has no
|
|
@@ -1946,12 +2243,12 @@ module Aws::STS
|
|
|
1946
2243
|
# the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
|
|
1947
2244
|
# characters.
|
|
1948
2245
|
#
|
|
1949
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
1950
|
-
#
|
|
1951
|
-
# separate limit. Your request can fail for this limit
|
|
1952
|
-
# plaintext meets the other requirements. The
|
|
1953
|
-
# response element indicates by percentage how close
|
|
1954
|
-
# tags for your request are to the upper size limit.
|
|
2246
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
2247
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
2248
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
2249
|
+
# even if your plaintext meets the other requirements. The
|
|
2250
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
2251
|
+
# the policies and tags for your request are to the upper size limit.
|
|
1955
2252
|
#
|
|
1956
2253
|
# </note>
|
|
1957
2254
|
#
|
|
@@ -1966,13 +2263,13 @@ module Aws::STS
|
|
|
1966
2263
|
#
|
|
1967
2264
|
# You must pass an inline or managed [session policy][1] to this
|
|
1968
2265
|
# operation. You can pass a single JSON policy document to use as an
|
|
1969
|
-
# inline session policy. You can also specify up to 10 managed
|
|
1970
|
-
# to use as managed session policies. The
|
|
1971
|
-
# both inline and managed session policies
|
|
1972
|
-
# characters. You can provide up to 10 managed
|
|
1973
|
-
# information about ARNs, see [Amazon Resource
|
|
1974
|
-
# Web Services Service Namespaces][2] in the
|
|
1975
|
-
# Reference.
|
|
2266
|
+
# inline session policy. You can also specify up to 10 managed policy
|
|
2267
|
+
# Amazon Resource Names (ARNs) to use as managed session policies. The
|
|
2268
|
+
# plaintext that you use for both inline and managed session policies
|
|
2269
|
+
# can't exceed 2,048 characters. You can provide up to 10 managed
|
|
2270
|
+
# policy ARNs. For more information about ARNs, see [Amazon Resource
|
|
2271
|
+
# Names (ARNs) and Amazon Web Services Service Namespaces][2] in the
|
|
2272
|
+
# Amazon Web Services General Reference.
|
|
1976
2273
|
#
|
|
1977
2274
|
# This parameter is optional. However, if you do not pass any session
|
|
1978
2275
|
# policies, then the resulting federated user session has no
|
|
@@ -1993,12 +2290,12 @@ module Aws::STS
|
|
|
1993
2290
|
# are granted in addition to the permissions that are granted by the
|
|
1994
2291
|
# session policies.
|
|
1995
2292
|
#
|
|
1996
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
1997
|
-
#
|
|
1998
|
-
# separate limit. Your request can fail for this limit
|
|
1999
|
-
# plaintext meets the other requirements. The
|
|
2000
|
-
# response element indicates by percentage how close
|
|
2001
|
-
# tags for your request are to the upper size limit.
|
|
2293
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
2294
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
2295
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
2296
|
+
# even if your plaintext meets the other requirements. The
|
|
2297
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
2298
|
+
# the policies and tags for your request are to the upper size limit.
|
|
2002
2299
|
#
|
|
2003
2300
|
# </note>
|
|
2004
2301
|
#
|
|
@@ -2011,10 +2308,10 @@ module Aws::STS
|
|
|
2011
2308
|
# The duration, in seconds, that the session should last. Acceptable
|
|
2012
2309
|
# durations for federation sessions range from 900 seconds (15 minutes)
|
|
2013
2310
|
# to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
|
|
2014
|
-
# default. Sessions obtained using
|
|
2015
|
-
#
|
|
2016
|
-
#
|
|
2017
|
-
#
|
|
2311
|
+
# default. Sessions obtained using root user credentials are restricted
|
|
2312
|
+
# to a maximum of 3,600 seconds (one hour). If the specified duration is
|
|
2313
|
+
# longer than one hour, the session obtained by using root user
|
|
2314
|
+
# credentials defaults to one hour.
|
|
2018
2315
|
#
|
|
2019
2316
|
# @option params [Array<Types::Tag>] :tags
|
|
2020
2317
|
# A list of session tags. Each session tag consists of a key name and an
|
|
@@ -2026,12 +2323,12 @@ module Aws::STS
|
|
|
2026
2323
|
# can’t exceed 256 characters. For these and additional limits, see [IAM
|
|
2027
2324
|
# and STS Character Limits][2] in the *IAM User Guide*.
|
|
2028
2325
|
#
|
|
2029
|
-
# <note markdown="1"> An Amazon Web Services conversion compresses the passed session
|
|
2030
|
-
#
|
|
2031
|
-
# separate limit. Your request can fail for this limit
|
|
2032
|
-
# plaintext meets the other requirements. The
|
|
2033
|
-
# response element indicates by percentage how close
|
|
2034
|
-
# tags for your request are to the upper size limit.
|
|
2326
|
+
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
|
|
2327
|
+
# policy, managed policy ARNs, and session tags into a packed binary
|
|
2328
|
+
# format that has a separate limit. Your request can fail for this limit
|
|
2329
|
+
# even if your plaintext meets the other requirements. The
|
|
2330
|
+
# `PackedPolicySize` response element indicates by percentage how close
|
|
2331
|
+
# the policies and tags for your request are to the upper size limit.
|
|
2035
2332
|
#
|
|
2036
2333
|
# </note>
|
|
2037
2334
|
#
|
|
@@ -2134,16 +2431,17 @@ module Aws::STS
|
|
|
2134
2431
|
# secret access key, and a security token. Typically, you use
|
|
2135
2432
|
# `GetSessionToken` if you want to use MFA to protect programmatic calls
|
|
2136
2433
|
# to specific Amazon Web Services API operations like Amazon EC2
|
|
2137
|
-
# `StopInstances`.
|
|
2138
|
-
#
|
|
2139
|
-
# MFA
|
|
2140
|
-
#
|
|
2141
|
-
#
|
|
2142
|
-
#
|
|
2143
|
-
#
|
|
2144
|
-
#
|
|
2145
|
-
#
|
|
2146
|
-
#
|
|
2434
|
+
# `StopInstances`.
|
|
2435
|
+
#
|
|
2436
|
+
# MFA-enabled IAM users must call `GetSessionToken` and submit an MFA
|
|
2437
|
+
# code that is associated with their MFA device. Using the temporary
|
|
2438
|
+
# security credentials that the call returns, IAM users can then make
|
|
2439
|
+
# programmatic calls to API operations that require MFA authentication.
|
|
2440
|
+
# An incorrect MFA code causes the API to return an access denied error.
|
|
2441
|
+
# For a comparison of `GetSessionToken` with the other API operations
|
|
2442
|
+
# that produce temporary credentials, see [Requesting Temporary Security
|
|
2443
|
+
# Credentials][1] and [Compare STS credentials][2] in the *IAM User
|
|
2444
|
+
# Guide*.
|
|
2147
2445
|
#
|
|
2148
2446
|
# <note markdown="1"> No permissions are required for users to perform this operation. The
|
|
2149
2447
|
# purpose of the `sts:GetSessionToken` operation is to authenticate the
|
|
@@ -2156,13 +2454,13 @@ module Aws::STS
|
|
|
2156
2454
|
# **Session Duration**
|
|
2157
2455
|
#
|
|
2158
2456
|
# The `GetSessionToken` operation must be called by using the long-term
|
|
2159
|
-
# Amazon Web Services security credentials of
|
|
2160
|
-
#
|
|
2161
|
-
#
|
|
2162
|
-
#
|
|
2163
|
-
# (
|
|
2164
|
-
#
|
|
2165
|
-
#
|
|
2457
|
+
# Amazon Web Services security credentials of an IAM user. Credentials
|
|
2458
|
+
# that are created by IAM users are valid for the duration that you
|
|
2459
|
+
# specify. This duration can range from 900 seconds (15 minutes) up to a
|
|
2460
|
+
# maximum of 129,600 seconds (36 hours), with a default of 43,200
|
|
2461
|
+
# seconds (12 hours). Credentials based on account credentials can range
|
|
2462
|
+
# from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a
|
|
2463
|
+
# default of 1 hour.
|
|
2166
2464
|
#
|
|
2167
2465
|
# **Permissions**
|
|
2168
2466
|
#
|
|
@@ -2176,32 +2474,31 @@ module Aws::STS
|
|
|
2176
2474
|
# * You cannot call any STS API *except* `AssumeRole` or
|
|
2177
2475
|
# `GetCallerIdentity`.
|
|
2178
2476
|
#
|
|
2179
|
-
#
|
|
2180
|
-
#
|
|
2181
|
-
#
|
|
2182
|
-
#
|
|
2183
|
-
# with Amazon Web Services.
|
|
2477
|
+
# The credentials that `GetSessionToken` returns are based on
|
|
2478
|
+
# permissions associated with the IAM user whose credentials were used
|
|
2479
|
+
# to call the operation. The temporary credentials have the same
|
|
2480
|
+
# permissions as the IAM user.
|
|
2184
2481
|
#
|
|
2185
|
-
#
|
|
2482
|
+
# <note markdown="1"> Although it is possible to call `GetSessionToken` using the security
|
|
2483
|
+
# credentials of an Amazon Web Services account root user rather than an
|
|
2484
|
+
# IAM user, we do not recommend it. If `GetSessionToken` is called using
|
|
2485
|
+
# root user credentials, the temporary credentials have root user
|
|
2486
|
+
# permissions. For more information, see [Safeguard your root user
|
|
2487
|
+
# credentials and don't use them for everyday tasks][4] in the *IAM
|
|
2488
|
+
# User Guide*
|
|
2186
2489
|
#
|
|
2187
|
-
#
|
|
2188
|
-
# permissions associated with the user whose credentials were used to
|
|
2189
|
-
# call the operation. If `GetSessionToken` is called using Amazon Web
|
|
2190
|
-
# Services account root user credentials, the temporary credentials have
|
|
2191
|
-
# root user permissions. Similarly, if `GetSessionToken` is called using
|
|
2192
|
-
# the credentials of an IAM user, the temporary credentials have the
|
|
2193
|
-
# same permissions as the IAM user.
|
|
2490
|
+
# </note>
|
|
2194
2491
|
#
|
|
2195
2492
|
# For more information about using `GetSessionToken` to create temporary
|
|
2196
|
-
# credentials,
|
|
2493
|
+
# credentials, see [Temporary Credentials for Users in Untrusted
|
|
2197
2494
|
# Environments][5] in the *IAM User Guide*.
|
|
2198
2495
|
#
|
|
2199
2496
|
#
|
|
2200
2497
|
#
|
|
2201
2498
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
|
|
2202
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
|
2499
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
|
|
2203
2500
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
|
|
2204
|
-
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#
|
|
2501
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
|
|
2205
2502
|
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
|
|
2206
2503
|
#
|
|
2207
2504
|
# @option params [Integer] :duration_seconds
|
|
@@ -2292,14 +2589,19 @@ module Aws::STS
|
|
|
2292
2589
|
# @api private
|
|
2293
2590
|
def build_request(operation_name, params = {})
|
|
2294
2591
|
handlers = @handlers.for(operation_name)
|
|
2592
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
|
2593
|
+
Aws::Telemetry.module_to_tracer_name('Aws::STS')
|
|
2594
|
+
)
|
|
2295
2595
|
context = Seahorse::Client::RequestContext.new(
|
|
2296
2596
|
operation_name: operation_name,
|
|
2297
2597
|
operation: config.api.operation(operation_name),
|
|
2298
2598
|
client: self,
|
|
2299
2599
|
params: params,
|
|
2300
|
-
config: config
|
|
2600
|
+
config: config,
|
|
2601
|
+
tracer: tracer
|
|
2602
|
+
)
|
|
2301
2603
|
context[:gem_name] = 'aws-sdk-core'
|
|
2302
|
-
context[:gem_version] = '3.
|
|
2604
|
+
context[:gem_version] = '3.234.0'
|
|
2303
2605
|
Seahorse::Client::Request.new(handlers, context)
|
|
2304
2606
|
end
|
|
2305
2607
|
|