aws-sdk-core 3.54.2 → 3.126.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1247 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -1
  5. data/lib/aws-defaults/default_configuration.rb +153 -0
  6. data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
  7. data/lib/aws-defaults.rb +3 -0
  8. data/lib/aws-sdk-core/arn.rb +92 -0
  9. data/lib/aws-sdk-core/arn_parser.rb +40 -0
  10. data/lib/aws-sdk-core/assume_role_credentials.rb +2 -0
  11. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +104 -0
  12. data/lib/aws-sdk-core/async_client_stubs.rb +4 -2
  13. data/lib/aws-sdk-core/binary/decode_handler.rb +2 -0
  14. data/lib/aws-sdk-core/binary/encode_handler.rb +2 -0
  15. data/lib/aws-sdk-core/binary/event_builder.rb +8 -6
  16. data/lib/aws-sdk-core/binary/event_parser.rb +5 -3
  17. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +2 -0
  18. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +2 -0
  19. data/lib/aws-sdk-core/binary.rb +2 -0
  20. data/lib/aws-sdk-core/client_side_monitoring/publisher.rb +11 -1
  21. data/lib/aws-sdk-core/client_side_monitoring/request_metrics.rb +2 -0
  22. data/lib/aws-sdk-core/client_stubs.rb +15 -12
  23. data/lib/aws-sdk-core/credential_provider.rb +1 -30
  24. data/lib/aws-sdk-core/credential_provider_chain.rb +102 -40
  25. data/lib/aws-sdk-core/credentials.rb +2 -0
  26. data/lib/aws-sdk-core/deprecations.rb +17 -11
  27. data/lib/aws-sdk-core/eager_loader.rb +2 -0
  28. data/lib/aws-sdk-core/ec2_metadata.rb +237 -0
  29. data/lib/aws-sdk-core/ecs_credentials.rb +5 -4
  30. data/lib/aws-sdk-core/endpoint_cache.rb +16 -11
  31. data/lib/aws-sdk-core/errors.rb +102 -15
  32. data/lib/aws-sdk-core/event_emitter.rb +2 -0
  33. data/lib/aws-sdk-core/ini_parser.rb +2 -0
  34. data/lib/aws-sdk-core/instance_profile_credentials.rb +153 -39
  35. data/lib/aws-sdk-core/json/builder.rb +2 -0
  36. data/lib/aws-sdk-core/json/error_handler.rb +2 -0
  37. data/lib/aws-sdk-core/json/handler.rb +2 -0
  38. data/lib/aws-sdk-core/json/json_engine.rb +12 -8
  39. data/lib/aws-sdk-core/json/oj_engine.rb +35 -6
  40. data/lib/aws-sdk-core/json/parser.rb +10 -0
  41. data/lib/aws-sdk-core/json.rb +11 -28
  42. data/lib/aws-sdk-core/log/formatter.rb +16 -4
  43. data/lib/aws-sdk-core/log/handler.rb +2 -0
  44. data/lib/aws-sdk-core/log/param_filter.rb +38 -13
  45. data/lib/aws-sdk-core/log/param_formatter.rb +2 -0
  46. data/lib/aws-sdk-core/pageable_response.rb +48 -24
  47. data/lib/aws-sdk-core/pager.rb +5 -0
  48. data/lib/aws-sdk-core/param_converter.rb +2 -0
  49. data/lib/aws-sdk-core/param_validator.rb +55 -7
  50. data/lib/aws-sdk-core/plugins/api_key.rb +5 -1
  51. data/lib/aws-sdk-core/plugins/apig_authorizer_token.rb +2 -0
  52. data/lib/aws-sdk-core/plugins/apig_credentials_configuration.rb +2 -0
  53. data/lib/aws-sdk-core/plugins/apig_user_agent.rb +2 -0
  54. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +28 -1
  55. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +2 -0
  56. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +26 -7
  57. data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
  58. data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +12 -4
  59. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +8 -6
  60. data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +2 -0
  61. data/lib/aws-sdk-core/plugins/global_configuration.rb +2 -0
  62. data/lib/aws-sdk-core/plugins/helpful_socket_errors.rb +2 -0
  63. data/lib/aws-sdk-core/plugins/http_checksum.rb +57 -0
  64. data/lib/aws-sdk-core/plugins/idempotency_token.rb +2 -0
  65. data/lib/aws-sdk-core/plugins/invocation_id.rb +2 -0
  66. data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +2 -0
  67. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  68. data/lib/aws-sdk-core/plugins/param_converter.rb +2 -0
  69. data/lib/aws-sdk-core/plugins/param_validator.rb +2 -0
  70. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +19 -0
  71. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -0
  72. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +2 -0
  73. data/lib/aws-sdk-core/plugins/protocols/query.rb +2 -0
  74. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +18 -1
  75. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +2 -0
  76. data/lib/aws-sdk-core/plugins/recursion_detection.rb +27 -0
  77. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -16
  78. data/lib/aws-sdk-core/plugins/response_paging.rb +2 -0
  79. data/lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb +139 -0
  80. data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +100 -0
  81. data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +146 -0
  82. data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +59 -0
  83. data/lib/aws-sdk-core/plugins/retry_errors.rb +295 -108
  84. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -0
  85. data/lib/aws-sdk-core/plugins/signature_v4.rb +28 -25
  86. data/lib/aws-sdk-core/plugins/stub_responses.rb +5 -0
  87. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +4 -4
  88. data/lib/aws-sdk-core/plugins/user_agent.rb +6 -8
  89. data/lib/aws-sdk-core/process_credentials.rb +8 -7
  90. data/lib/aws-sdk-core/query/ec2_param_builder.rb +2 -0
  91. data/lib/aws-sdk-core/query/handler.rb +2 -0
  92. data/lib/aws-sdk-core/query/param.rb +2 -0
  93. data/lib/aws-sdk-core/query/param_builder.rb +2 -0
  94. data/lib/aws-sdk-core/query/param_list.rb +2 -0
  95. data/lib/aws-sdk-core/query.rb +2 -0
  96. data/lib/aws-sdk-core/refreshing_credentials.rb +2 -0
  97. data/lib/aws-sdk-core/resources/collection.rb +2 -0
  98. data/lib/aws-sdk-core/rest/handler.rb +2 -0
  99. data/lib/aws-sdk-core/rest/request/body.rb +21 -1
  100. data/lib/aws-sdk-core/rest/request/builder.rb +2 -0
  101. data/lib/aws-sdk-core/rest/request/endpoint.rb +10 -3
  102. data/lib/aws-sdk-core/rest/request/headers.rb +20 -6
  103. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +4 -2
  104. data/lib/aws-sdk-core/rest/response/body.rb +2 -0
  105. data/lib/aws-sdk-core/rest/response/headers.rb +6 -3
  106. data/lib/aws-sdk-core/rest/response/parser.rb +2 -0
  107. data/lib/aws-sdk-core/rest/response/status_code.rb +2 -0
  108. data/lib/aws-sdk-core/rest.rb +2 -0
  109. data/lib/aws-sdk-core/shared_config.rb +153 -122
  110. data/lib/aws-sdk-core/shared_credentials.rb +9 -1
  111. data/lib/aws-sdk-core/sso_credentials.rb +131 -0
  112. data/lib/aws-sdk-core/structure.rb +13 -2
  113. data/lib/aws-sdk-core/stubbing/data_applicator.rb +2 -0
  114. data/lib/aws-sdk-core/stubbing/empty_stub.rb +2 -0
  115. data/lib/aws-sdk-core/stubbing/protocols/api_gateway.rb +2 -0
  116. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +2 -0
  117. data/lib/aws-sdk-core/stubbing/protocols/json.rb +3 -1
  118. data/lib/aws-sdk-core/stubbing/protocols/query.rb +4 -2
  119. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +33 -7
  120. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +3 -1
  121. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +2 -2
  122. data/lib/aws-sdk-core/stubbing/stub_data.rb +2 -0
  123. data/lib/aws-sdk-core/stubbing/xml_error.rb +2 -0
  124. data/lib/aws-sdk-core/type_builder.rb +2 -0
  125. data/lib/aws-sdk-core/util.rb +6 -0
  126. data/lib/aws-sdk-core/waiters/errors.rb +2 -0
  127. data/lib/aws-sdk-core/waiters/poller.rb +2 -0
  128. data/lib/aws-sdk-core/waiters/waiter.rb +2 -0
  129. data/lib/aws-sdk-core/waiters.rb +2 -0
  130. data/lib/aws-sdk-core/xml/builder.rb +5 -3
  131. data/lib/aws-sdk-core/xml/default_list.rb +2 -0
  132. data/lib/aws-sdk-core/xml/default_map.rb +2 -0
  133. data/lib/aws-sdk-core/xml/doc_builder.rb +15 -4
  134. data/lib/aws-sdk-core/xml/error_handler.rb +3 -1
  135. data/lib/aws-sdk-core/xml/parser/engines/libxml.rb +2 -0
  136. data/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb +2 -0
  137. data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
  138. data/lib/aws-sdk-core/xml/parser/engines/ox.rb +3 -1
  139. data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +4 -1
  140. data/lib/aws-sdk-core/xml/parser/frame.rb +25 -0
  141. data/lib/aws-sdk-core/xml/parser/parsing_error.rb +2 -0
  142. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  143. data/lib/aws-sdk-core/xml/parser.rb +7 -0
  144. data/lib/aws-sdk-core/xml.rb +2 -0
  145. data/lib/aws-sdk-core.rb +22 -4
  146. data/lib/aws-sdk-sso/client.rb +568 -0
  147. data/lib/aws-sdk-sso/client_api.rb +190 -0
  148. data/lib/aws-sdk-sso/customizations.rb +1 -0
  149. data/lib/aws-sdk-sso/errors.rb +102 -0
  150. data/lib/aws-sdk-sso/resource.rb +26 -0
  151. data/lib/aws-sdk-sso/types.rb +352 -0
  152. data/lib/aws-sdk-sso.rb +55 -0
  153. data/lib/aws-sdk-sts/client.rb +970 -414
  154. data/lib/aws-sdk-sts/client_api.rb +41 -1
  155. data/lib/aws-sdk-sts/customizations.rb +4 -0
  156. data/lib/aws-sdk-sts/errors.rb +33 -9
  157. data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +38 -0
  158. data/lib/aws-sdk-sts/presigner.rb +75 -0
  159. data/lib/aws-sdk-sts/resource.rb +4 -1
  160. data/lib/aws-sdk-sts/types.rb +632 -236
  161. data/lib/aws-sdk-sts.rb +16 -6
  162. data/lib/seahorse/client/async_base.rb +2 -0
  163. data/lib/seahorse/client/async_response.rb +2 -0
  164. data/lib/seahorse/client/base.rb +6 -1
  165. data/lib/seahorse/client/block_io.rb +6 -2
  166. data/lib/seahorse/client/configuration.rb +6 -0
  167. data/lib/seahorse/client/events.rb +2 -0
  168. data/lib/seahorse/client/h2/connection.rb +31 -25
  169. data/lib/seahorse/client/h2/handler.rb +6 -5
  170. data/lib/seahorse/client/handler.rb +2 -0
  171. data/lib/seahorse/client/handler_builder.rb +2 -0
  172. data/lib/seahorse/client/handler_list.rb +2 -0
  173. data/lib/seahorse/client/handler_list_entry.rb +6 -4
  174. data/lib/seahorse/client/http/async_response.rb +2 -0
  175. data/lib/seahorse/client/http/headers.rb +2 -0
  176. data/lib/seahorse/client/http/request.rb +5 -3
  177. data/lib/seahorse/client/http/response.rb +5 -3
  178. data/lib/seahorse/client/logging/formatter.rb +6 -2
  179. data/lib/seahorse/client/logging/handler.rb +2 -0
  180. data/lib/seahorse/client/managed_file.rb +2 -0
  181. data/lib/seahorse/client/net_http/connection_pool.rb +30 -23
  182. data/lib/seahorse/client/net_http/handler.rb +24 -7
  183. data/lib/seahorse/client/net_http/patches.rb +15 -84
  184. data/lib/seahorse/client/networking_error.rb +2 -0
  185. data/lib/seahorse/client/plugin.rb +9 -6
  186. data/lib/seahorse/client/plugin_list.rb +2 -0
  187. data/lib/seahorse/client/plugins/content_length.rb +13 -7
  188. data/lib/seahorse/client/plugins/endpoint.rb +4 -2
  189. data/lib/seahorse/client/plugins/h2.rb +6 -1
  190. data/lib/seahorse/client/plugins/logging.rb +2 -0
  191. data/lib/seahorse/client/plugins/net_http.rb +39 -3
  192. data/lib/seahorse/client/plugins/operation_methods.rb +2 -0
  193. data/lib/seahorse/client/plugins/raise_response_errors.rb +2 -0
  194. data/lib/seahorse/client/plugins/request_callback.rb +110 -0
  195. data/lib/seahorse/client/plugins/response_target.rb +23 -14
  196. data/lib/seahorse/client/request.rb +2 -0
  197. data/lib/seahorse/client/request_context.rb +2 -0
  198. data/lib/seahorse/client/response.rb +5 -5
  199. data/lib/seahorse/model/api.rb +6 -0
  200. data/lib/seahorse/model/authorizer.rb +2 -0
  201. data/lib/seahorse/model/operation.rb +5 -0
  202. data/lib/seahorse/model/shapes.rb +27 -0
  203. data/lib/seahorse/util.rb +8 -1
  204. data/lib/seahorse/version.rb +2 -0
  205. data/lib/seahorse.rb +3 -0
  206. metadata +43 -11
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
@@ -24,12 +26,28 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
26
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
27
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
28
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
31
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
27
32
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
33
  require 'aws-sdk-core/plugins/protocols/query.rb'
34
+ require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
29
35
 
30
36
  Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
31
37
 
32
38
  module Aws::STS
39
+ # An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
40
+ #
41
+ # client = Aws::STS::Client.new(
42
+ # region: region_name,
43
+ # credentials: credentials,
44
+ # # ...
45
+ # )
46
+ #
47
+ # For details on configuring region and credentials see
48
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
49
+ #
50
+ # See {#initialize} for a full list of supported configuration options.
33
51
  class Client < Seahorse::Client::Base
34
52
 
35
53
  include Aws::ClientStubs
@@ -57,8 +75,12 @@ module Aws::STS
57
75
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
58
76
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
77
  add_plugin(Aws::Plugins::TransferEncoding)
78
+ add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::DefaultsMode)
80
+ add_plugin(Aws::Plugins::RecursionDetection)
60
81
  add_plugin(Aws::Plugins::SignatureV4)
61
82
  add_plugin(Aws::Plugins::Protocols::Query)
83
+ add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
62
84
 
63
85
  # @overload initialize(options)
64
86
  # @param [Hash] options
@@ -69,13 +91,28 @@ module Aws::STS
69
91
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
70
92
  # credentials.
71
93
  #
94
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
95
+ # shared file, such as `~/.aws/config`.
96
+ #
97
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
98
+ #
99
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
100
+ # assume a role after providing credentials via the web.
101
+ #
102
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
103
+ # access token generated from `aws login`.
104
+ #
105
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
106
+ # process that outputs to stdout.
107
+ #
72
108
  # * `Aws::InstanceProfileCredentials` - Used for loading credentials
73
109
  # from an EC2 IMDS on an EC2 instance.
74
110
  #
75
- # * `Aws::SharedCredentials` - Used for loading credentials from a
76
- # shared file, such as `~/.aws/config`.
111
+ # * `Aws::ECSCredentials` - Used for loading credentials from
112
+ # instances running in ECS.
77
113
  #
78
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
114
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
115
+ # from the Cognito Identity service.
79
116
  #
80
117
  # When `:credentials` are not configured directly, the following
81
118
  # locations will be searched for credentials:
@@ -85,15 +122,17 @@ module Aws::STS
85
122
  # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
86
123
  # * `~/.aws/credentials`
87
124
  # * `~/.aws/config`
88
- # * EC2 IMDS instance profile - When used by default, the timeouts are
89
- # very aggressive. Construct and pass an instance of
90
- # `Aws::InstanceProfileCredentails` to enable retries and extended
91
- # timeouts.
125
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
126
+ # are very aggressive. Construct and pass an instance of
127
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
128
+ # enable retries and extended timeouts. Instance profile credential
129
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
130
+ # to true.
92
131
  #
93
132
  # @option options [required, String] :region
94
133
  # The AWS region to connect to. The configured `:region` is
95
134
  # used to determine the service `:endpoint`. When not passed,
96
- # a default `:region` is search for in the following locations:
135
+ # a default `:region` is searched for in the following locations:
97
136
  #
98
137
  # * `Aws.config[:region]`
99
138
  # * `ENV['AWS_REGION']`
@@ -108,6 +147,12 @@ module Aws::STS
108
147
  # When set to `true`, a thread polling for endpoints will be running in
109
148
  # the background every 60 secs (default). Defaults to `false`.
110
149
  #
150
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
151
+ # Used only in `adaptive` retry mode. When true, the request will sleep
152
+ # until there is sufficent client side capacity to retry the request.
153
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
154
+ # not retry instead of sleeping.
155
+ #
111
156
  # @option options [Boolean] :client_side_monitoring (false)
112
157
  # When `true`, client-side metrics will be collected for all API requests from
113
158
  # this client.
@@ -116,6 +161,10 @@ module Aws::STS
116
161
  # Allows you to provide an identifier for this client which will be attached to
117
162
  # all generated client side metrics. Defaults to an empty string.
118
163
  #
164
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
165
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
166
+ # side monitoring agent is running on, where client metrics will be published via UDP.
167
+ #
119
168
  # @option options [Integer] :client_side_monitoring_port (31000)
120
169
  # Required for publishing client metrics. The port that the client side monitoring
121
170
  # agent is running on, where client metrics will be published via UDP.
@@ -128,6 +177,14 @@ module Aws::STS
128
177
  # When `true`, an attempt is made to coerce request parameters into
129
178
  # the required types.
130
179
  #
180
+ # @option options [Boolean] :correct_clock_skew (true)
181
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
182
+ # a clock skew correction and retry requests with skewed client clocks.
183
+ #
184
+ # @option options [String] :defaults_mode ("legacy")
185
+ # See {Aws::DefaultsModeConfiguration} for a list of the
186
+ # accepted modes and the configuration defaults that are included.
187
+ #
131
188
  # @option options [Boolean] :disable_host_prefix_injection (false)
132
189
  # Set to true to disable SDK automatically adding host prefix
133
190
  # to default service endpoint when available.
@@ -135,7 +192,7 @@ module Aws::STS
135
192
  # @option options [String] :endpoint
136
193
  # The client endpoint is normally constructed from the `:region`
137
194
  # option. You should only configure an `:endpoint` when connecting
138
- # to test endpoints. This should be avalid HTTP(S) URI.
195
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
139
196
  #
140
197
  # @option options [Integer] :endpoint_cache_max_entries (1000)
141
198
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -150,7 +207,7 @@ module Aws::STS
150
207
  # requests fetching endpoints information. Defaults to 60 sec.
151
208
  #
152
209
  # @option options [Boolean] :endpoint_discovery (false)
153
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
210
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
154
211
  #
155
212
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
156
213
  # The log formatter.
@@ -162,15 +219,29 @@ module Aws::STS
162
219
  # The Logger instance to send log messages to. If this option
163
220
  # is not set, logging will be disabled.
164
221
  #
222
+ # @option options [Integer] :max_attempts (3)
223
+ # An integer representing the maximum number attempts that will be made for
224
+ # a single request, including the initial attempt. For example,
225
+ # setting this value to 5 will result in a request being retried up to
226
+ # 4 times. Used in `standard` and `adaptive` retry modes.
227
+ #
165
228
  # @option options [String] :profile ("default")
166
229
  # Used when loading credentials from the shared credentials file
167
230
  # at HOME/.aws/credentials. When not specified, 'default' is used.
168
231
  #
232
+ # @option options [Proc] :retry_backoff
233
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
234
+ # This option is only used in the `legacy` retry mode.
235
+ #
169
236
  # @option options [Float] :retry_base_delay (0.3)
170
- # The base delay in seconds used by the default backoff function.
237
+ # The base delay in seconds used by the default backoff function. This option
238
+ # is only used in the `legacy` retry mode.
171
239
  #
172
240
  # @option options [Symbol] :retry_jitter (:none)
173
- # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
241
+ # A delay randomiser function used by the default backoff function.
242
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
243
+ # otherwise a Proc that takes and returns a number. This option is only used
244
+ # in the `legacy` retry mode.
174
245
  #
175
246
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
176
247
  #
@@ -178,16 +249,40 @@ module Aws::STS
178
249
  # The maximum number of times to retry failed requests. Only
179
250
  # ~ 500 level server errors and certain ~ 400 level client errors
180
251
  # are retried. Generally, these are throttling errors, data
181
- # checksum errors, networking errors, timeout errors and auth
182
- # errors from expired credentials.
252
+ # checksum errors, networking errors, timeout errors, auth errors,
253
+ # endpoint discovery, and errors from expired credentials.
254
+ # This option is only used in the `legacy` retry mode.
183
255
  #
184
256
  # @option options [Integer] :retry_max_delay (0)
185
- # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
257
+ # The maximum number of seconds to delay between retries (0 for no limit)
258
+ # used by the default backoff function. This option is only used in the
259
+ # `legacy` retry mode.
260
+ #
261
+ # @option options [String] :retry_mode ("legacy")
262
+ # Specifies which retry algorithm to use. Values are:
263
+ #
264
+ # * `legacy` - The pre-existing retry behavior. This is default value if
265
+ # no retry mode is provided.
266
+ #
267
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
268
+ # This includes support for retry quotas, which limit the number of
269
+ # unsuccessful retries a client can make.
270
+ #
271
+ # * `adaptive` - An experimental retry mode that includes all the
272
+ # functionality of `standard` mode along with automatic client side
273
+ # throttling. This is a provisional mode that may change behavior
274
+ # in the future.
275
+ #
186
276
  #
187
277
  # @option options [String] :secret_access_key
188
278
  #
189
279
  # @option options [String] :session_token
190
280
  #
281
+ # @option options [String] :sts_regional_endpoints ("regional")
282
+ # Passing in 'regional' to enable regional endpoint for STS for all supported
283
+ # regions (except 'aws-global'). Using 'legacy' mode will force all legacy
284
+ # regions to resolve to the STS global endpoint.
285
+ #
191
286
  # @option options [Boolean] :stub_responses (false)
192
287
  # Causes the client to return stubbed responses. By default
193
288
  # fake responses are generated and returned. You can specify
@@ -197,6 +292,15 @@ module Aws::STS
197
292
  # ** Please note ** When response stubbing is enabled, no HTTP
198
293
  # requests are made, and retries are disabled.
199
294
  #
295
+ # @option options [Boolean] :use_dualstack_endpoint
296
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
297
+ # will be used if available.
298
+ #
299
+ # @option options [Boolean] :use_fips_endpoint
300
+ # When set to `true`, fips compatible endpoints will be used if available.
301
+ # When a `fips` region is used, the region is normalized and this config
302
+ # is set to `true`.
303
+ #
200
304
  # @option options [Boolean] :validate_params (true)
201
305
  # When `true`, request parameters are validated before
202
306
  # sending the request.
@@ -205,16 +309,15 @@ module Aws::STS
205
309
  # requests through. Formatted like 'http://proxy.com:123'.
206
310
  #
207
311
  # @option options [Float] :http_open_timeout (15) The number of
208
- # seconds to wait when opening a HTTP session before rasing a
312
+ # seconds to wait when opening a HTTP session before raising a
209
313
  # `Timeout::Error`.
210
314
  #
211
- # @option options [Integer] :http_read_timeout (60) The default
315
+ # @option options [Float] :http_read_timeout (60) The default
212
316
  # number of seconds to wait for response data. This value can
213
- # safely be set
214
- # per-request on the session yeidled by {#session_for}.
317
+ # safely be set per-request on the session.
215
318
  #
216
319
  # @option options [Float] :http_idle_timeout (5) The number of
217
- # seconds a connection is allowed to sit idble before it is
320
+ # seconds a connection is allowed to sit idle before it is
218
321
  # considered stale. Stale connections are closed and removed
219
322
  # from the pool before making a request.
220
323
  #
@@ -223,7 +326,10 @@ module Aws::STS
223
326
  # request body. This option has no effect unless the request has
224
327
  # "Expect" header set to "100-continue". Defaults to `nil` which
225
328
  # disables this behaviour. This value can safely be set per
226
- # request on the session yeidled by {#session_for}.
329
+ # request on the session.
330
+ #
331
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
332
+ # in seconds.
227
333
  #
228
334
  # @option options [Boolean] :http_wire_trace (false) When `true`,
229
335
  # HTTP debug output will be sent to the `:logger`.
@@ -251,95 +357,96 @@ module Aws::STS
251
357
  # @!group API Operations
252
358
 
253
359
  # Returns a set of temporary security credentials that you can use to
254
- # access AWS resources that you might not normally have access to. These
255
- # temporary credentials consist of an access key ID, a secret access
256
- # key, and a security token. Typically, you use `AssumeRole` within your
257
- # account or for cross-account access. For a comparison of `AssumeRole`
258
- # with other API operations that produce temporary credentials, see
259
- # [Requesting Temporary Security Credentials][1] and [Comparing the AWS
260
- # STS API operations][2] in the *IAM User Guide*.
261
- #
262
- # You cannot use AWS account root user credentials to call `AssumeRole`.
263
- # You must use credentials for an IAM user or an IAM role to call
264
- # `AssumeRole`.
265
- #
266
- # For cross-account access, imagine that you own multiple accounts and
267
- # need to access resources in each account. You could create long-term
268
- # credentials in each account to access those resources. However,
269
- # managing all those credentials and remembering which one can access
270
- # which account can be time consuming. Instead, you can create one set
271
- # of long-term credentials in one account. Then use temporary security
272
- # credentials to access all the other accounts by assuming roles in
273
- # those accounts. For more information about roles, see [IAM Roles][3]
274
- # in the *IAM User Guide*.
275
- #
276
- # By default, the temporary security credentials created by `AssumeRole`
277
- # last for one hour. However, you can use the optional `DurationSeconds`
278
- # parameter to specify the duration of your session. You can provide a
279
- # value from 900 seconds (15 minutes) up to the maximum session duration
280
- # setting for the role. This setting can have a value from 1 hour to 12
281
- # hours. To learn how to view the maximum value for your role, see [View
282
- # the Maximum Session Duration Setting for a Role][4] in the *IAM User
283
- # Guide*. The maximum session duration limit applies when you use the
284
- # `AssumeRole*` API operations or the `assume-role*` CLI commands.
285
- # However the limit does not apply when you use those operations to
286
- # create a console URL. For more information, see [Using IAM Roles][5]
287
- # in the *IAM User Guide*.
360
+ # access Amazon Web Services resources that you might not normally have
361
+ # access to. These temporary credentials consist of an access key ID, a
362
+ # secret access key, and a security token. Typically, you use
363
+ # `AssumeRole` within your account or for cross-account access. For a
364
+ # comparison of `AssumeRole` with other API operations that produce
365
+ # temporary credentials, see [Requesting Temporary Security
366
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
367
+ # operations][2] in the *IAM User Guide*.
368
+ #
369
+ # **Permissions**
288
370
  #
289
371
  # The temporary security credentials created by `AssumeRole` can be used
290
- # to make API calls to any AWS service with the following exception: You
291
- # cannot call the AWS STS `GetFederationToken` or `GetSessionToken` API
292
- # operations.
372
+ # to make API calls to any Amazon Web Services service with the
373
+ # following exception: You cannot call the Amazon Web Services STS
374
+ # `GetFederationToken` or `GetSessionToken` API operations.
293
375
  #
294
- # (Optional) You can pass inline or managed [session policies][6] to
376
+ # (Optional) You can pass inline or managed [session policies][3] to
295
377
  # this operation. You can pass a single JSON policy document to use as
296
378
  # an inline session policy. You can also specify up to 10 managed
297
- # policies to use as managed session policies. The plain text that you
298
- # use for both inline and managed session policies shouldn't exceed
299
- # 2048 characters. Passing policies to this operation returns new
300
- # temporary credentials. The resulting session's permissions are the
301
- # intersection of the role's identity-based policy and the session
302
- # policies. You can use the role's temporary credentials in subsequent
303
- # AWS API calls to access resources in the account that owns the role.
304
- # You cannot use session policies to grant more permissions than those
305
- # allowed by the identity-based policy of the role that is being
306
- # assumed. For more information, see [Session Policies][6] in the *IAM
379
+ # policies to use as managed session policies. The plaintext that you
380
+ # use for both inline and managed session policies can't exceed 2,048
381
+ # characters. Passing policies to this operation returns new temporary
382
+ # credentials. The resulting session's permissions are the intersection
383
+ # of the role's identity-based policy and the session policies. You can
384
+ # use the role's temporary credentials in subsequent Amazon Web
385
+ # Services API calls to access resources in the account that owns the
386
+ # role. You cannot use session policies to grant more permissions than
387
+ # those allowed by the identity-based policy of the role that is being
388
+ # assumed. For more information, see [Session Policies][3] in the *IAM
307
389
  # User Guide*.
308
390
  #
309
- # To assume a role from a different account, your AWS account must be
310
- # trusted by the role. The trust relationship is defined in the role's
311
- # trust policy when the role is created. That trust policy states which
312
- # accounts are allowed to delegate that access to users in the account.
391
+ # When you create a role, you create two policies: A role trust policy
392
+ # that specifies *who* can assume the role and a permissions policy that
393
+ # specifies *what* can be done with the role. You specify the trusted
394
+ # principal who is allowed to assume the role in the role trust policy.
395
+ #
396
+ # To assume a role from a different account, your Amazon Web Services
397
+ # account must be trusted by the role. The trust relationship is defined
398
+ # in the role's trust policy when the role is created. That trust
399
+ # policy states which accounts are allowed to delegate that access to
400
+ # users in the account.
313
401
  #
314
402
  # A user who wants to access a role in a different account must also
315
403
  # have permissions that are delegated from the user account
316
404
  # administrator. The administrator must attach a policy that allows the
317
405
  # user to call `AssumeRole` for the ARN of the role in the other
318
- # account. If the user is in the same account as the role, then you can
319
- # do either of the following:
406
+ # account.
407
+ #
408
+ # To allow a user to assume a role in the same account, you can do
409
+ # either of the following:
320
410
  #
321
- # * Attach a policy to the user (identical to the previous user in a
322
- # different account).
411
+ # * Attach a policy to the user that allows the user to call
412
+ # `AssumeRole` (as long as the role's trust policy trusts the
413
+ # account).
323
414
  #
324
415
  # * Add the user as a principal directly in the role's trust policy.
325
416
  #
326
- # In this case, the trust policy acts as an IAM resource-based policy.
327
- # Users in the same account as the role do not need explicit permission
328
- # to assume the role. For more information about trust policies and
329
- # resource-based policies, see [IAM Policies][7] in the *IAM User
330
- # Guide*.
417
+ # You can do either because the role’s trust policy acts as an IAM
418
+ # resource-based policy. When a resource-based policy grants access to a
419
+ # principal in the same account, no additional identity-based policy is
420
+ # required. For more information about trust policies and resource-based
421
+ # policies, see [IAM Policies][4] in the *IAM User Guide*.
422
+ #
423
+ # **Tags**
424
+ #
425
+ # (Optional) You can pass tag key-value pairs to your session. These
426
+ # tags are called session tags. For more information about session tags,
427
+ # see [Passing Session Tags in STS][5] in the *IAM User Guide*.
428
+ #
429
+ # An administrator must grant you the permissions necessary to pass
430
+ # session tags. The administrator can also create granular permissions
431
+ # to allow you to pass only specific session tags. For more information,
432
+ # see [Tutorial: Using Tags for Attribute-Based Access Control][6] in
433
+ # the *IAM User Guide*.
434
+ #
435
+ # You can set the session tags as transitive. Transitive tags persist
436
+ # during role chaining. For more information, see [Chaining Roles with
437
+ # Session Tags][7] in the *IAM User Guide*.
331
438
  #
332
439
  # **Using MFA with AssumeRole**
333
440
  #
334
441
  # (Optional) You can include multi-factor authentication (MFA)
335
442
  # information when you call `AssumeRole`. This is useful for
336
443
  # cross-account scenarios to ensure that the user that assumes the role
337
- # has been authenticated with an AWS MFA device. In that scenario, the
338
- # trust policy of the role being assumed includes a condition that tests
339
- # for MFA authentication. If the caller does not include valid MFA
340
- # information, the request to assume the role is denied. The condition
341
- # in a trust policy that tests for MFA authentication might look like
342
- # the following example.
444
+ # has been authenticated with an Amazon Web Services MFA device. In that
445
+ # scenario, the trust policy of the role being assumed includes a
446
+ # condition that tests for MFA authentication. If the caller does not
447
+ # include valid MFA information, the request to assume the role is
448
+ # denied. The condition in a trust policy that tests for MFA
449
+ # authentication might look like the following example.
343
450
  #
344
451
  # `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
345
452
  #
@@ -355,11 +462,11 @@ module Aws::STS
355
462
  #
356
463
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
357
464
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
358
- # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html
359
- # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
360
- # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
361
- # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
362
- # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
465
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
466
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
467
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
468
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
469
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
363
470
  # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
364
471
  #
365
472
  # @option params [required, String] :role_arn
@@ -375,7 +482,7 @@ module Aws::STS
375
482
  # also used in the ARN of the assumed role principal. This means that
376
483
  # subsequent cross-account API requests that use the temporary security
377
484
  # credentials will expose the role session name to the external account
378
- # in their AWS CloudTrail logs.
485
+ # in their CloudTrail logs.
379
486
  #
380
487
  # The regex used to validate this parameter is a string of characters
381
488
  # consisting of upper- and lower-case alphanumeric characters with no
@@ -388,33 +495,34 @@ module Aws::STS
388
495
  # the same account as the role.
389
496
  #
390
497
  # This parameter is optional. You can provide up to 10 managed policy
391
- # ARNs. However, the plain text that you use for both inline and managed
392
- # session policies shouldn't exceed 2048 characters. For more
393
- # information about ARNs, see [Amazon Resource Names (ARNs) and AWS
394
- # Service Namespaces](general/latest/gr/aws-arns-and-namespaces.html) in
395
- # the AWS General Reference.
396
- #
397
- # <note markdown="1"> The characters in this parameter count towards the 2048 character
398
- # session policy guideline. However, an AWS conversion compresses the
399
- # session policies into a packed binary format that has a separate
400
- # limit. This is the enforced limit. The `PackedPolicySize` response
401
- # element indicates by percentage how close the policy is to the upper
402
- # size limit.
498
+ # ARNs. However, the plaintext that you use for both inline and managed
499
+ # session policies can't exceed 2,048 characters. For more information
500
+ # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
501
+ # Service Namespaces][1] in the Amazon Web Services General Reference.
502
+ #
503
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
504
+ # policies and session tags into a packed binary format that has a
505
+ # separate limit. Your request can fail for this limit even if your
506
+ # plaintext meets the other requirements. The `PackedPolicySize`
507
+ # response element indicates by percentage how close the policies and
508
+ # tags for your request are to the upper size limit.
403
509
  #
404
510
  # </note>
405
511
  #
406
512
  # Passing policies to this operation returns new temporary credentials.
407
513
  # The resulting session's permissions are the intersection of the
408
514
  # role's identity-based policy and the session policies. You can use
409
- # the role's temporary credentials in subsequent AWS API calls to
410
- # access resources in the account that owns the role. You cannot use
411
- # session policies to grant more permissions than those allowed by the
412
- # identity-based policy of the role that is being assumed. For more
413
- # information, see [Session Policies][1] in the *IAM User Guide*.
515
+ # the role's temporary credentials in subsequent Amazon Web Services
516
+ # API calls to access resources in the account that owns the role. You
517
+ # cannot use session policies to grant more permissions than those
518
+ # allowed by the identity-based policy of the role that is being
519
+ # assumed. For more information, see [Session Policies][2] in the *IAM
520
+ # User Guide*.
414
521
  #
415
522
  #
416
523
  #
417
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
524
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
525
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
418
526
  #
419
527
  # @option params [String] :policy
420
528
  # An IAM policy in JSON format that you want to use as an inline session
@@ -424,25 +532,25 @@ module Aws::STS
424
532
  # new temporary credentials. The resulting session's permissions are
425
533
  # the intersection of the role's identity-based policy and the session
426
534
  # policies. You can use the role's temporary credentials in subsequent
427
- # AWS API calls to access resources in the account that owns the role.
428
- # You cannot use session policies to grant more permissions than those
429
- # allowed by the identity-based policy of the role that is being
430
- # assumed. For more information, see [Session Policies][1] in the *IAM
431
- # User Guide*.
432
- #
433
- # The plain text that you use for both inline and managed session
434
- # policies shouldn't exceed 2048 characters. The JSON policy characters
535
+ # Amazon Web Services API calls to access resources in the account that
536
+ # owns the role. You cannot use session policies to grant more
537
+ # permissions than those allowed by the identity-based policy of the
538
+ # role that is being assumed. For more information, see [Session
539
+ # Policies][1] in the *IAM User Guide*.
540
+ #
541
+ # The plaintext that you use for both inline and managed session
542
+ # policies can't exceed 2,048 characters. The JSON policy characters
435
543
  # can be any ASCII character from the space character to the end of the
436
544
  # valid character list (\\u0020 through \\u00FF). It can also include
437
545
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
438
546
  # characters.
439
547
  #
440
- # <note markdown="1"> The characters in this parameter count towards the 2048 character
441
- # session policy guideline. However, an AWS conversion compresses the
442
- # session policies into a packed binary format that has a separate
443
- # limit. This is the enforced limit. The `PackedPolicySize` response
444
- # element indicates by percentage how close the policy is to the upper
445
- # size limit.
548
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
549
+ # policies and session tags into a packed binary format that has a
550
+ # separate limit. Your request can fail for this limit even if your
551
+ # plaintext meets the other requirements. The `PackedPolicySize`
552
+ # response element indicates by percentage how close the policies and
553
+ # tags for your request are to the upper size limit.
446
554
  #
447
555
  # </note>
448
556
  #
@@ -451,15 +559,26 @@ module Aws::STS
451
559
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
452
560
  #
453
561
  # @option params [Integer] :duration_seconds
454
- # The duration, in seconds, of the role session. The value can range
455
- # from 900 seconds (15 minutes) up to the maximum session duration
456
- # setting for the role. This setting can have a value from 1 hour to 12
457
- # hours. If you specify a value higher than this setting, the operation
458
- # fails. For example, if you specify a session duration of 12 hours, but
459
- # your administrator set the maximum session duration to 6 hours, your
460
- # operation fails. To learn how to view the maximum value for your role,
461
- # see [View the Maximum Session Duration Setting for a Role][1] in the
462
- # *IAM User Guide*.
562
+ # The duration, in seconds, of the role session. The value specified can
563
+ # range from 900 seconds (15 minutes) up to the maximum session duration
564
+ # set for the role. The maximum session duration setting can have a
565
+ # value from 1 hour to 12 hours. If you specify a value higher than this
566
+ # setting or the administrator setting (whichever is lower), the
567
+ # operation fails. For example, if you specify a session duration of 12
568
+ # hours, but your administrator set the maximum session duration to 6
569
+ # hours, your operation fails.
570
+ #
571
+ # Role chaining limits your Amazon Web Services CLI or Amazon Web
572
+ # Services API role session to a maximum of one hour. When you use the
573
+ # `AssumeRole` API operation to assume a role, you can specify the
574
+ # duration of your role session with the `DurationSeconds` parameter.
575
+ # You can specify a parameter value of up to 43200 seconds (12 hours),
576
+ # depending on the maximum session duration setting for your role.
577
+ # However, if you assume a role using role chaining and provide a
578
+ # `DurationSeconds` parameter value greater than one hour, the operation
579
+ # fails. To learn how to view the maximum value for your role, see [View
580
+ # the Maximum Session Duration Setting for a Role][1] in the *IAM User
581
+ # Guide*.
463
582
  #
464
583
  # By default, the value is set to `3600` seconds.
465
584
  #
@@ -468,8 +587,8 @@ module Aws::STS
468
587
  # The request to the federation endpoint for a console sign-in token
469
588
  # takes a `SessionDuration` parameter that specifies the maximum length
470
589
  # of the console session. For more information, see [Creating a URL that
471
- # Enables Federated Users to Access the AWS Management Console][2] in
472
- # the *IAM User Guide*.
590
+ # Enables Federated Users to Access the Amazon Web Services Management
591
+ # Console][2] in the *IAM User Guide*.
473
592
  #
474
593
  # </note>
475
594
  #
@@ -478,6 +597,67 @@ module Aws::STS
478
597
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
479
598
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
480
599
  #
600
+ # @option params [Array<Types::Tag>] :tags
601
+ # A list of session tags that you want to pass. Each session tag
602
+ # consists of a key name and an associated value. For more information
603
+ # about session tags, see [Tagging Amazon Web Services STS Sessions][1]
604
+ # in the *IAM User Guide*.
605
+ #
606
+ # This parameter is optional. You can pass up to 50 session tags. The
607
+ # plaintext session tag keys can’t exceed 128 characters, and the values
608
+ # can’t exceed 256 characters. For these and additional limits, see [IAM
609
+ # and STS Character Limits][2] in the *IAM User Guide*.
610
+ #
611
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
612
+ # policies and session tags into a packed binary format that has a
613
+ # separate limit. Your request can fail for this limit even if your
614
+ # plaintext meets the other requirements. The `PackedPolicySize`
615
+ # response element indicates by percentage how close the policies and
616
+ # tags for your request are to the upper size limit.
617
+ #
618
+ # </note>
619
+ #
620
+ # You can pass a session tag with the same key as a tag that is already
621
+ # attached to the role. When you do, session tags override a role tag
622
+ # with the same key.
623
+ #
624
+ # Tag key–value pairs are not case sensitive, but case is preserved.
625
+ # This means that you cannot have separate `Department` and `department`
626
+ # tag keys. Assume that the role has the `Department`=`Marketing` tag
627
+ # and you pass the `department`=`engineering` session tag. `Department`
628
+ # and `department` are not saved as separate tags, and the session tag
629
+ # passed in the request takes precedence over the role tag.
630
+ #
631
+ # Additionally, if you used temporary credentials to perform this
632
+ # operation, the new session inherits any transitive session tags from
633
+ # the calling session. If you pass a session tag with the same key as an
634
+ # inherited tag, the operation fails. To view the inherited tags for a
635
+ # session, see the CloudTrail logs. For more information, see [Viewing
636
+ # Session Tags in CloudTrail][3] in the *IAM User Guide*.
637
+ #
638
+ #
639
+ #
640
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
641
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
642
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/session-tags.html#id_session-tags_ctlogs
643
+ #
644
+ # @option params [Array<String>] :transitive_tag_keys
645
+ # A list of keys for session tags that you want to set as transitive. If
646
+ # you set a tag key as transitive, the corresponding key and value
647
+ # passes to subsequent sessions in a role chain. For more information,
648
+ # see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
649
+ #
650
+ # This parameter is optional. When you set session tags as transitive,
651
+ # the session policy and session tags packed binary limit is not
652
+ # affected.
653
+ #
654
+ # If you choose not to specify a transitive tag key, then no tags are
655
+ # passed from this session to any subsequent sessions.
656
+ #
657
+ #
658
+ #
659
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
660
+ #
481
661
  # @option params [String] :external_id
482
662
  # A unique identifier that might be required when you assume a role in
483
663
  # another account. If the administrator of the account to which the role
@@ -489,7 +669,8 @@ module Aws::STS
489
669
  # trusted account. That way, only someone with the ID can assume the
490
670
  # role, rather than everyone in the account. For more information about
491
671
  # the external ID, see [How to Use an External ID When Granting Access
492
- # to Your AWS Resources to a Third Party][1] in the *IAM User Guide*.
672
+ # to Your Amazon Web Services Resources to a Third Party][1] in the *IAM
673
+ # User Guide*.
493
674
  #
494
675
  # The regex used to validate this parameter is a string of characters
495
676
  # consisting of upper- and lower-case alphanumeric characters with no
@@ -516,7 +697,7 @@ module Aws::STS
516
697
  #
517
698
  # @option params [String] :token_code
518
699
  # The value provided by the MFA device, if the trust policy of the role
519
- # being assumed requires MFA (that is, if the policy includes a
700
+ # being assumed requires MFA. (In other words, if the policy includes a
520
701
  # condition that tests for MFA). If the role being assumed requires MFA
521
702
  # and if the `TokenCode` value is missing or expired, the `AssumeRole`
522
703
  # call returns an "access denied" error.
@@ -524,21 +705,62 @@ module Aws::STS
524
705
  # The format for this parameter, as described by its regex pattern, is a
525
706
  # sequence of six numeric digits.
526
707
  #
708
+ # @option params [String] :source_identity
709
+ # The source identity specified by the principal that is calling the
710
+ # `AssumeRole` operation.
711
+ #
712
+ # You can require users to specify a source identity when they assume a
713
+ # role. You do this by using the `sts:SourceIdentity` condition key in a
714
+ # role trust policy. You can use source identity information in
715
+ # CloudTrail logs to determine who took actions with a role. You can use
716
+ # the `aws:SourceIdentity` condition key to further control access to
717
+ # Amazon Web Services resources based on the value of source identity.
718
+ # For more information about using source identity, see [Monitor and
719
+ # control actions taken with assumed roles][1] in the *IAM User Guide*.
720
+ #
721
+ # The regex used to validate this parameter is a string of characters
722
+ # consisting of upper- and lower-case alphanumeric characters with no
723
+ # spaces. You can also include underscores or any of the following
724
+ # characters: =,.@-. You cannot use a value that begins with the text
725
+ # `aws:`. This prefix is reserved for Amazon Web Services internal use.
726
+ #
727
+ #
728
+ #
729
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
730
+ #
527
731
  # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
528
732
  #
529
733
  # * {Types::AssumeRoleResponse#credentials #credentials} => Types::Credentials
530
734
  # * {Types::AssumeRoleResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser
531
735
  # * {Types::AssumeRoleResponse#packed_policy_size #packed_policy_size} => Integer
736
+ # * {Types::AssumeRoleResponse#source_identity #source_identity} => String
532
737
  #
533
738
  #
534
739
  # @example Example: To assume a role
535
740
  #
536
741
  # resp = client.assume_role({
537
- # duration_seconds: 3600,
538
742
  # external_id: "123ABC",
539
743
  # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
540
744
  # role_arn: "arn:aws:iam::123456789012:role/demo",
541
- # role_session_name: "Bob",
745
+ # role_session_name: "testAssumeRoleSession",
746
+ # tags: [
747
+ # {
748
+ # key: "Project",
749
+ # value: "Unicorn",
750
+ # },
751
+ # {
752
+ # key: "Team",
753
+ # value: "Automation",
754
+ # },
755
+ # {
756
+ # key: "Cost-Center",
757
+ # value: "12345",
758
+ # },
759
+ # ],
760
+ # transitive_tag_keys: [
761
+ # "Project",
762
+ # "Cost-Center",
763
+ # ],
542
764
  # })
543
765
  #
544
766
  # resp.to_h outputs the following:
@@ -553,7 +775,7 @@ module Aws::STS
553
775
  # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
554
776
  # session_token: "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==",
555
777
  # },
556
- # packed_policy_size: 6,
778
+ # packed_policy_size: 8,
557
779
  # }
558
780
  #
559
781
  # @example Request syntax with placeholder values
@@ -568,9 +790,17 @@ module Aws::STS
568
790
  # ],
569
791
  # policy: "sessionPolicyDocumentType",
570
792
  # duration_seconds: 1,
793
+ # tags: [
794
+ # {
795
+ # key: "tagKeyType", # required
796
+ # value: "tagValueType", # required
797
+ # },
798
+ # ],
799
+ # transitive_tag_keys: ["tagKeyType"],
571
800
  # external_id: "externalIdType",
572
801
  # serial_number: "serialNumberType",
573
802
  # token_code: "tokenCodeType",
803
+ # source_identity: "sourceIdentityType",
574
804
  # })
575
805
  #
576
806
  # @example Response structure
@@ -582,6 +812,7 @@ module Aws::STS
582
812
  # resp.assumed_role_user.assumed_role_id #=> String
583
813
  # resp.assumed_role_user.arn #=> String
584
814
  # resp.packed_policy_size #=> Integer
815
+ # resp.source_identity #=> String
585
816
  #
586
817
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole AWS API Documentation
587
818
  #
@@ -595,16 +826,19 @@ module Aws::STS
595
826
  # Returns a set of temporary security credentials for users who have
596
827
  # been authenticated via a SAML authentication response. This operation
597
828
  # provides a mechanism for tying an enterprise identity store or
598
- # directory to role-based AWS access without user-specific credentials
599
- # or configuration. For a comparison of `AssumeRoleWithSAML` with the
600
- # other API operations that produce temporary credentials, see
601
- # [Requesting Temporary Security Credentials][1] and [Comparing the AWS
602
- # STS API operations][2] in the *IAM User Guide*.
829
+ # directory to role-based Amazon Web Services access without
830
+ # user-specific credentials or configuration. For a comparison of
831
+ # `AssumeRoleWithSAML` with the other API operations that produce
832
+ # temporary credentials, see [Requesting Temporary Security
833
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
834
+ # operations][2] in the *IAM User Guide*.
603
835
  #
604
836
  # The temporary security credentials returned by this operation consist
605
837
  # of an access key ID, a secret access key, and a security token.
606
838
  # Applications can use these temporary security credentials to sign
607
- # calls to AWS services.
839
+ # calls to Amazon Web Services services.
840
+ #
841
+ # **Session Duration**
608
842
  #
609
843
  # By default, the temporary security credentials created by
610
844
  # `AssumeRoleWithSAML` last for one hour. However, you can use the
@@ -622,54 +856,106 @@ module Aws::STS
622
856
  # use those operations to create a console URL. For more information,
623
857
  # see [Using IAM Roles][4] in the *IAM User Guide*.
624
858
  #
859
+ # <note markdown="1"> [Role chaining][5] limits your CLI or Amazon Web Services API role
860
+ # session to a maximum of one hour. When you use the `AssumeRole` API
861
+ # operation to assume a role, you can specify the duration of your role
862
+ # session with the `DurationSeconds` parameter. You can specify a
863
+ # parameter value of up to 43200 seconds (12 hours), depending on the
864
+ # maximum session duration setting for your role. However, if you assume
865
+ # a role using role chaining and provide a `DurationSeconds` parameter
866
+ # value greater than one hour, the operation fails.
867
+ #
868
+ # </note>
869
+ #
870
+ # **Permissions**
871
+ #
625
872
  # The temporary security credentials created by `AssumeRoleWithSAML` can
626
- # be used to make API calls to any AWS service with the following
627
- # exception: you cannot call the STS `GetFederationToken` or
873
+ # be used to make API calls to any Amazon Web Services service with the
874
+ # following exception: you cannot call the STS `GetFederationToken` or
628
875
  # `GetSessionToken` API operations.
629
876
  #
630
- # (Optional) You can pass inline or managed [session policies][5] to
877
+ # (Optional) You can pass inline or managed [session policies][6] to
631
878
  # this operation. You can pass a single JSON policy document to use as
632
879
  # an inline session policy. You can also specify up to 10 managed
633
- # policies to use as managed session policies. The plain text that you
634
- # use for both inline and managed session policies shouldn't exceed
635
- # 2048 characters. Passing policies to this operation returns new
636
- # temporary credentials. The resulting session's permissions are the
637
- # intersection of the role's identity-based policy and the session
638
- # policies. You can use the role's temporary credentials in subsequent
639
- # AWS API calls to access resources in the account that owns the role.
640
- # You cannot use session policies to grant more permissions than those
641
- # allowed by the identity-based policy of the role that is being
642
- # assumed. For more information, see [Session Policies][5] in the *IAM
880
+ # policies to use as managed session policies. The plaintext that you
881
+ # use for both inline and managed session policies can't exceed 2,048
882
+ # characters. Passing policies to this operation returns new temporary
883
+ # credentials. The resulting session's permissions are the intersection
884
+ # of the role's identity-based policy and the session policies. You can
885
+ # use the role's temporary credentials in subsequent Amazon Web
886
+ # Services API calls to access resources in the account that owns the
887
+ # role. You cannot use session policies to grant more permissions than
888
+ # those allowed by the identity-based policy of the role that is being
889
+ # assumed. For more information, see [Session Policies][6] in the *IAM
643
890
  # User Guide*.
644
891
  #
892
+ # Calling `AssumeRoleWithSAML` does not require the use of Amazon Web
893
+ # Services security credentials. The identity of the caller is validated
894
+ # by using keys in the metadata document that is uploaded for the SAML
895
+ # provider entity for your identity provider.
896
+ #
897
+ # Calling `AssumeRoleWithSAML` can result in an entry in your CloudTrail
898
+ # logs. The entry includes the value in the `NameID` element of the SAML
899
+ # assertion. We recommend that you use a `NameIDType` that is not
900
+ # associated with any personally identifiable information (PII). For
901
+ # example, you could instead use the persistent identifier
902
+ # (`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`).
903
+ #
904
+ # **Tags**
905
+ #
906
+ # (Optional) You can configure your IdP to pass attributes into your
907
+ # SAML assertion as session tags. Each session tag consists of a key
908
+ # name and an associated value. For more information about session tags,
909
+ # see [Passing Session Tags in STS][7] in the *IAM User Guide*.
910
+ #
911
+ # You can pass up to 50 session tags. The plaintext session tag keys
912
+ # can’t exceed 128 characters and the values can’t exceed 256
913
+ # characters. For these and additional limits, see [IAM and STS
914
+ # Character Limits][8] in the *IAM User Guide*.
915
+ #
916
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
917
+ # policies and session tags into a packed binary format that has a
918
+ # separate limit. Your request can fail for this limit even if your
919
+ # plaintext meets the other requirements. The `PackedPolicySize`
920
+ # response element indicates by percentage how close the policies and
921
+ # tags for your request are to the upper size limit.
922
+ #
923
+ # </note>
924
+ #
925
+ # You can pass a session tag with the same key as a tag that is attached
926
+ # to the role. When you do, session tags override the role's tags with
927
+ # the same key.
928
+ #
929
+ # An administrator must grant you the permissions necessary to pass
930
+ # session tags. The administrator can also create granular permissions
931
+ # to allow you to pass only specific session tags. For more information,
932
+ # see [Tutorial: Using Tags for Attribute-Based Access Control][9] in
933
+ # the *IAM User Guide*.
934
+ #
935
+ # You can set the session tags as transitive. Transitive tags persist
936
+ # during role chaining. For more information, see [Chaining Roles with
937
+ # Session Tags][10] in the *IAM User Guide*.
938
+ #
939
+ # **SAML Configuration**
940
+ #
645
941
  # Before your application can call `AssumeRoleWithSAML`, you must
646
942
  # configure your SAML identity provider (IdP) to issue the claims
647
- # required by AWS. Additionally, you must use AWS Identity and Access
648
- # Management (IAM) to create a SAML provider entity in your AWS account
649
- # that represents your identity provider. You must also create an IAM
650
- # role that specifies this SAML provider in its trust policy.
651
- #
652
- # Calling `AssumeRoleWithSAML` does not require the use of AWS security
653
- # credentials. The identity of the caller is validated by using keys in
654
- # the metadata document that is uploaded for the SAML provider entity
655
- # for your identity provider.
656
- #
657
- # Calling `AssumeRoleWithSAML` can result in an entry in your AWS
658
- # CloudTrail logs. The entry includes the value in the `NameID` element
659
- # of the SAML assertion. We recommend that you use a `NameIDType` that
660
- # is not associated with any personally identifiable information (PII).
661
- # For example, you could instead use the Persistent Identifier
662
- # (`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`).
943
+ # required by Amazon Web Services. Additionally, you must use Identity
944
+ # and Access Management (IAM) to create a SAML provider entity in your
945
+ # Amazon Web Services account that represents your identity provider.
946
+ # You must also create an IAM role that specifies this SAML provider in
947
+ # its trust policy.
663
948
  #
664
949
  # For more information, see the following resources:
665
950
  #
666
- # * [About SAML 2.0-based Federation][6] in the *IAM User Guide*.
951
+ # * [About SAML 2.0-based Federation][11] in the *IAM User Guide*.
667
952
  #
668
- # * [Creating SAML Identity Providers][7] in the *IAM User Guide*.
953
+ # * [Creating SAML Identity Providers][12] in the *IAM User Guide*.
669
954
  #
670
- # * [Configuring a Relying Party and Claims][8] in the *IAM User Guide*.
955
+ # * [Configuring a Relying Party and Claims][13] in the *IAM User
956
+ # Guide*.
671
957
  #
672
- # * [Creating a Role for SAML 2.0 Federation][9] in the *IAM User
958
+ # * [Creating a Role for SAML 2.0 Federation][14] in the *IAM User
673
959
  # Guide*.
674
960
  #
675
961
  #
@@ -678,11 +964,16 @@ module Aws::STS
678
964
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
679
965
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
680
966
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
681
- # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
682
- # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
683
- # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
684
- # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
685
- # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
967
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
968
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
969
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
970
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
971
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
972
+ # [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
973
+ # [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
974
+ # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
975
+ # [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
976
+ # [14]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
686
977
  #
687
978
  # @option params [required, String] :role_arn
688
979
  # The Amazon Resource Name (ARN) of the role that the caller is
@@ -693,7 +984,7 @@ module Aws::STS
693
984
  # describes the IdP.
694
985
  #
695
986
  # @option params [required, String] :saml_assertion
696
- # The base-64 encoded SAML authentication response provided by the IdP.
987
+ # The base64 encoded SAML authentication response provided by the IdP.
697
988
  #
698
989
  # For more information, see [Configuring a Relying Party and Adding
699
990
  # Claims][1] in the *IAM User Guide*.
@@ -708,33 +999,34 @@ module Aws::STS
708
999
  # the same account as the role.
709
1000
  #
710
1001
  # This parameter is optional. You can provide up to 10 managed policy
711
- # ARNs. However, the plain text that you use for both inline and managed
712
- # session policies shouldn't exceed 2048 characters. For more
713
- # information about ARNs, see [Amazon Resource Names (ARNs) and AWS
714
- # Service Namespaces](general/latest/gr/aws-arns-and-namespaces.html) in
715
- # the AWS General Reference.
716
- #
717
- # <note markdown="1"> The characters in this parameter count towards the 2048 character
718
- # session policy guideline. However, an AWS conversion compresses the
719
- # session policies into a packed binary format that has a separate
720
- # limit. This is the enforced limit. The `PackedPolicySize` response
721
- # element indicates by percentage how close the policy is to the upper
722
- # size limit.
1002
+ # ARNs. However, the plaintext that you use for both inline and managed
1003
+ # session policies can't exceed 2,048 characters. For more information
1004
+ # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
1005
+ # Service Namespaces][1] in the Amazon Web Services General Reference.
1006
+ #
1007
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1008
+ # policies and session tags into a packed binary format that has a
1009
+ # separate limit. Your request can fail for this limit even if your
1010
+ # plaintext meets the other requirements. The `PackedPolicySize`
1011
+ # response element indicates by percentage how close the policies and
1012
+ # tags for your request are to the upper size limit.
723
1013
  #
724
1014
  # </note>
725
1015
  #
726
1016
  # Passing policies to this operation returns new temporary credentials.
727
1017
  # The resulting session's permissions are the intersection of the
728
1018
  # role's identity-based policy and the session policies. You can use
729
- # the role's temporary credentials in subsequent AWS API calls to
730
- # access resources in the account that owns the role. You cannot use
731
- # session policies to grant more permissions than those allowed by the
732
- # identity-based policy of the role that is being assumed. For more
733
- # information, see [Session Policies][1] in the *IAM User Guide*.
1019
+ # the role's temporary credentials in subsequent Amazon Web Services
1020
+ # API calls to access resources in the account that owns the role. You
1021
+ # cannot use session policies to grant more permissions than those
1022
+ # allowed by the identity-based policy of the role that is being
1023
+ # assumed. For more information, see [Session Policies][2] in the *IAM
1024
+ # User Guide*.
734
1025
  #
735
1026
  #
736
1027
  #
737
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1028
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1029
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
738
1030
  #
739
1031
  # @option params [String] :policy
740
1032
  # An IAM policy in JSON format that you want to use as an inline session
@@ -744,25 +1036,25 @@ module Aws::STS
744
1036
  # new temporary credentials. The resulting session's permissions are
745
1037
  # the intersection of the role's identity-based policy and the session
746
1038
  # policies. You can use the role's temporary credentials in subsequent
747
- # AWS API calls to access resources in the account that owns the role.
748
- # You cannot use session policies to grant more permissions than those
749
- # allowed by the identity-based policy of the role that is being
750
- # assumed. For more information, see [Session Policies][1] in the *IAM
751
- # User Guide*.
752
- #
753
- # The plain text that you use for both inline and managed session
754
- # policies shouldn't exceed 2048 characters. The JSON policy characters
1039
+ # Amazon Web Services API calls to access resources in the account that
1040
+ # owns the role. You cannot use session policies to grant more
1041
+ # permissions than those allowed by the identity-based policy of the
1042
+ # role that is being assumed. For more information, see [Session
1043
+ # Policies][1] in the *IAM User Guide*.
1044
+ #
1045
+ # The plaintext that you use for both inline and managed session
1046
+ # policies can't exceed 2,048 characters. The JSON policy characters
755
1047
  # can be any ASCII character from the space character to the end of the
756
1048
  # valid character list (\\u0020 through \\u00FF). It can also include
757
1049
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
758
1050
  # characters.
759
1051
  #
760
- # <note markdown="1"> The characters in this parameter count towards the 2048 character
761
- # session policy guideline. However, an AWS conversion compresses the
762
- # session policies into a packed binary format that has a separate
763
- # limit. This is the enforced limit. The `PackedPolicySize` response
764
- # element indicates by percentage how close the policy is to the upper
765
- # size limit.
1052
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1053
+ # policies and session tags into a packed binary format that has a
1054
+ # separate limit. Your request can fail for this limit even if your
1055
+ # plaintext meets the other requirements. The `PackedPolicySize`
1056
+ # response element indicates by percentage how close the policies and
1057
+ # tags for your request are to the upper size limit.
766
1058
  #
767
1059
  # </note>
768
1060
  #
@@ -791,8 +1083,8 @@ module Aws::STS
791
1083
  # The request to the federation endpoint for a console sign-in token
792
1084
  # takes a `SessionDuration` parameter that specifies the maximum length
793
1085
  # of the console session. For more information, see [Creating a URL that
794
- # Enables Federated Users to Access the AWS Management Console][2] in
795
- # the *IAM User Guide*.
1086
+ # Enables Federated Users to Access the Amazon Web Services Management
1087
+ # Console][2] in the *IAM User Guide*.
796
1088
  #
797
1089
  # </note>
798
1090
  #
@@ -811,6 +1103,37 @@ module Aws::STS
811
1103
  # * {Types::AssumeRoleWithSAMLResponse#issuer #issuer} => String
812
1104
  # * {Types::AssumeRoleWithSAMLResponse#audience #audience} => String
813
1105
  # * {Types::AssumeRoleWithSAMLResponse#name_qualifier #name_qualifier} => String
1106
+ # * {Types::AssumeRoleWithSAMLResponse#source_identity #source_identity} => String
1107
+ #
1108
+ #
1109
+ # @example Example: To assume a role using a SAML assertion
1110
+ #
1111
+ # resp = client.assume_role_with_saml({
1112
+ # duration_seconds: 3600,
1113
+ # principal_arn: "arn:aws:iam::123456789012:saml-provider/SAML-test",
1114
+ # role_arn: "arn:aws:iam::123456789012:role/TestSaml",
1115
+ # saml_assertion: "VERYLONGENCODEDASSERTIONEXAMPLExzYW1sOkF1ZGllbmNlPmJsYW5rPC9zYW1sOkF1ZGllbmNlPjwvc2FtbDpBdWRpZW5jZVJlc3RyaWN0aW9uPjwvc2FtbDpDb25kaXRpb25zPjxzYW1sOlN1YmplY3Q+PHNhbWw6TmFtZUlEIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm5hbWVpZC1mb3JtYXQ6dHJhbnNpZW50Ij5TYW1sRXhhbXBsZTwvc2FtbDpOYW1lSUQ+PHNhbWw6U3ViamVjdENvbmZpcm1hdGlvbiBNZXRob2Q9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpjbTpiZWFyZXIiPjxzYW1sOlN1YmplY3RDb25maXJtYXRpb25EYXRhIE5vdE9uT3JBZnRlcj0iMjAxOS0xMS0wMVQyMDoyNTowNS4xNDVaIiBSZWNpcGllbnQ9Imh0dHBzOi8vc2lnbmluLmF3cy5hbWF6b24uY29tL3NhbWwiLz48L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj48L3NhbWw6U3ViamVjdD48c2FtbDpBdXRoblN0YXRlbWVudCBBdXRoPD94bWwgdmpSZXNwb25zZT4=",
1116
+ # })
1117
+ #
1118
+ # resp.to_h outputs the following:
1119
+ # {
1120
+ # assumed_role_user: {
1121
+ # arn: "arn:aws:sts::123456789012:assumed-role/TestSaml",
1122
+ # assumed_role_id: "ARO456EXAMPLE789:TestSaml",
1123
+ # },
1124
+ # audience: "https://signin.aws.amazon.com/saml",
1125
+ # credentials: {
1126
+ # access_key_id: "ASIAV3ZUEFP6EXAMPLE",
1127
+ # expiration: Time.parse("2019-11-01T20:26:47Z"),
1128
+ # secret_access_key: "8P+SQvWIuLnKhh8d++jpw0nNmQRBZvNEXAMPLEKEY",
1129
+ # session_token: "IQoJb3JpZ2luX2VjEOz////////////////////wEXAMPLEtMSJHMEUCIDoKK3JH9uGQE1z0sINr5M4jk+Na8KHDcCYRVjJCZEvOAiEA3OvJGtw1EcViOleS2vhs8VdCKFJQWPQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==",
1130
+ # },
1131
+ # issuer: "https://integ.example.com/idp/shibboleth",
1132
+ # name_qualifier: "SbdGOnUkh1i4+EXAMPLExL/jEvs=",
1133
+ # packed_policy_size: 6,
1134
+ # subject: "SamlExample",
1135
+ # subject_type: "transient",
1136
+ # }
814
1137
  #
815
1138
  # @example Request syntax with placeholder values
816
1139
  #
@@ -841,6 +1164,7 @@ module Aws::STS
841
1164
  # resp.issuer #=> String
842
1165
  # resp.audience #=> String
843
1166
  # resp.name_qualifier #=> String
1167
+ # resp.source_identity #=> String
844
1168
  #
845
1169
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML AWS API Documentation
846
1170
  #
@@ -857,33 +1181,38 @@ module Aws::STS
857
1181
  # Facebook, Google, or any OpenID Connect-compatible identity provider.
858
1182
  #
859
1183
  # <note markdown="1"> For mobile applications, we recommend that you use Amazon Cognito. You
860
- # can use Amazon Cognito with the [AWS SDK for iOS Developer Guide][1]
861
- # and the [AWS SDK for Android Developer Guide][2] to uniquely identify
862
- # a user. You can also supply the user with a consistent identity
863
- # throughout the lifetime of an application.
1184
+ # can use Amazon Cognito with the [Amazon Web Services SDK for iOS
1185
+ # Developer Guide][1] and the [Amazon Web Services SDK for Android
1186
+ # Developer Guide][2] to uniquely identify a user. You can also supply
1187
+ # the user with a consistent identity throughout the lifetime of an
1188
+ # application.
864
1189
  #
865
1190
  # To learn more about Amazon Cognito, see [Amazon Cognito Overview][3]
866
- # in *AWS SDK for Android Developer Guide* and [Amazon Cognito
867
- # Overview][4] in the *AWS SDK for iOS Developer Guide*.
1191
+ # in *Amazon Web Services SDK for Android Developer Guide* and [Amazon
1192
+ # Cognito Overview][4] in the *Amazon Web Services SDK for iOS Developer
1193
+ # Guide*.
868
1194
  #
869
1195
  # </note>
870
1196
  #
871
- # Calling `AssumeRoleWithWebIdentity` does not require the use of AWS
872
- # security credentials. Therefore, you can distribute an application
873
- # (for example, on mobile devices) that requests temporary security
874
- # credentials without including long-term AWS credentials in the
875
- # application. You also don't need to deploy server-based proxy
876
- # services that use long-term AWS credentials. Instead, the identity of
877
- # the caller is validated by using a token from the web identity
878
- # provider. For a comparison of `AssumeRoleWithWebIdentity` with the
879
- # other API operations that produce temporary credentials, see
880
- # [Requesting Temporary Security Credentials][5] and [Comparing the AWS
881
- # STS API operations][6] in the *IAM User Guide*.
1197
+ # Calling `AssumeRoleWithWebIdentity` does not require the use of Amazon
1198
+ # Web Services security credentials. Therefore, you can distribute an
1199
+ # application (for example, on mobile devices) that requests temporary
1200
+ # security credentials without including long-term Amazon Web Services
1201
+ # credentials in the application. You also don't need to deploy
1202
+ # server-based proxy services that use long-term Amazon Web Services
1203
+ # credentials. Instead, the identity of the caller is validated by using
1204
+ # a token from the web identity provider. For a comparison of
1205
+ # `AssumeRoleWithWebIdentity` with the other API operations that produce
1206
+ # temporary credentials, see [Requesting Temporary Security
1207
+ # Credentials][5] and [Comparing the Amazon Web Services STS API
1208
+ # operations][6] in the *IAM User Guide*.
882
1209
  #
883
1210
  # The temporary security credentials returned by this API consist of an
884
1211
  # access key ID, a secret access key, and a security token. Applications
885
- # can use these temporary security credentials to sign calls to AWS
886
- # service API operations.
1212
+ # can use these temporary security credentials to sign calls to Amazon
1213
+ # Web Services service API operations.
1214
+ #
1215
+ # **Session Duration**
887
1216
  #
888
1217
  # By default, the temporary security credentials created by
889
1218
  # `AssumeRoleWithWebIdentity` last for one hour. However, you can use
@@ -898,26 +1227,65 @@ module Aws::STS
898
1227
  # use those operations to create a console URL. For more information,
899
1228
  # see [Using IAM Roles][8] in the *IAM User Guide*.
900
1229
  #
1230
+ # **Permissions**
1231
+ #
901
1232
  # The temporary security credentials created by
902
- # `AssumeRoleWithWebIdentity` can be used to make API calls to any AWS
903
- # service with the following exception: you cannot call the STS
904
- # `GetFederationToken` or `GetSessionToken` API operations.
1233
+ # `AssumeRoleWithWebIdentity` can be used to make API calls to any
1234
+ # Amazon Web Services service with the following exception: you cannot
1235
+ # call the STS `GetFederationToken` or `GetSessionToken` API operations.
905
1236
  #
906
1237
  # (Optional) You can pass inline or managed [session policies][9] to
907
1238
  # this operation. You can pass a single JSON policy document to use as
908
1239
  # an inline session policy. You can also specify up to 10 managed
909
- # policies to use as managed session policies. The plain text that you
910
- # use for both inline and managed session policies shouldn't exceed
911
- # 2048 characters. Passing policies to this operation returns new
912
- # temporary credentials. The resulting session's permissions are the
913
- # intersection of the role's identity-based policy and the session
914
- # policies. You can use the role's temporary credentials in subsequent
915
- # AWS API calls to access resources in the account that owns the role.
916
- # You cannot use session policies to grant more permissions than those
917
- # allowed by the identity-based policy of the role that is being
1240
+ # policies to use as managed session policies. The plaintext that you
1241
+ # use for both inline and managed session policies can't exceed 2,048
1242
+ # characters. Passing policies to this operation returns new temporary
1243
+ # credentials. The resulting session's permissions are the intersection
1244
+ # of the role's identity-based policy and the session policies. You can
1245
+ # use the role's temporary credentials in subsequent Amazon Web
1246
+ # Services API calls to access resources in the account that owns the
1247
+ # role. You cannot use session policies to grant more permissions than
1248
+ # those allowed by the identity-based policy of the role that is being
918
1249
  # assumed. For more information, see [Session Policies][9] in the *IAM
919
1250
  # User Guide*.
920
1251
  #
1252
+ # **Tags**
1253
+ #
1254
+ # (Optional) You can configure your IdP to pass attributes into your web
1255
+ # identity token as session tags. Each session tag consists of a key
1256
+ # name and an associated value. For more information about session tags,
1257
+ # see [Passing Session Tags in STS][10] in the *IAM User Guide*.
1258
+ #
1259
+ # You can pass up to 50 session tags. The plaintext session tag keys
1260
+ # can’t exceed 128 characters and the values can’t exceed 256
1261
+ # characters. For these and additional limits, see [IAM and STS
1262
+ # Character Limits][11] in the *IAM User Guide*.
1263
+ #
1264
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1265
+ # policies and session tags into a packed binary format that has a
1266
+ # separate limit. Your request can fail for this limit even if your
1267
+ # plaintext meets the other requirements. The `PackedPolicySize`
1268
+ # response element indicates by percentage how close the policies and
1269
+ # tags for your request are to the upper size limit.
1270
+ #
1271
+ # </note>
1272
+ #
1273
+ # You can pass a session tag with the same key as a tag that is attached
1274
+ # to the role. When you do, the session tag overrides the role tag with
1275
+ # the same key.
1276
+ #
1277
+ # An administrator must grant you the permissions necessary to pass
1278
+ # session tags. The administrator can also create granular permissions
1279
+ # to allow you to pass only specific session tags. For more information,
1280
+ # see [Tutorial: Using Tags for Attribute-Based Access Control][12] in
1281
+ # the *IAM User Guide*.
1282
+ #
1283
+ # You can set the session tags as transitive. Transitive tags persist
1284
+ # during role chaining. For more information, see [Chaining Roles with
1285
+ # Session Tags][13] in the *IAM User Guide*.
1286
+ #
1287
+ # **Identities**
1288
+ #
921
1289
  # Before your application can call `AssumeRoleWithWebIdentity`, you must
922
1290
  # have an identity token from a supported identity provider and create a
923
1291
  # role that the application can assume. The role that your application
@@ -925,31 +1293,31 @@ module Aws::STS
925
1293
  # identity token. In other words, the identity provider must be
926
1294
  # specified in the role's trust policy.
927
1295
  #
928
- # Calling `AssumeRoleWithWebIdentity` can result in an entry in your AWS
929
- # CloudTrail logs. The entry includes the [Subject][10] of the provided
930
- # Web Identity Token. We recommend that you avoid using any personally
1296
+ # Calling `AssumeRoleWithWebIdentity` can result in an entry in your
1297
+ # CloudTrail logs. The entry includes the [Subject][14] of the provided
1298
+ # web identity token. We recommend that you avoid using any personally
931
1299
  # identifiable information (PII) in this field. For example, you could
932
1300
  # instead use a GUID or a pairwise identifier, as [suggested in the OIDC
933
- # specification][11].
1301
+ # specification][15].
934
1302
  #
935
1303
  # For more information about how to use web identity federation and the
936
1304
  # `AssumeRoleWithWebIdentity` API, see the following resources:
937
1305
  #
938
- # * [Using Web Identity Federation API Operations for Mobile Apps][12]
939
- # and [Federation Through a Web-based Identity Provider][13].
1306
+ # * [Using Web Identity Federation API Operations for Mobile Apps][16]
1307
+ # and [Federation Through a Web-based Identity Provider][17].
940
1308
  #
941
- # * [ Web Identity Federation Playground][14]. Walk through the process
1309
+ # * [ Web Identity Federation Playground][18]. Walk through the process
942
1310
  # of authenticating through Login with Amazon, Facebook, or Google,
943
1311
  # getting temporary security credentials, and then using those
944
- # credentials to make a request to AWS.
1312
+ # credentials to make a request to Amazon Web Services.
945
1313
  #
946
- # * [AWS SDK for iOS Developer Guide][1] and [AWS SDK for Android
947
- # Developer Guide][2]. These toolkits contain sample apps that show
948
- # how to invoke the identity providers, and then how to use the
949
- # information from these providers to get and use temporary security
950
- # credentials.
1314
+ # * [Amazon Web Services SDK for iOS Developer Guide][1] and [Amazon Web
1315
+ # Services SDK for Android Developer Guide][2]. These toolkits contain
1316
+ # sample apps that show how to invoke the identity providers. The
1317
+ # toolkits then show how to use the information from these providers
1318
+ # to get and use temporary security credentials.
951
1319
  #
952
- # * [Web Identity Federation with Mobile Applications][15]. This article
1320
+ # * [Web Identity Federation with Mobile Applications][19]. This article
953
1321
  # discusses web identity federation and shows an example of how to use
954
1322
  # web identity federation to get access to content in Amazon S3.
955
1323
  #
@@ -964,12 +1332,16 @@ module Aws::STS
964
1332
  # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
965
1333
  # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
966
1334
  # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
967
- # [10]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
968
- # [11]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
969
- # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
970
- # [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
971
- # [14]: https://web-identity-federation-playground.s3.amazonaws.com/index.html
972
- # [15]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
1335
+ # [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
1336
+ # [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
1337
+ # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
1338
+ # [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
1339
+ # [14]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
1340
+ # [15]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
1341
+ # [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
1342
+ # [17]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1343
+ # [18]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
1344
+ # [19]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
973
1345
  #
974
1346
  # @option params [required, String] :role_arn
975
1347
  # The Amazon Resource Name (ARN) of the role that the caller is
@@ -1012,33 +1384,34 @@ module Aws::STS
1012
1384
  # the same account as the role.
1013
1385
  #
1014
1386
  # This parameter is optional. You can provide up to 10 managed policy
1015
- # ARNs. However, the plain text that you use for both inline and managed
1016
- # session policies shouldn't exceed 2048 characters. For more
1017
- # information about ARNs, see [Amazon Resource Names (ARNs) and AWS
1018
- # Service Namespaces](general/latest/gr/aws-arns-and-namespaces.html) in
1019
- # the AWS General Reference.
1020
- #
1021
- # <note markdown="1"> The characters in this parameter count towards the 2048 character
1022
- # session policy guideline. However, an AWS conversion compresses the
1023
- # session policies into a packed binary format that has a separate
1024
- # limit. This is the enforced limit. The `PackedPolicySize` response
1025
- # element indicates by percentage how close the policy is to the upper
1026
- # size limit.
1387
+ # ARNs. However, the plaintext that you use for both inline and managed
1388
+ # session policies can't exceed 2,048 characters. For more information
1389
+ # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
1390
+ # Service Namespaces][1] in the Amazon Web Services General Reference.
1391
+ #
1392
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1393
+ # policies and session tags into a packed binary format that has a
1394
+ # separate limit. Your request can fail for this limit even if your
1395
+ # plaintext meets the other requirements. The `PackedPolicySize`
1396
+ # response element indicates by percentage how close the policies and
1397
+ # tags for your request are to the upper size limit.
1027
1398
  #
1028
1399
  # </note>
1029
1400
  #
1030
1401
  # Passing policies to this operation returns new temporary credentials.
1031
1402
  # The resulting session's permissions are the intersection of the
1032
1403
  # role's identity-based policy and the session policies. You can use
1033
- # the role's temporary credentials in subsequent AWS API calls to
1034
- # access resources in the account that owns the role. You cannot use
1035
- # session policies to grant more permissions than those allowed by the
1036
- # identity-based policy of the role that is being assumed. For more
1037
- # information, see [Session Policies][1] in the *IAM User Guide*.
1404
+ # the role's temporary credentials in subsequent Amazon Web Services
1405
+ # API calls to access resources in the account that owns the role. You
1406
+ # cannot use session policies to grant more permissions than those
1407
+ # allowed by the identity-based policy of the role that is being
1408
+ # assumed. For more information, see [Session Policies][2] in the *IAM
1409
+ # User Guide*.
1038
1410
  #
1039
1411
  #
1040
1412
  #
1041
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1413
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1414
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1042
1415
  #
1043
1416
  # @option params [String] :policy
1044
1417
  # An IAM policy in JSON format that you want to use as an inline session
@@ -1048,25 +1421,25 @@ module Aws::STS
1048
1421
  # new temporary credentials. The resulting session's permissions are
1049
1422
  # the intersection of the role's identity-based policy and the session
1050
1423
  # policies. You can use the role's temporary credentials in subsequent
1051
- # AWS API calls to access resources in the account that owns the role.
1052
- # You cannot use session policies to grant more permissions than those
1053
- # allowed by the identity-based policy of the role that is being
1054
- # assumed. For more information, see [Session Policies][1] in the *IAM
1055
- # User Guide*.
1056
- #
1057
- # The plain text that you use for both inline and managed session
1058
- # policies shouldn't exceed 2048 characters. The JSON policy characters
1424
+ # Amazon Web Services API calls to access resources in the account that
1425
+ # owns the role. You cannot use session policies to grant more
1426
+ # permissions than those allowed by the identity-based policy of the
1427
+ # role that is being assumed. For more information, see [Session
1428
+ # Policies][1] in the *IAM User Guide*.
1429
+ #
1430
+ # The plaintext that you use for both inline and managed session
1431
+ # policies can't exceed 2,048 characters. The JSON policy characters
1059
1432
  # can be any ASCII character from the space character to the end of the
1060
1433
  # valid character list (\\u0020 through \\u00FF). It can also include
1061
1434
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1062
1435
  # characters.
1063
1436
  #
1064
- # <note markdown="1"> The characters in this parameter count towards the 2048 character
1065
- # session policy guideline. However, an AWS conversion compresses the
1066
- # session policies into a packed binary format that has a separate
1067
- # limit. This is the enforced limit. The `PackedPolicySize` response
1068
- # element indicates by percentage how close the policy is to the upper
1069
- # size limit.
1437
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1438
+ # policies and session tags into a packed binary format that has a
1439
+ # separate limit. Your request can fail for this limit even if your
1440
+ # plaintext meets the other requirements. The `PackedPolicySize`
1441
+ # response element indicates by percentage how close the policies and
1442
+ # tags for your request are to the upper size limit.
1070
1443
  #
1071
1444
  # </note>
1072
1445
  #
@@ -1092,8 +1465,8 @@ module Aws::STS
1092
1465
  # The request to the federation endpoint for a console sign-in token
1093
1466
  # takes a `SessionDuration` parameter that specifies the maximum length
1094
1467
  # of the console session. For more information, see [Creating a URL that
1095
- # Enables Federated Users to Access the AWS Management Console][2] in
1096
- # the *IAM User Guide*.
1468
+ # Enables Federated Users to Access the Amazon Web Services Management
1469
+ # Console][2] in the *IAM User Guide*.
1097
1470
  #
1098
1471
  # </note>
1099
1472
  #
@@ -1110,6 +1483,7 @@ module Aws::STS
1110
1483
  # * {Types::AssumeRoleWithWebIdentityResponse#packed_policy_size #packed_policy_size} => Integer
1111
1484
  # * {Types::AssumeRoleWithWebIdentityResponse#provider #provider} => String
1112
1485
  # * {Types::AssumeRoleWithWebIdentityResponse#audience #audience} => String
1486
+ # * {Types::AssumeRoleWithWebIdentityResponse#source_identity #source_identity} => String
1113
1487
  #
1114
1488
  #
1115
1489
  # @example Example: To assume a role as an OpenID Connect-federated user
@@ -1169,6 +1543,7 @@ module Aws::STS
1169
1543
  # resp.packed_policy_size #=> Integer
1170
1544
  # resp.provider #=> String
1171
1545
  # resp.audience #=> String
1546
+ # resp.source_identity #=> String
1172
1547
  #
1173
1548
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity AWS API Documentation
1174
1549
  #
@@ -1180,34 +1555,34 @@ module Aws::STS
1180
1555
  end
1181
1556
 
1182
1557
  # Decodes additional information about the authorization status of a
1183
- # request from an encoded message returned in response to an AWS
1184
- # request.
1558
+ # request from an encoded message returned in response to an Amazon Web
1559
+ # Services request.
1185
1560
  #
1186
1561
  # For example, if a user is not authorized to perform an operation that
1187
1562
  # he or she has requested, the request returns a
1188
1563
  # `Client.UnauthorizedOperation` response (an HTTP 403 response). Some
1189
- # AWS operations additionally return an encoded message that can provide
1190
- # details about this authorization failure.
1564
+ # Amazon Web Services operations additionally return an encoded message
1565
+ # that can provide details about this authorization failure.
1191
1566
  #
1192
- # <note markdown="1"> Only certain AWS operations return an encoded authorization message.
1193
- # The documentation for an individual operation indicates whether that
1194
- # operation returns an encoded message in addition to returning an HTTP
1195
- # code.
1567
+ # <note markdown="1"> Only certain Amazon Web Services operations return an encoded
1568
+ # authorization message. The documentation for an individual operation
1569
+ # indicates whether that operation returns an encoded message in
1570
+ # addition to returning an HTTP code.
1196
1571
  #
1197
1572
  # </note>
1198
1573
  #
1199
1574
  # The message is encoded because the details of the authorization status
1200
- # can constitute privileged information that the user who requested the
1575
+ # can contain privileged information that the user who requested the
1201
1576
  # operation should not see. To decode an authorization status message, a
1202
- # user must be granted permissions via an IAM policy to request the
1203
- # `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
1577
+ # user must be granted permissions through an IAM [policy][1] to request
1578
+ # the `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
1204
1579
  # action.
1205
1580
  #
1206
1581
  # The decoded message includes the following type of information:
1207
1582
  #
1208
1583
  # * Whether the request was denied due to an explicit deny or due to the
1209
1584
  # absence of an explicit allow. For more information, see [Determining
1210
- # Whether a Request is Allowed or Denied][1] in the *IAM User Guide*.
1585
+ # Whether a Request is Allowed or Denied][2] in the *IAM User Guide*.
1211
1586
  #
1212
1587
  # * The principal who made the request.
1213
1588
  #
@@ -1219,7 +1594,8 @@ module Aws::STS
1219
1594
  #
1220
1595
  #
1221
1596
  #
1222
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
1597
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
1598
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
1223
1599
  #
1224
1600
  # @option params [required, String] :encoded_message
1225
1601
  # The encoded message that was returned with the response.
@@ -1259,8 +1635,83 @@ module Aws::STS
1259
1635
  req.send_request(options)
1260
1636
  end
1261
1637
 
1262
- # Returns details about the IAM identity whose credentials are used to
1263
- # call the API.
1638
+ # Returns the account identifier for the specified access key ID.
1639
+ #
1640
+ # Access keys consist of two parts: an access key ID (for example,
1641
+ # `AKIAIOSFODNN7EXAMPLE`) and a secret access key (for example,
1642
+ # `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`). For more information
1643
+ # about access keys, see [Managing Access Keys for IAM Users][1] in the
1644
+ # *IAM User Guide*.
1645
+ #
1646
+ # When you pass an access key ID to this operation, it returns the ID of
1647
+ # the Amazon Web Services account to which the keys belong. Access key
1648
+ # IDs beginning with `AKIA` are long-term credentials for an IAM user or
1649
+ # the Amazon Web Services account root user. Access key IDs beginning
1650
+ # with `ASIA` are temporary credentials that are created using STS
1651
+ # operations. If the account in the response belongs to you, you can
1652
+ # sign in as the root user and review your root user access keys. Then,
1653
+ # you can pull a [credentials report][2] to learn which IAM user owns
1654
+ # the keys. To learn who requested the temporary credentials for an
1655
+ # `ASIA` access key, view the STS events in your [CloudTrail logs][3] in
1656
+ # the *IAM User Guide*.
1657
+ #
1658
+ # This operation does not indicate the state of the access key. The key
1659
+ # might be active, inactive, or deleted. Active keys might not have
1660
+ # permissions to perform an operation. Providing a deleted access key
1661
+ # might return an error that the key doesn't exist.
1662
+ #
1663
+ #
1664
+ #
1665
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
1666
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html
1667
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html
1668
+ #
1669
+ # @option params [required, String] :access_key_id
1670
+ # The identifier of an access key.
1671
+ #
1672
+ # This parameter allows (through its regex pattern) a string of
1673
+ # characters that can consist of any upper- or lowercase letter or
1674
+ # digit.
1675
+ #
1676
+ # @return [Types::GetAccessKeyInfoResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1677
+ #
1678
+ # * {Types::GetAccessKeyInfoResponse#account #account} => String
1679
+ #
1680
+ # @example Request syntax with placeholder values
1681
+ #
1682
+ # resp = client.get_access_key_info({
1683
+ # access_key_id: "accessKeyIdType", # required
1684
+ # })
1685
+ #
1686
+ # @example Response structure
1687
+ #
1688
+ # resp.account #=> String
1689
+ #
1690
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo AWS API Documentation
1691
+ #
1692
+ # @overload get_access_key_info(params = {})
1693
+ # @param [Hash] params ({})
1694
+ def get_access_key_info(params = {}, options = {})
1695
+ req = build_request(:get_access_key_info, params)
1696
+ req.send_request(options)
1697
+ end
1698
+
1699
+ # Returns details about the IAM user or role whose credentials are used
1700
+ # to call the operation.
1701
+ #
1702
+ # <note markdown="1"> No permissions are required to perform this operation. If an
1703
+ # administrator adds a policy to your IAM user or role that explicitly
1704
+ # denies access to the `sts:GetCallerIdentity` action, you can still
1705
+ # perform this operation. Permissions are not required because the same
1706
+ # information is returned when an IAM user or role is denied access. To
1707
+ # view an example response, see [I Am Not Authorized to Perform:
1708
+ # iam:DeleteVirtualMFADevice][1] in the *IAM User Guide*.
1709
+ #
1710
+ # </note>
1711
+ #
1712
+ #
1713
+ #
1714
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa
1264
1715
  #
1265
1716
  # @return [Types::GetCallerIdentityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1266
1717
  #
@@ -1339,55 +1790,55 @@ module Aws::STS
1339
1790
  # can be safely stored, usually in a server-based application. For a
1340
1791
  # comparison of `GetFederationToken` with the other API operations that
1341
1792
  # produce temporary credentials, see [Requesting Temporary Security
1342
- # Credentials][1] and [Comparing the AWS STS API operations][2] in the
1343
- # *IAM User Guide*.
1793
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
1794
+ # operations][2] in the *IAM User Guide*.
1344
1795
  #
1345
1796
  # <note markdown="1"> You can create a mobile-based or browser-based app that can
1346
1797
  # authenticate users using a web identity provider like Login with
1347
1798
  # Amazon, Facebook, Google, or an OpenID Connect-compatible identity
1348
1799
  # provider. In this case, we recommend that you use [Amazon Cognito][3]
1349
1800
  # or `AssumeRoleWithWebIdentity`. For more information, see [Federation
1350
- # Through a Web-based Identity Provider][4].
1801
+ # Through a Web-based Identity Provider][4] in the *IAM User Guide*.
1351
1802
  #
1352
1803
  # </note>
1353
1804
  #
1354
1805
  # You can also call `GetFederationToken` using the security credentials
1355
- # of an AWS account root user, but we do not recommend it. Instead, we
1356
- # recommend that you create an IAM user for the purpose of the proxy
1357
- # application. Then attach a policy to the IAM user that limits
1358
- # federated users to only the actions and resources that they need to
1359
- # access. For more information, see [IAM Best Practices][5] in the *IAM
1360
- # User Guide*.
1806
+ # of an Amazon Web Services account root user, but we do not recommend
1807
+ # it. Instead, we recommend that you create an IAM user for the purpose
1808
+ # of the proxy application. Then attach a policy to the IAM user that
1809
+ # limits federated users to only the actions and resources that they
1810
+ # need to access. For more information, see [IAM Best Practices][5] in
1811
+ # the *IAM User Guide*.
1812
+ #
1813
+ # **Session duration**
1361
1814
  #
1362
1815
  # The temporary credentials are valid for the specified duration, from
1363
1816
  # 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
1364
- # hours). The default is 43,200 seconds (12 hours). Temporary
1365
- # credentials that are obtained by using AWS account root user
1366
- # credentials have a maximum duration of 3,600 seconds (1 hour).
1817
+ # hours). The default session duration is 43,200 seconds (12 hours).
1818
+ # Temporary credentials obtained by using the Amazon Web Services
1819
+ # account root user credentials have a maximum duration of 3,600 seconds
1820
+ # (1 hour).
1367
1821
  #
1368
- # The temporary security credentials created by `GetFederationToken` can
1369
- # be used to make API calls to any AWS service with the following
1370
- # exceptions:
1822
+ # **Permissions**
1371
1823
  #
1372
- # * You cannot use these credentials to call any IAM API operations.
1824
+ # You can use the temporary credentials created by `GetFederationToken`
1825
+ # in any Amazon Web Services service except the following:
1373
1826
  #
1374
- # * You cannot call any STS API operations except `GetCallerIdentity`.
1827
+ # * You cannot call any IAM operations using the CLI or the Amazon Web
1828
+ # Services API.
1375
1829
  #
1376
- # **Permissions**
1830
+ # * You cannot call any STS operations except `GetCallerIdentity`.
1377
1831
  #
1378
1832
  # You must pass an inline or managed [session policy][6] to this
1379
1833
  # operation. You can pass a single JSON policy document to use as an
1380
1834
  # inline session policy. You can also specify up to 10 managed policies
1381
- # to use as managed session policies. The plain text that you use for
1382
- # both inline and managed session policies shouldn't exceed 2048
1835
+ # to use as managed session policies. The plaintext that you use for
1836
+ # both inline and managed session policies can't exceed 2,048
1383
1837
  # characters.
1384
1838
  #
1385
1839
  # Though the session policy parameters are optional, if you do not pass
1386
1840
  # a policy, then the resulting federated user session has no
1387
- # permissions. The only exception is when the credentials are used to
1388
- # access a resource that has a resource-based policy that specifically
1389
- # references the federated user session in the `Principal` element of
1390
- # the policy. When you pass session policies, the session permissions
1841
+ # permissions. When you pass session policies, the session permissions
1391
1842
  # are the intersection of the IAM user policies and the session policies
1392
1843
  # that you pass. This gives you a way to further restrict the
1393
1844
  # permissions for a federated user. You cannot use session policies to
@@ -1397,6 +1848,42 @@ module Aws::STS
1397
1848
  # `GetFederationToken` to create temporary security credentials, see
1398
1849
  # [GetFederationToken—Federation Through a Custom Identity Broker][7].
1399
1850
  #
1851
+ # You can use the credentials to access a resource that has a
1852
+ # resource-based policy. If that policy specifically references the
1853
+ # federated user session in the `Principal` element of the policy, the
1854
+ # session has the permissions allowed by the policy. These permissions
1855
+ # are granted in addition to the permissions granted by the session
1856
+ # policies.
1857
+ #
1858
+ # **Tags**
1859
+ #
1860
+ # (Optional) You can pass tag key-value pairs to your session. These are
1861
+ # called session tags. For more information about session tags, see
1862
+ # [Passing Session Tags in STS][8] in the *IAM User Guide*.
1863
+ #
1864
+ # <note markdown="1"> You can create a mobile-based or browser-based app that can
1865
+ # authenticate users using a web identity provider like Login with
1866
+ # Amazon, Facebook, Google, or an OpenID Connect-compatible identity
1867
+ # provider. In this case, we recommend that you use [Amazon Cognito][3]
1868
+ # or `AssumeRoleWithWebIdentity`. For more information, see [Federation
1869
+ # Through a Web-based Identity Provider][4] in the *IAM User Guide*.
1870
+ #
1871
+ # </note>
1872
+ #
1873
+ # An administrator must grant you the permissions necessary to pass
1874
+ # session tags. The administrator can also create granular permissions
1875
+ # to allow you to pass only specific session tags. For more information,
1876
+ # see [Tutorial: Using Tags for Attribute-Based Access Control][9] in
1877
+ # the *IAM User Guide*.
1878
+ #
1879
+ # Tag key–value pairs are not case sensitive, but case is preserved.
1880
+ # This means that you cannot have separate `Department` and `department`
1881
+ # tag keys. Assume that the user that you are federating has the
1882
+ # `Department`=`Marketing` tag and you pass the
1883
+ # `department`=`engineering` session tag. `Department` and `department`
1884
+ # are not saved as separate tags, and the session tag passed in the
1885
+ # request takes precedence over the user tag.
1886
+ #
1400
1887
  #
1401
1888
  #
1402
1889
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
@@ -1406,6 +1893,8 @@ module Aws::STS
1406
1893
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
1407
1894
  # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1408
1895
  # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
1896
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
1897
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
1409
1898
  #
1410
1899
  # @option params [required, String] :name
1411
1900
  # The name of the federated user. The name is used as an identifier for
@@ -1429,10 +1918,7 @@ module Aws::STS
1429
1918
  #
1430
1919
  # This parameter is optional. However, if you do not pass any session
1431
1920
  # policies, then the resulting federated user session has no
1432
- # permissions. The only exception is when the credentials are used to
1433
- # access a resource that has a resource-based policy that specifically
1434
- # references the federated user session in the `Principal` element of
1435
- # the policy.
1921
+ # permissions.
1436
1922
  #
1437
1923
  # When you pass session policies, the session permissions are the
1438
1924
  # intersection of the IAM user policies and the session policies that
@@ -1442,19 +1928,26 @@ module Aws::STS
1442
1928
  # the IAM user. For more information, see [Session Policies][1] in the
1443
1929
  # *IAM User Guide*.
1444
1930
  #
1445
- # The plain text that you use for both inline and managed session
1446
- # policies shouldn't exceed 2048 characters. The JSON policy characters
1931
+ # The resulting credentials can be used to access a resource that has a
1932
+ # resource-based policy. If that policy specifically references the
1933
+ # federated user session in the `Principal` element of the policy, the
1934
+ # session has the permissions allowed by the policy. These permissions
1935
+ # are granted in addition to the permissions that are granted by the
1936
+ # session policies.
1937
+ #
1938
+ # The plaintext that you use for both inline and managed session
1939
+ # policies can't exceed 2,048 characters. The JSON policy characters
1447
1940
  # can be any ASCII character from the space character to the end of the
1448
1941
  # valid character list (\\u0020 through \\u00FF). It can also include
1449
1942
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1450
1943
  # characters.
1451
1944
  #
1452
- # <note markdown="1"> The characters in this parameter count towards the 2048 character
1453
- # session policy guideline. However, an AWS conversion compresses the
1454
- # session policies into a packed binary format that has a separate
1455
- # limit. This is the enforced limit. The `PackedPolicySize` response
1456
- # element indicates by percentage how close the policy is to the upper
1457
- # size limit.
1945
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1946
+ # policies and session tags into a packed binary format that has a
1947
+ # separate limit. Your request can fail for this limit even if your
1948
+ # plaintext meets the other requirements. The `PackedPolicySize`
1949
+ # response element indicates by percentage how close the policies and
1950
+ # tags for your request are to the upper size limit.
1458
1951
  #
1459
1952
  # </note>
1460
1953
  #
@@ -1470,19 +1963,16 @@ module Aws::STS
1470
1963
  # You must pass an inline or managed [session policy][1] to this
1471
1964
  # operation. You can pass a single JSON policy document to use as an
1472
1965
  # inline session policy. You can also specify up to 10 managed policies
1473
- # to use as managed session policies. The plain text that you use for
1474
- # both inline and managed session policies shouldn't exceed 2048
1966
+ # to use as managed session policies. The plaintext that you use for
1967
+ # both inline and managed session policies can't exceed 2,048
1475
1968
  # characters. You can provide up to 10 managed policy ARNs. For more
1476
- # information about ARNs, see [Amazon Resource Names (ARNs) and AWS
1477
- # Service Namespaces](general/latest/gr/aws-arns-and-namespaces.html) in
1478
- # the AWS General Reference.
1969
+ # information about ARNs, see [Amazon Resource Names (ARNs) and Amazon
1970
+ # Web Services Service Namespaces][2] in the Amazon Web Services General
1971
+ # Reference.
1479
1972
  #
1480
1973
  # This parameter is optional. However, if you do not pass any session
1481
1974
  # policies, then the resulting federated user session has no
1482
- # permissions. The only exception is when the credentials are used to
1483
- # access a resource that has a resource-based policy that specifically
1484
- # references the federated user session in the `Principal` element of
1485
- # the policy.
1975
+ # permissions.
1486
1976
  #
1487
1977
  # When you pass session policies, the session permissions are the
1488
1978
  # intersection of the IAM user policies and the session policies that
@@ -1492,27 +1982,70 @@ module Aws::STS
1492
1982
  # the IAM user. For more information, see [Session Policies][1] in the
1493
1983
  # *IAM User Guide*.
1494
1984
  #
1495
- # <note markdown="1"> The characters in this parameter count towards the 2048 character
1496
- # session policy guideline. However, an AWS conversion compresses the
1497
- # session policies into a packed binary format that has a separate
1498
- # limit. This is the enforced limit. The `PackedPolicySize` response
1499
- # element indicates by percentage how close the policy is to the upper
1500
- # size limit.
1985
+ # The resulting credentials can be used to access a resource that has a
1986
+ # resource-based policy. If that policy specifically references the
1987
+ # federated user session in the `Principal` element of the policy, the
1988
+ # session has the permissions allowed by the policy. These permissions
1989
+ # are granted in addition to the permissions that are granted by the
1990
+ # session policies.
1991
+ #
1992
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1993
+ # policies and session tags into a packed binary format that has a
1994
+ # separate limit. Your request can fail for this limit even if your
1995
+ # plaintext meets the other requirements. The `PackedPolicySize`
1996
+ # response element indicates by percentage how close the policies and
1997
+ # tags for your request are to the upper size limit.
1501
1998
  #
1502
1999
  # </note>
1503
2000
  #
1504
2001
  #
1505
2002
  #
1506
2003
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
2004
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1507
2005
  #
1508
2006
  # @option params [Integer] :duration_seconds
1509
2007
  # The duration, in seconds, that the session should last. Acceptable
1510
2008
  # durations for federation sessions range from 900 seconds (15 minutes)
1511
2009
  # to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
1512
- # default. Sessions obtained using AWS account root user credentials are
1513
- # restricted to a maximum of 3,600 seconds (one hour). If the specified
1514
- # duration is longer than one hour, the session obtained by using root
1515
- # user credentials defaults to one hour.
2010
+ # default. Sessions obtained using Amazon Web Services account root user
2011
+ # credentials are restricted to a maximum of 3,600 seconds (one hour).
2012
+ # If the specified duration is longer than one hour, the session
2013
+ # obtained by using root user credentials defaults to one hour.
2014
+ #
2015
+ # @option params [Array<Types::Tag>] :tags
2016
+ # A list of session tags. Each session tag consists of a key name and an
2017
+ # associated value. For more information about session tags, see
2018
+ # [Passing Session Tags in STS][1] in the *IAM User Guide*.
2019
+ #
2020
+ # This parameter is optional. You can pass up to 50 session tags. The
2021
+ # plaintext session tag keys can’t exceed 128 characters and the values
2022
+ # can’t exceed 256 characters. For these and additional limits, see [IAM
2023
+ # and STS Character Limits][2] in the *IAM User Guide*.
2024
+ #
2025
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
2026
+ # policies and session tags into a packed binary format that has a
2027
+ # separate limit. Your request can fail for this limit even if your
2028
+ # plaintext meets the other requirements. The `PackedPolicySize`
2029
+ # response element indicates by percentage how close the policies and
2030
+ # tags for your request are to the upper size limit.
2031
+ #
2032
+ # </note>
2033
+ #
2034
+ # You can pass a session tag with the same key as a tag that is already
2035
+ # attached to the user you are federating. When you do, session tags
2036
+ # override a user tag with the same key.
2037
+ #
2038
+ # Tag key–value pairs are not case sensitive, but case is preserved.
2039
+ # This means that you cannot have separate `Department` and `department`
2040
+ # tag keys. Assume that the role has the `Department`=`Marketing` tag
2041
+ # and you pass the `department`=`engineering` session tag. `Department`
2042
+ # and `department` are not saved as separate tags, and the session tag
2043
+ # passed in the request takes precedence over the role tag.
2044
+ #
2045
+ #
2046
+ #
2047
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
2048
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
1516
2049
  #
1517
2050
  # @return [Types::GetFederationTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1518
2051
  #
@@ -1525,8 +2058,18 @@ module Aws::STS
1525
2058
  #
1526
2059
  # resp = client.get_federation_token({
1527
2060
  # duration_seconds: 3600,
1528
- # name: "Bob",
2061
+ # name: "testFedUserSession",
1529
2062
  # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
2063
+ # tags: [
2064
+ # {
2065
+ # key: "Project",
2066
+ # value: "Pegasus",
2067
+ # },
2068
+ # {
2069
+ # key: "Cost-Center",
2070
+ # value: "98765",
2071
+ # },
2072
+ # ],
1530
2073
  # })
1531
2074
  #
1532
2075
  # resp.to_h outputs the following:
@@ -1541,7 +2084,7 @@ module Aws::STS
1541
2084
  # arn: "arn:aws:sts::123456789012:federated-user/Bob",
1542
2085
  # federated_user_id: "123456789012:Bob",
1543
2086
  # },
1544
- # packed_policy_size: 6,
2087
+ # packed_policy_size: 8,
1545
2088
  # }
1546
2089
  #
1547
2090
  # @example Request syntax with placeholder values
@@ -1555,6 +2098,12 @@ module Aws::STS
1555
2098
  # },
1556
2099
  # ],
1557
2100
  # duration_seconds: 1,
2101
+ # tags: [
2102
+ # {
2103
+ # key: "tagKeyType", # required
2104
+ # value: "tagValueType", # required
2105
+ # },
2106
+ # ],
1558
2107
  # })
1559
2108
  #
1560
2109
  # @example Response structure
@@ -1576,33 +2125,38 @@ module Aws::STS
1576
2125
  req.send_request(options)
1577
2126
  end
1578
2127
 
1579
- # Returns a set of temporary credentials for an AWS account or IAM user.
1580
- # The credentials consist of an access key ID, a secret access key, and
1581
- # a security token. Typically, you use `GetSessionToken` if you want to
1582
- # use MFA to protect programmatic calls to specific AWS API operations
1583
- # like Amazon EC2 `StopInstances`. MFA-enabled IAM users would need to
1584
- # call `GetSessionToken` and submit an MFA code that is associated with
1585
- # their MFA device. Using the temporary security credentials that are
1586
- # returned from the call, IAM users can then make programmatic calls to
1587
- # API operations that require MFA authentication. If you do not supply a
2128
+ # Returns a set of temporary credentials for an Amazon Web Services
2129
+ # account or IAM user. The credentials consist of an access key ID, a
2130
+ # secret access key, and a security token. Typically, you use
2131
+ # `GetSessionToken` if you want to use MFA to protect programmatic calls
2132
+ # to specific Amazon Web Services API operations like Amazon EC2
2133
+ # `StopInstances`. MFA-enabled IAM users would need to call
2134
+ # `GetSessionToken` and submit an MFA code that is associated with their
2135
+ # MFA device. Using the temporary security credentials that are returned
2136
+ # from the call, IAM users can then make programmatic calls to API
2137
+ # operations that require MFA authentication. If you do not supply a
1588
2138
  # correct MFA code, then the API returns an access denied error. For a
1589
2139
  # comparison of `GetSessionToken` with the other API operations that
1590
2140
  # produce temporary credentials, see [Requesting Temporary Security
1591
- # Credentials][1] and [Comparing the AWS STS API operations][2] in the
1592
- # *IAM User Guide*.
2141
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
2142
+ # operations][2] in the *IAM User Guide*.
2143
+ #
2144
+ # **Session Duration**
1593
2145
  #
1594
2146
  # The `GetSessionToken` operation must be called by using the long-term
1595
- # AWS security credentials of the AWS account root user or an IAM user.
1596
- # Credentials that are created by IAM users are valid for the duration
1597
- # that you specify. This duration can range from 900 seconds (15
1598
- # minutes) up to a maximum of 129,600 seconds (36 hours), with a default
1599
- # of 43,200 seconds (12 hours). Credentials based on account credentials
1600
- # can range from 900 seconds (15 minutes) up to 3,600 seconds (1 hour),
1601
- # with a default of 1 hour.
2147
+ # Amazon Web Services security credentials of the Amazon Web Services
2148
+ # account root user or an IAM user. Credentials that are created by IAM
2149
+ # users are valid for the duration that you specify. This duration can
2150
+ # range from 900 seconds (15 minutes) up to a maximum of 129,600 seconds
2151
+ # (36 hours), with a default of 43,200 seconds (12 hours). Credentials
2152
+ # based on account credentials can range from 900 seconds (15 minutes)
2153
+ # up to 3,600 seconds (1 hour), with a default of 1 hour.
2154
+ #
2155
+ # **Permissions**
1602
2156
  #
1603
2157
  # The temporary security credentials created by `GetSessionToken` can be
1604
- # used to make API calls to any AWS service with the following
1605
- # exceptions:
2158
+ # used to make API calls to any Amazon Web Services service with the
2159
+ # following exceptions:
1606
2160
  #
1607
2161
  # * You cannot call any IAM API operations unless MFA authentication
1608
2162
  # information is included in the request.
@@ -1610,20 +2164,21 @@ module Aws::STS
1610
2164
  # * You cannot call any STS API *except* `AssumeRole` or
1611
2165
  # `GetCallerIdentity`.
1612
2166
  #
1613
- # <note markdown="1"> We recommend that you do not call `GetSessionToken` with AWS account
1614
- # root user credentials. Instead, follow our [best practices][3] by
1615
- # creating one or more IAM users, giving them the necessary permissions,
1616
- # and using IAM users for everyday interaction with AWS.
2167
+ # <note markdown="1"> We recommend that you do not call `GetSessionToken` with Amazon Web
2168
+ # Services account root user credentials. Instead, follow our [best
2169
+ # practices][3] by creating one or more IAM users, giving them the
2170
+ # necessary permissions, and using IAM users for everyday interaction
2171
+ # with Amazon Web Services.
1617
2172
  #
1618
2173
  # </note>
1619
2174
  #
1620
2175
  # The credentials that are returned by `GetSessionToken` are based on
1621
2176
  # permissions associated with the user whose credentials were used to
1622
- # call the operation. If `GetSessionToken` is called using AWS account
1623
- # root user credentials, the temporary credentials have root user
1624
- # permissions. Similarly, if `GetSessionToken` is called using the
1625
- # credentials of an IAM user, the temporary credentials have the same
1626
- # permissions as the IAM user.
2177
+ # call the operation. If `GetSessionToken` is called using Amazon Web
2178
+ # Services account root user credentials, the temporary credentials have
2179
+ # root user permissions. Similarly, if `GetSessionToken` is called using
2180
+ # the credentials of an IAM user, the temporary credentials have the
2181
+ # same permissions as the IAM user.
1627
2182
  #
1628
2183
  # For more information about using `GetSessionToken` to create temporary
1629
2184
  # credentials, go to [Temporary Credentials for Users in Untrusted
@@ -1640,9 +2195,10 @@ module Aws::STS
1640
2195
  # The duration, in seconds, that the credentials should remain valid.
1641
2196
  # Acceptable durations for IAM user sessions range from 900 seconds (15
1642
2197
  # minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12 hours)
1643
- # as the default. Sessions for AWS account owners are restricted to a
1644
- # maximum of 3,600 seconds (one hour). If the duration is longer than
1645
- # one hour, the session for AWS account owners defaults to one hour.
2198
+ # as the default. Sessions for Amazon Web Services account owners are
2199
+ # restricted to a maximum of 3,600 seconds (one hour). If the duration
2200
+ # is longer than one hour, the session for Amazon Web Services account
2201
+ # owners defaults to one hour.
1646
2202
  #
1647
2203
  # @option params [String] :serial_number
1648
2204
  # The identification number of the MFA device that is associated with
@@ -1651,8 +2207,8 @@ module Aws::STS
1651
2207
  # The value is either the serial number for a hardware device (such as
1652
2208
  # `GAHT12345678`) or an Amazon Resource Name (ARN) for a virtual device
1653
2209
  # (such as `arn:aws:iam::123456789012:mfa/user`). You can find the
1654
- # device for an IAM user by going to the AWS Management Console and
1655
- # viewing the user's security credentials.
2210
+ # device for an IAM user by going to the Amazon Web Services Management
2211
+ # Console and viewing the user's security credentials.
1656
2212
  #
1657
2213
  # The regex used to validate this parameter is a string of characters
1658
2214
  # consisting of upper- and lower-case alphanumeric characters with no
@@ -1730,7 +2286,7 @@ module Aws::STS
1730
2286
  params: params,
1731
2287
  config: config)
1732
2288
  context[:gem_name] = 'aws-sdk-core'
1733
- context[:gem_version] = '3.54.2'
2289
+ context[:gem_version] = '3.126.0'
1734
2290
  Seahorse::Client::Request.new(handlers, context)
1735
2291
  end
1736
2292