aws-sdk-core 3.46.2 → 3.126.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1258 -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 +20 -0
  11. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +109 -0
  12. data/lib/aws-sdk-core/async_client_stubs.rb +82 -0
  13. data/lib/aws-sdk-core/binary/decode_handler.rb +11 -1
  14. data/lib/aws-sdk-core/binary/encode_handler.rb +34 -0
  15. data/lib/aws-sdk-core/binary/event_builder.rb +124 -0
  16. data/lib/aws-sdk-core/binary/event_parser.rb +50 -18
  17. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +7 -2
  18. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +55 -0
  19. data/lib/aws-sdk-core/binary.rb +5 -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 +16 -13
  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 +238 -0
  29. data/lib/aws-sdk-core/ecs_credentials.rb +18 -9
  30. data/lib/aws-sdk-core/endpoint_cache.rb +16 -11
  31. data/lib/aws-sdk-core/errors.rb +138 -15
  32. data/lib/aws-sdk-core/event_emitter.rb +44 -0
  33. data/lib/aws-sdk-core/ini_parser.rb +2 -0
  34. data/lib/aws-sdk-core/instance_profile_credentials.rb +179 -42
  35. data/lib/aws-sdk-core/json/builder.rb +2 -0
  36. data/lib/aws-sdk-core/json/error_handler.rb +21 -2
  37. data/lib/aws-sdk-core/json/handler.rb +21 -1
  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 +63 -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 +16 -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 +35 -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 -107
  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 +24 -7
  87. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +53 -0
  88. data/lib/aws-sdk-core/plugins/user_agent.rb +6 -8
  89. data/lib/aws-sdk-core/process_credentials.rb +12 -5
  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 +15 -2
  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 -127
  110. data/lib/aws-sdk-core/shared_credentials.rb +9 -1
  111. data/lib/aws-sdk-core/sso_credentials.rb +136 -0
  112. data/lib/aws-sdk-core/structure.rb +14 -4
  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 +52 -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 +15 -4
  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 +4 -2
  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 +29 -4
  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 +23 -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 +1282 -531
  154. data/lib/aws-sdk-sts/client_api.rb +76 -1
  155. data/lib/aws-sdk-sts/customizations.rb +4 -0
  156. data/lib/aws-sdk-sts/errors.rb +153 -1
  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 +958 -229
  161. data/lib/aws-sdk-sts.rb +16 -6
  162. data/lib/seahorse/client/async_base.rb +52 -0
  163. data/lib/seahorse/client/async_response.rb +64 -0
  164. data/lib/seahorse/client/base.rb +7 -2
  165. data/lib/seahorse/client/block_io.rb +6 -2
  166. data/lib/seahorse/client/configuration.rb +7 -1
  167. data/lib/seahorse/client/events.rb +3 -1
  168. data/lib/seahorse/client/h2/connection.rb +250 -0
  169. data/lib/seahorse/client/h2/handler.rb +152 -0
  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 +44 -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 +18 -11
  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 +30 -0
  185. data/lib/seahorse/client/plugin.rb +10 -7
  186. data/lib/seahorse/client/plugin_list.rb +2 -0
  187. data/lib/seahorse/client/plugins/content_length.rb +14 -3
  188. data/lib/seahorse/client/plugins/endpoint.rb +4 -2
  189. data/lib/seahorse/client/plugins/h2.rb +69 -0
  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 +10 -0
  200. data/lib/seahorse/model/authorizer.rb +2 -0
  201. data/lib/seahorse/model/operation.rb +9 -0
  202. data/lib/seahorse/model/shapes.rb +29 -2
  203. data/lib/seahorse/util.rb +8 -1
  204. data/lib/seahorse/version.rb +2 -0
  205. data/lib/seahorse.rb +12 -0
  206. metadata +64 -14
@@ -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
 
@@ -23,12 +25,29 @@ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
25
  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'
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'
26
32
  require 'aws-sdk-core/plugins/signature_v4.rb'
27
33
  require 'aws-sdk-core/plugins/protocols/query.rb'
34
+ require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
28
35
 
29
36
  Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
30
37
 
31
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.
32
51
  class Client < Seahorse::Client::Base
33
52
 
34
53
  include Aws::ClientStubs
@@ -55,8 +74,13 @@ module Aws::STS
55
74
  add_plugin(Aws::Plugins::JsonvalueConverter)
56
75
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
57
76
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
77
+ add_plugin(Aws::Plugins::TransferEncoding)
78
+ add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::DefaultsMode)
80
+ add_plugin(Aws::Plugins::RecursionDetection)
58
81
  add_plugin(Aws::Plugins::SignatureV4)
59
82
  add_plugin(Aws::Plugins::Protocols::Query)
83
+ add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
60
84
 
61
85
  # @overload initialize(options)
62
86
  # @param [Hash] options
@@ -67,13 +91,28 @@ module Aws::STS
67
91
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
68
92
  # credentials.
69
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
+ #
70
108
  # * `Aws::InstanceProfileCredentials` - Used for loading credentials
71
109
  # from an EC2 IMDS on an EC2 instance.
72
110
  #
73
- # * `Aws::SharedCredentials` - Used for loading credentials from a
74
- # shared file, such as `~/.aws/config`.
111
+ # * `Aws::ECSCredentials` - Used for loading credentials from
112
+ # instances running in ECS.
75
113
  #
76
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
114
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
115
+ # from the Cognito Identity service.
77
116
  #
78
117
  # When `:credentials` are not configured directly, the following
79
118
  # locations will be searched for credentials:
@@ -83,15 +122,17 @@ module Aws::STS
83
122
  # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
84
123
  # * `~/.aws/credentials`
85
124
  # * `~/.aws/config`
86
- # * EC2 IMDS instance profile - When used by default, the timeouts are
87
- # very aggressive. Construct and pass an instance of
88
- # `Aws::InstanceProfileCredentails` to enable retries and extended
89
- # 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.
90
131
  #
91
132
  # @option options [required, String] :region
92
133
  # The AWS region to connect to. The configured `:region` is
93
134
  # used to determine the service `:endpoint`. When not passed,
94
- # a default `:region` is search for in the following locations:
135
+ # a default `:region` is searched for in the following locations:
95
136
  #
96
137
  # * `Aws.config[:region]`
97
138
  # * `ENV['AWS_REGION']`
@@ -106,6 +147,12 @@ module Aws::STS
106
147
  # When set to `true`, a thread polling for endpoints will be running in
107
148
  # the background every 60 secs (default). Defaults to `false`.
108
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
+ #
109
156
  # @option options [Boolean] :client_side_monitoring (false)
110
157
  # When `true`, client-side metrics will be collected for all API requests from
111
158
  # this client.
@@ -114,6 +161,10 @@ module Aws::STS
114
161
  # Allows you to provide an identifier for this client which will be attached to
115
162
  # all generated client side metrics. Defaults to an empty string.
116
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
+ #
117
168
  # @option options [Integer] :client_side_monitoring_port (31000)
118
169
  # Required for publishing client metrics. The port that the client side monitoring
119
170
  # agent is running on, where client metrics will be published via UDP.
@@ -126,6 +177,14 @@ module Aws::STS
126
177
  # When `true`, an attempt is made to coerce request parameters into
127
178
  # the required types.
128
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
+ #
129
188
  # @option options [Boolean] :disable_host_prefix_injection (false)
130
189
  # Set to true to disable SDK automatically adding host prefix
131
190
  # to default service endpoint when available.
@@ -133,7 +192,7 @@ module Aws::STS
133
192
  # @option options [String] :endpoint
134
193
  # The client endpoint is normally constructed from the `:region`
135
194
  # option. You should only configure an `:endpoint` when connecting
136
- # to test endpoints. This should be avalid HTTP(S) URI.
195
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
137
196
  #
138
197
  # @option options [Integer] :endpoint_cache_max_entries (1000)
139
198
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -148,7 +207,7 @@ module Aws::STS
148
207
  # requests fetching endpoints information. Defaults to 60 sec.
149
208
  #
150
209
  # @option options [Boolean] :endpoint_discovery (false)
151
- # 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.
152
211
  #
153
212
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
154
213
  # The log formatter.
@@ -160,15 +219,29 @@ module Aws::STS
160
219
  # The Logger instance to send log messages to. If this option
161
220
  # is not set, logging will be disabled.
162
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
+ #
163
228
  # @option options [String] :profile ("default")
164
229
  # Used when loading credentials from the shared credentials file
165
230
  # at HOME/.aws/credentials. When not specified, 'default' is used.
166
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
+ #
167
236
  # @option options [Float] :retry_base_delay (0.3)
168
- # 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.
169
239
  #
170
240
  # @option options [Symbol] :retry_jitter (:none)
171
- # 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.
172
245
  #
173
246
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
174
247
  #
@@ -176,16 +249,40 @@ module Aws::STS
176
249
  # The maximum number of times to retry failed requests. Only
177
250
  # ~ 500 level server errors and certain ~ 400 level client errors
178
251
  # are retried. Generally, these are throttling errors, data
179
- # checksum errors, networking errors, timeout errors and auth
180
- # 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.
181
255
  #
182
256
  # @option options [Integer] :retry_max_delay (0)
183
- # 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
+ #
184
276
  #
185
277
  # @option options [String] :secret_access_key
186
278
  #
187
279
  # @option options [String] :session_token
188
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
+ #
189
286
  # @option options [Boolean] :stub_responses (false)
190
287
  # Causes the client to return stubbed responses. By default
191
288
  # fake responses are generated and returned. You can specify
@@ -195,136 +292,182 @@ module Aws::STS
195
292
  # ** Please note ** When response stubbing is enabled, no HTTP
196
293
  # requests are made, and retries are disabled.
197
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
+ #
198
304
  # @option options [Boolean] :validate_params (true)
199
305
  # When `true`, request parameters are validated before
200
306
  # sending the request.
201
307
  #
308
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
309
+ # requests through. Formatted like 'http://proxy.com:123'.
310
+ #
311
+ # @option options [Float] :http_open_timeout (15) The number of
312
+ # seconds to wait when opening a HTTP session before raising a
313
+ # `Timeout::Error`.
314
+ #
315
+ # @option options [Float] :http_read_timeout (60) The default
316
+ # number of seconds to wait for response data. This value can
317
+ # safely be set per-request on the session.
318
+ #
319
+ # @option options [Float] :http_idle_timeout (5) The number of
320
+ # seconds a connection is allowed to sit idle before it is
321
+ # considered stale. Stale connections are closed and removed
322
+ # from the pool before making a request.
323
+ #
324
+ # @option options [Float] :http_continue_timeout (1) The number of
325
+ # seconds to wait for a 100-continue response before sending the
326
+ # request body. This option has no effect unless the request has
327
+ # "Expect" header set to "100-continue". Defaults to `nil` which
328
+ # disables this behaviour. This value can safely be set per
329
+ # request on the session.
330
+ #
331
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
332
+ # in seconds.
333
+ #
334
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
335
+ # HTTP debug output will be sent to the `:logger`.
336
+ #
337
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
338
+ # SSL peer certificates are verified when establishing a
339
+ # connection.
340
+ #
341
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
342
+ # certificate authority bundle file that should be used when
343
+ # verifying peer certificates. If you do not pass
344
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
345
+ # will be used if available.
346
+ #
347
+ # @option options [String] :ssl_ca_directory Full path of the
348
+ # directory that contains the unbundled SSL certificate
349
+ # authority files for verifying peer certificates. If you do
350
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
351
+ # system default will be used if available.
352
+ #
202
353
  def initialize(*args)
203
354
  super
204
355
  end
205
356
 
206
357
  # @!group API Operations
207
358
 
208
- # Returns a set of temporary security credentials (consisting of an
209
- # access key ID, a secret access key, and a security token) that you can
210
- # use to access AWS resources that you might not normally have access
211
- # to. Typically, you use `AssumeRole` for cross-account access or
212
- # federation. For a comparison of `AssumeRole` with the other APIs that
213
- # produce temporary credentials, see [Requesting Temporary Security
214
- # Credentials][1] and [Comparing the AWS STS APIs][2] in the *IAM User
215
- # Guide*.
359
+ # Returns a set of temporary security credentials that you can use to
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*.
216
368
  #
217
- # **Important:** You cannot call `AssumeRole` by using AWS root account
218
- # credentials; access is denied. You must use credentials for an IAM
219
- # user or an IAM role to call `AssumeRole`.
220
- #
221
- # For cross-account access, imagine that you own multiple accounts and
222
- # need to access resources in each account. You could create long-term
223
- # credentials in each account to access those resources. However,
224
- # managing all those credentials and remembering which one can access
225
- # which account can be time consuming. Instead, you can create one set
226
- # of long-term credentials in one account and then use temporary
227
- # security credentials to access all the other accounts by assuming
228
- # roles in those accounts. For more information about roles, see [IAM
229
- # Roles (Delegation and Federation)][3] in the *IAM User Guide*.
230
- #
231
- # For federation, you can, for example, grant single sign-on access to
232
- # the AWS Management Console. If you already have an identity and
233
- # authentication system in your corporate network, you don't have to
234
- # recreate user identities in AWS in order to grant those user
235
- # identities access to AWS. Instead, after a user has been
236
- # authenticated, you call `AssumeRole` (and specify the role with the
237
- # appropriate permissions) to get temporary security credentials for
238
- # that user. With those temporary security credentials, you construct a
239
- # sign-in URL that users can use to access the console. For more
240
- # information, see [Common Scenarios for Temporary Credentials][4] in
241
- # the *IAM User Guide*.
242
- #
243
- # By default, the temporary security credentials created by `AssumeRole`
244
- # last for one hour. However, you can use the optional `DurationSeconds`
245
- # parameter to specify the duration of your session. You can provide a
246
- # value from 900 seconds (15 minutes) up to the maximum session duration
247
- # setting for the role. This setting can have a value from 1 hour to 12
248
- # hours. To learn how to view the maximum value for your role, see [View
249
- # the Maximum Session Duration Setting for a Role][5] in the *IAM User
250
- # Guide*. The maximum session duration limit applies when you use the
251
- # `AssumeRole*` API operations or the `assume-role*` CLI operations but
252
- # does not apply when you use those operations to create a console URL.
253
- # For more information, see [Using IAM Roles][6] in the *IAM User
254
- # Guide*.
369
+ # **Permissions**
255
370
  #
256
371
  # The temporary security credentials created by `AssumeRole` can be used
257
- # to make API calls to any AWS service with the following exception: you
258
- # cannot call the STS service's `GetFederationToken` or
259
- # `GetSessionToken` APIs.
260
- #
261
- # Optionally, you can pass an IAM access policy to this operation. If
262
- # you choose not to pass a policy, the temporary security credentials
263
- # that are returned by the operation have the permissions that are
264
- # defined in the access policy of the role that is being assumed. If you
265
- # pass a policy to this operation, the temporary security credentials
266
- # that are returned by the operation have the permissions that are
267
- # allowed by both the access policy of the role that is being assumed,
268
- # <i> <b>and</b> </i> the policy that you pass. This gives you a way to
269
- # further restrict the permissions for the resulting temporary security
270
- # credentials. You cannot use the passed policy to grant permissions
271
- # that are in excess of those allowed by the access policy of the role
272
- # that is being assumed. For more information, see [Permissions for
273
- # AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity][7] in
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.
375
+ #
376
+ # (Optional) You can pass inline or managed [session policies][3] to
377
+ # this operation. You can pass a single JSON policy document to use as
378
+ # an inline session policy. You can also specify up to 10 managed
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
389
+ # User Guide*.
390
+ #
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.
401
+ #
402
+ # A user who wants to access a role in a different account must also
403
+ # have permissions that are delegated from the user account
404
+ # administrator. The administrator must attach a policy that allows the
405
+ # user to call `AssumeRole` for the ARN of the role in the other
406
+ # account.
407
+ #
408
+ # To allow a user to assume a role in the same account, you can do
409
+ # either of the following:
410
+ #
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).
414
+ #
415
+ # * Add the user as a principal directly in the role's trust policy.
416
+ #
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
274
433
  # the *IAM User Guide*.
275
434
  #
276
- # To assume a role, your AWS account must be trusted by the role. The
277
- # trust relationship is defined in the role's trust policy when the
278
- # role is created. That trust policy states which accounts are allowed
279
- # to delegate access to this account's role.
280
- #
281
- # The user who wants to access the role must also have permissions
282
- # delegated from the role's administrator. If the user is in a
283
- # different account than the role, then the user's administrator must
284
- # attach a policy that allows the user to call AssumeRole on the ARN of
285
- # the role in the other account. If the user is in the same account as
286
- # the role, then you can either attach a policy to the user (identical
287
- # to the previous different account user), or you can add the user as a
288
- # principal directly in the role's trust policy. In this case, the
289
- # trust policy acts as the only resource-based policy in IAM, and users
290
- # in the same account as the role do not need explicit permission to
291
- # assume the role. For more information about trust policies and
292
- # resource-based policies, see [IAM Policies][8] in the *IAM User
293
- # Guide*.
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*.
294
438
  #
295
439
  # **Using MFA with AssumeRole**
296
440
  #
297
- # You can optionally include multi-factor authentication (MFA)
441
+ # (Optional) You can include multi-factor authentication (MFA)
298
442
  # information when you call `AssumeRole`. This is useful for
299
- # cross-account scenarios in which you want to make sure that the user
300
- # who is assuming the role has been authenticated using an AWS MFA
301
- # device. In that scenario, the trust policy of the role being assumed
302
- # includes a condition that tests for MFA authentication; if the caller
303
- # does not include valid MFA information, the request to assume the role
304
- # is denied. The condition in a trust policy that tests for MFA
443
+ # cross-account scenarios to ensure that the user that assumes the role
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
305
449
  # authentication might look like the following example.
306
450
  #
307
451
  # `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
308
452
  #
309
- # For more information, see [Configuring MFA-Protected API Access][9] in
453
+ # For more information, see [Configuring MFA-Protected API Access][8] in
310
454
  # the *IAM User Guide* guide.
311
455
  #
312
456
  # To use MFA with `AssumeRole`, you pass values for the `SerialNumber`
313
457
  # and `TokenCode` parameters. The `SerialNumber` value identifies the
314
458
  # user's hardware or virtual MFA device. The `TokenCode` is the
315
- # time-based one-time password (TOTP) that the MFA devices produces.
459
+ # time-based one-time password (TOTP) that the MFA device produces.
316
460
  #
317
461
  #
318
462
  #
319
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
320
- # [2]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
321
- # [3]: http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html
322
- # [4]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html#sts-introduction
323
- # [5]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
324
- # [6]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
325
- # [7]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
326
- # [8]: http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
327
- # [9]: http://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
463
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
464
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
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
470
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
328
471
  #
329
472
  # @option params [required, String] :role_arn
330
473
  # The Amazon Resource Name (ARN) of the role to assume.
@@ -337,7 +480,7 @@ module Aws::STS
337
480
  # cross-account scenarios, the role session name is visible to, and can
338
481
  # be logged by the account that owns the role. The role session name is
339
482
  # also used in the ARN of the assumed role principal. This means that
340
- # subsequent cross-account API requests using the temporary security
483
+ # subsequent cross-account API requests that use the temporary security
341
484
  # credentials will expose the role session name to the external account
342
485
  # in their CloudTrail logs.
343
486
  #
@@ -346,87 +489,197 @@ module Aws::STS
346
489
  # spaces. You can also include underscores or any of the following
347
490
  # characters: =,.@-
348
491
  #
349
- # @option params [String] :policy
350
- # An IAM policy in JSON format.
351
- #
352
- # This parameter is optional. If you pass a policy, the temporary
353
- # security credentials that are returned by the operation have the
354
- # permissions that are allowed by both (the intersection of) the access
355
- # policy of the role that is being assumed, *and* the policy that you
356
- # pass. This gives you a way to further restrict the permissions for the
357
- # resulting temporary security credentials. You cannot use the passed
358
- # policy to grant permissions that are in excess of those allowed by the
359
- # access policy of the role that is being assumed. For more information,
360
- # see [Permissions for AssumeRole, AssumeRoleWithSAML, and
361
- # AssumeRoleWithWebIdentity][1] in the *IAM User Guide*.
492
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
493
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
494
+ # want to use as managed session policies. The policies must exist in
495
+ # the same account as the role.
362
496
  #
363
- # The format for this parameter, as described by its regex pattern, is a
364
- # string of characters up to 2048 characters in length. The characters
497
+ # This parameter is optional. You can provide up to 10 managed policy
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.
509
+ #
510
+ # </note>
511
+ #
512
+ # Passing policies to this operation returns new temporary credentials.
513
+ # The resulting session's permissions are the intersection of the
514
+ # role's identity-based policy and the session policies. You can use
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*.
521
+ #
522
+ #
523
+ #
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
526
+ #
527
+ # @option params [String] :policy
528
+ # An IAM policy in JSON format that you want to use as an inline session
529
+ # policy.
530
+ #
531
+ # This parameter is optional. Passing policies to this operation returns
532
+ # new temporary credentials. The resulting session's permissions are
533
+ # the intersection of the role's identity-based policy and the session
534
+ # policies. You can use the role's temporary credentials in subsequent
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
365
543
  # can be any ASCII character from the space character to the end of the
366
- # valid character list (\\u0020-\\u00FF). It can also include the tab
367
- # (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
544
+ # valid character list (\\u0020 through \\u00FF). It can also include
545
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
368
546
  # characters.
369
547
  #
370
- # <note markdown="1"> The policy plain text must be 2048 bytes or shorter. However, an
371
- # internal conversion compresses it into a packed binary format with a
372
- # separate limit. The PackedPolicySize response element indicates by
373
- # percentage how close to the upper size limit the policy is, with 100%
374
- # equaling the maximum allowed size.
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.
375
554
  #
376
555
  # </note>
377
556
  #
378
557
  #
379
558
  #
380
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
559
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
381
560
  #
382
561
  # @option params [Integer] :duration_seconds
383
- # The duration, in seconds, of the role session. The value can range
384
- # from 900 seconds (15 minutes) up to the maximum session duration
385
- # setting for the role. This setting can have a value from 1 hour to 12
386
- # hours. If you specify a value higher than this setting, the operation
387
- # fails. For example, if you specify a session duration of 12 hours, but
388
- # your administrator set the maximum session duration to 6 hours, your
389
- # operation fails. To learn how to view the maximum value for your role,
390
- # see [View the Maximum Session Duration Setting for a Role][1] in the
391
- # *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*.
392
582
  #
393
- # By default, the value is set to 3600 seconds.
583
+ # By default, the value is set to `3600` seconds.
394
584
  #
395
585
  # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
396
586
  # console session that you might request using the returned credentials.
397
587
  # The request to the federation endpoint for a console sign-in token
398
588
  # takes a `SessionDuration` parameter that specifies the maximum length
399
589
  # of the console session. For more information, see [Creating a URL that
400
- # Enables Federated Users to Access the AWS Management Console][2] in
401
- # the *IAM User Guide*.
590
+ # Enables Federated Users to Access the Amazon Web Services Management
591
+ # Console][2] in the *IAM User Guide*.
402
592
  #
403
593
  # </note>
404
594
  #
405
595
  #
406
596
  #
407
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
408
- # [2]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
597
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
598
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
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
409
660
  #
410
661
  # @option params [String] :external_id
411
- # A unique identifier that is used by third parties when assuming roles
412
- # in their customers' accounts. For each role that the third party can
413
- # assume, they should instruct their customers to ensure the role's
414
- # trust policy checks for the external ID that the third party
415
- # generated. Each time the third party assumes the role, they should
416
- # pass the customer's external ID. The external ID is useful in order
417
- # to help third parties bind a role to the customer who created it. For
418
- # more information about the external ID, see [How to Use an External ID
419
- # When Granting Access to Your AWS Resources to a Third Party][1] in the
420
- # *IAM User Guide*.
662
+ # A unique identifier that might be required when you assume a role in
663
+ # another account. If the administrator of the account to which the role
664
+ # belongs provided you with an external ID, then provide that value in
665
+ # the `ExternalId` parameter. This value can be any string, such as a
666
+ # passphrase or account number. A cross-account role is usually set up
667
+ # to trust everyone in an account. Therefore, the administrator of the
668
+ # trusting account might send an external ID to the administrator of the
669
+ # trusted account. That way, only someone with the ID can assume the
670
+ # role, rather than everyone in the account. For more information about
671
+ # the external ID, see [How to Use an External ID When Granting Access
672
+ # to Your Amazon Web Services Resources to a Third Party][1] in the *IAM
673
+ # User Guide*.
421
674
  #
422
- # The regex used to validated this parameter is a string of characters
675
+ # The regex used to validate this parameter is a string of characters
423
676
  # consisting of upper- and lower-case alphanumeric characters with no
424
677
  # spaces. You can also include underscores or any of the following
425
678
  # characters: =,.@:/-
426
679
  #
427
680
  #
428
681
  #
429
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
682
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
430
683
  #
431
684
  # @option params [String] :serial_number
432
685
  # The identification number of the MFA device that is associated with
@@ -444,7 +697,7 @@ module Aws::STS
444
697
  #
445
698
  # @option params [String] :token_code
446
699
  # The value provided by the MFA device, if the trust policy of the role
447
- # being assumed requires MFA (that is, if the policy includes a
700
+ # being assumed requires MFA. (In other words, if the policy includes a
448
701
  # condition that tests for MFA). If the role being assumed requires MFA
449
702
  # and if the `TokenCode` value is missing or expired, the `AssumeRole`
450
703
  # call returns an "access denied" error.
@@ -452,21 +705,62 @@ module Aws::STS
452
705
  # The format for this parameter, as described by its regex pattern, is a
453
706
  # sequence of six numeric digits.
454
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
+ #
455
731
  # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
456
732
  #
457
733
  # * {Types::AssumeRoleResponse#credentials #credentials} => Types::Credentials
458
734
  # * {Types::AssumeRoleResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser
459
735
  # * {Types::AssumeRoleResponse#packed_policy_size #packed_policy_size} => Integer
736
+ # * {Types::AssumeRoleResponse#source_identity #source_identity} => String
460
737
  #
461
738
  #
462
739
  # @example Example: To assume a role
463
740
  #
464
741
  # resp = client.assume_role({
465
- # duration_seconds: 3600,
466
742
  # external_id: "123ABC",
467
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}]}",
743
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
468
744
  # role_arn: "arn:aws:iam::123456789012:role/demo",
469
- # 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
+ # ],
470
764
  # })
471
765
  #
472
766
  # resp.to_h outputs the following:
@@ -481,7 +775,7 @@ module Aws::STS
481
775
  # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
482
776
  # session_token: "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==",
483
777
  # },
484
- # packed_policy_size: 6,
778
+ # packed_policy_size: 8,
485
779
  # }
486
780
  #
487
781
  # @example Request syntax with placeholder values
@@ -489,11 +783,24 @@ module Aws::STS
489
783
  # resp = client.assume_role({
490
784
  # role_arn: "arnType", # required
491
785
  # role_session_name: "roleSessionNameType", # required
786
+ # policy_arns: [
787
+ # {
788
+ # arn: "arnType",
789
+ # },
790
+ # ],
492
791
  # policy: "sessionPolicyDocumentType",
493
792
  # duration_seconds: 1,
793
+ # tags: [
794
+ # {
795
+ # key: "tagKeyType", # required
796
+ # value: "tagValueType", # required
797
+ # },
798
+ # ],
799
+ # transitive_tag_keys: ["tagKeyType"],
494
800
  # external_id: "externalIdType",
495
801
  # serial_number: "serialNumberType",
496
802
  # token_code: "tokenCodeType",
803
+ # source_identity: "sourceIdentityType",
497
804
  # })
498
805
  #
499
806
  # @example Response structure
@@ -505,6 +812,7 @@ module Aws::STS
505
812
  # resp.assumed_role_user.assumed_role_id #=> String
506
813
  # resp.assumed_role_user.arn #=> String
507
814
  # resp.packed_policy_size #=> Integer
815
+ # resp.source_identity #=> String
508
816
  #
509
817
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole AWS API Documentation
510
818
  #
@@ -518,16 +826,19 @@ module Aws::STS
518
826
  # Returns a set of temporary security credentials for users who have
519
827
  # been authenticated via a SAML authentication response. This operation
520
828
  # provides a mechanism for tying an enterprise identity store or
521
- # directory to role-based AWS access without user-specific credentials
522
- # or configuration. For a comparison of `AssumeRoleWithSAML` with the
523
- # other APIs that produce temporary credentials, see [Requesting
524
- # Temporary Security Credentials][1] and [Comparing the AWS STS APIs][2]
525
- # 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*.
526
835
  #
527
836
  # The temporary security credentials returned by this operation consist
528
837
  # of an access key ID, a secret access key, and a security token.
529
838
  # Applications can use these temporary security credentials to sign
530
- # calls to AWS services.
839
+ # calls to Amazon Web Services services.
840
+ #
841
+ # **Session Duration**
531
842
  #
532
843
  # By default, the temporary security credentials created by
533
844
  # `AssumeRoleWithSAML` last for one hour. However, you can use the
@@ -541,72 +852,128 @@ module Aws::STS
541
852
  # for your role, see [View the Maximum Session Duration Setting for a
542
853
  # Role][3] in the *IAM User Guide*. The maximum session duration limit
543
854
  # applies when you use the `AssumeRole*` API operations or the
544
- # `assume-role*` CLI operations but does not apply when you use those
545
- # operations to create a console URL. For more information, see [Using
546
- # IAM Roles][4] in the *IAM User Guide*.
855
+ # `assume-role*` CLI commands. However the limit does not apply when you
856
+ # use those operations to create a console URL. For more information,
857
+ # see [Using IAM Roles][4] in the *IAM User Guide*.
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**
547
871
  #
548
872
  # The temporary security credentials created by `AssumeRoleWithSAML` can
549
- # be used to make API calls to any AWS service with the following
550
- # exception: you cannot call the STS service's `GetFederationToken` or
551
- # `GetSessionToken` APIs.
552
- #
553
- # Optionally, you can pass an IAM access policy to this operation. If
554
- # you choose not to pass a policy, the temporary security credentials
555
- # that are returned by the operation have the permissions that are
556
- # defined in the access policy of the role that is being assumed. If you
557
- # pass a policy to this operation, the temporary security credentials
558
- # that are returned by the operation have the permissions that are
559
- # allowed by the intersection of both the access policy of the role that
560
- # is being assumed, <i> <b>and</b> </i> the policy that you pass. This
561
- # means that both policies must grant the permission for the action to
562
- # be allowed. This gives you a way to further restrict the permissions
563
- # for the resulting temporary security credentials. You cannot use the
564
- # passed policy to grant permissions that are in excess of those allowed
565
- # by the access policy of the role that is being assumed. For more
566
- # information, see [Permissions for AssumeRole, AssumeRoleWithSAML, and
567
- # AssumeRoleWithWebIdentity][5] in the *IAM User Guide*.
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
875
+ # `GetSessionToken` API operations.
876
+ #
877
+ # (Optional) You can pass inline or managed [session policies][6] to
878
+ # this operation. You can pass a single JSON policy document to use as
879
+ # an inline session policy. You can also specify up to 10 managed
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
890
+ # User Guide*.
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**
568
940
  #
569
941
  # Before your application can call `AssumeRoleWithSAML`, you must
570
942
  # configure your SAML identity provider (IdP) to issue the claims
571
- # required by AWS. Additionally, you must use AWS Identity and Access
572
- # Management (IAM) to create a SAML provider entity in your AWS account
573
- # that represents your identity provider, and create an IAM role that
574
- # specifies this SAML provider in its trust policy.
575
- #
576
- # Calling `AssumeRoleWithSAML` does not require the use of AWS security
577
- # credentials. The identity of the caller is validated by using keys in
578
- # the metadata document that is uploaded for the SAML provider entity
579
- # for your identity provider.
580
- #
581
- # Calling `AssumeRoleWithSAML` can result in an entry in your AWS
582
- # CloudTrail logs. The entry includes the value in the `NameID` element
583
- # of the SAML assertion. We recommend that you use a NameIDType that is
584
- # not associated with any personally identifiable information (PII). For
585
- # example, you could instead use the Persistent Identifier
586
- # (`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.
587
948
  #
588
949
  # For more information, see the following resources:
589
950
  #
590
- # * [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*.
591
952
  #
592
- # * [Creating SAML Identity Providers][7] in the *IAM User Guide*.
953
+ # * [Creating SAML Identity Providers][12] in the *IAM User Guide*.
593
954
  #
594
- # * [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*.
595
957
  #
596
- # * [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
597
959
  # Guide*.
598
960
  #
599
961
  #
600
962
  #
601
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
602
- # [2]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
603
- # [3]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
604
- # [4]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
605
- # [5]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
606
- # [6]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
607
- # [7]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
608
- # [8]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
609
- # [9]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
963
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
964
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
965
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
966
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.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
610
977
  #
611
978
  # @option params [required, String] :role_arn
612
979
  # The Amazon Resource Name (ARN) of the role that the caller is
@@ -617,47 +984,83 @@ module Aws::STS
617
984
  # describes the IdP.
618
985
  #
619
986
  # @option params [required, String] :saml_assertion
620
- # The base-64 encoded SAML authentication response provided by the IdP.
987
+ # The base64 encoded SAML authentication response provided by the IdP.
621
988
  #
622
989
  # For more information, see [Configuring a Relying Party and Adding
623
- # Claims][1] in the *Using IAM* guide.
990
+ # Claims][1] in the *IAM User Guide*.
624
991
  #
625
992
  #
626
993
  #
627
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html
994
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html
628
995
  #
629
- # @option params [String] :policy
630
- # An IAM policy in JSON format.
631
- #
632
- # The policy parameter is optional. If you pass a policy, the temporary
633
- # security credentials that are returned by the operation have the
634
- # permissions that are allowed by both the access policy of the role
635
- # that is being assumed, <i> <b>and</b> </i> the policy that you pass.
636
- # This gives you a way to further restrict the permissions for the
637
- # resulting temporary security credentials. You cannot use the passed
638
- # policy to grant permissions that are in excess of those allowed by the
639
- # access policy of the role that is being assumed. For more information,
640
- # [Permissions for AssumeRole, AssumeRoleWithSAML, and
641
- # AssumeRoleWithWebIdentity][1] in the *IAM User Guide*.
996
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
997
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
998
+ # want to use as managed session policies. The policies must exist in
999
+ # the same account as the role.
642
1000
  #
643
- # The format for this parameter, as described by its regex pattern, is a
644
- # string of characters up to 2048 characters in length. The characters
1001
+ # This parameter is optional. You can provide up to 10 managed policy
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.
1013
+ #
1014
+ # </note>
1015
+ #
1016
+ # Passing policies to this operation returns new temporary credentials.
1017
+ # The resulting session's permissions are the intersection of the
1018
+ # role's identity-based policy and the session policies. You can use
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*.
1025
+ #
1026
+ #
1027
+ #
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
1030
+ #
1031
+ # @option params [String] :policy
1032
+ # An IAM policy in JSON format that you want to use as an inline session
1033
+ # policy.
1034
+ #
1035
+ # This parameter is optional. Passing policies to this operation returns
1036
+ # new temporary credentials. The resulting session's permissions are
1037
+ # the intersection of the role's identity-based policy and the session
1038
+ # policies. You can use the role's temporary credentials in subsequent
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
645
1047
  # can be any ASCII character from the space character to the end of the
646
- # valid character list (\\u0020-\\u00FF). It can also include the tab
647
- # (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1048
+ # valid character list (\\u0020 through \\u00FF). It can also include
1049
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
648
1050
  # characters.
649
1051
  #
650
- # <note markdown="1"> The policy plain text must be 2048 bytes or shorter. However, an
651
- # internal conversion compresses it into a packed binary format with a
652
- # separate limit. The PackedPolicySize response element indicates by
653
- # percentage how close to the upper size limit the policy is, with 100%
654
- # equaling the maximum allowed size.
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.
655
1058
  #
656
1059
  # </note>
657
1060
  #
658
1061
  #
659
1062
  #
660
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
1063
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
661
1064
  #
662
1065
  # @option params [Integer] :duration_seconds
663
1066
  # The duration, in seconds, of the role session. Your role session lasts
@@ -673,22 +1076,22 @@ module Aws::STS
673
1076
  # maximum value for your role, see [View the Maximum Session Duration
674
1077
  # Setting for a Role][1] in the *IAM User Guide*.
675
1078
  #
676
- # By default, the value is set to 3600 seconds.
1079
+ # By default, the value is set to `3600` seconds.
677
1080
  #
678
1081
  # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
679
1082
  # console session that you might request using the returned credentials.
680
1083
  # The request to the federation endpoint for a console sign-in token
681
1084
  # takes a `SessionDuration` parameter that specifies the maximum length
682
1085
  # of the console session. For more information, see [Creating a URL that
683
- # Enables Federated Users to Access the AWS Management Console][2] in
684
- # the *IAM User Guide*.
1086
+ # Enables Federated Users to Access the Amazon Web Services Management
1087
+ # Console][2] in the *IAM User Guide*.
685
1088
  #
686
1089
  # </note>
687
1090
  #
688
1091
  #
689
1092
  #
690
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
691
- # [2]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
1093
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1094
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
692
1095
  #
693
1096
  # @return [Types::AssumeRoleWithSAMLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
694
1097
  #
@@ -700,6 +1103,37 @@ module Aws::STS
700
1103
  # * {Types::AssumeRoleWithSAMLResponse#issuer #issuer} => String
701
1104
  # * {Types::AssumeRoleWithSAMLResponse#audience #audience} => String
702
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
+ # }
703
1137
  #
704
1138
  # @example Request syntax with placeholder values
705
1139
  #
@@ -707,6 +1141,11 @@ module Aws::STS
707
1141
  # role_arn: "arnType", # required
708
1142
  # principal_arn: "arnType", # required
709
1143
  # saml_assertion: "SAMLAssertionType", # required
1144
+ # policy_arns: [
1145
+ # {
1146
+ # arn: "arnType",
1147
+ # },
1148
+ # ],
710
1149
  # policy: "sessionPolicyDocumentType",
711
1150
  # duration_seconds: 1,
712
1151
  # })
@@ -725,6 +1164,7 @@ module Aws::STS
725
1164
  # resp.issuer #=> String
726
1165
  # resp.audience #=> String
727
1166
  # resp.name_qualifier #=> String
1167
+ # resp.source_identity #=> String
728
1168
  #
729
1169
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML AWS API Documentation
730
1170
  #
@@ -737,36 +1177,42 @@ module Aws::STS
737
1177
 
738
1178
  # Returns a set of temporary security credentials for users who have
739
1179
  # been authenticated in a mobile or web application with a web identity
740
- # provider, such as Amazon Cognito, Login with Amazon, Facebook, Google,
741
- # or any OpenID Connect-compatible identity provider.
1180
+ # provider. Example providers include Amazon Cognito, Login with Amazon,
1181
+ # Facebook, Google, or any OpenID Connect-compatible identity provider.
742
1182
  #
743
1183
  # <note markdown="1"> For mobile applications, we recommend that you use Amazon Cognito. You
744
- # can use Amazon Cognito with the [AWS SDK for iOS][1] and the [AWS SDK
745
- # for Android][2] to uniquely identify a user and supply the user with a
746
- # consistent identity 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.
747
1189
  #
748
1190
  # To learn more about Amazon Cognito, see [Amazon Cognito Overview][3]
749
- # in the *AWS SDK for Android Developer Guide* guide and [Amazon Cognito
750
- # 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*.
751
1194
  #
752
1195
  # </note>
753
1196
  #
754
- # Calling `AssumeRoleWithWebIdentity` does not require the use of AWS
755
- # security credentials. Therefore, you can distribute an application
756
- # (for example, on mobile devices) that requests temporary security
757
- # credentials without including long-term AWS credentials in the
758
- # application, and without deploying server-based proxy services that
759
- # use long-term AWS credentials. Instead, the identity of the caller is
760
- # validated by using a token from the web identity provider. For a
761
- # comparison of `AssumeRoleWithWebIdentity` with the other APIs that
762
- # produce temporary credentials, see [Requesting Temporary Security
763
- # Credentials][5] and [Comparing the AWS STS APIs][6] in the *IAM User
764
- # 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*.
765
1209
  #
766
1210
  # The temporary security credentials returned by this API consist of an
767
1211
  # access key ID, a secret access key, and a security token. Applications
768
- # can use these temporary security credentials to sign calls to AWS
769
- # service APIs.
1212
+ # can use these temporary security credentials to sign calls to Amazon
1213
+ # Web Services service API operations.
1214
+ #
1215
+ # **Session Duration**
770
1216
  #
771
1217
  # By default, the temporary security credentials created by
772
1218
  # `AssumeRoleWithWebIdentity` last for one hour. However, you can use
@@ -777,30 +1223,69 @@ module Aws::STS
777
1223
  # value for your role, see [View the Maximum Session Duration Setting
778
1224
  # for a Role][7] in the *IAM User Guide*. The maximum session duration
779
1225
  # limit applies when you use the `AssumeRole*` API operations or the
780
- # `assume-role*` CLI operations but does not apply when you use those
781
- # operations to create a console URL. For more information, see [Using
782
- # IAM Roles][8] in the *IAM User Guide*.
1226
+ # `assume-role*` CLI commands. However the limit does not apply when you
1227
+ # use those operations to create a console URL. For more information,
1228
+ # see [Using IAM Roles][8] in the *IAM User Guide*.
1229
+ #
1230
+ # **Permissions**
783
1231
  #
784
1232
  # The temporary security credentials created by
785
- # `AssumeRoleWithWebIdentity` can be used to make API calls to any AWS
786
- # service with the following exception: you cannot call the STS
787
- # service's `GetFederationToken` or `GetSessionToken` APIs.
788
- #
789
- # Optionally, you can pass an IAM access policy to this operation. If
790
- # you choose not to pass a policy, the temporary security credentials
791
- # that are returned by the operation have the permissions that are
792
- # defined in the access policy of the role that is being assumed. If you
793
- # pass a policy to this operation, the temporary security credentials
794
- # that are returned by the operation have the permissions that are
795
- # allowed by both the access policy of the role that is being assumed,
796
- # <i> <b>and</b> </i> the policy that you pass. This gives you a way to
797
- # further restrict the permissions for the resulting temporary security
798
- # credentials. You cannot use the passed policy to grant permissions
799
- # that are in excess of those allowed by the access policy of the role
800
- # that is being assumed. For more information, see [Permissions for
801
- # AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity][9] in
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.
1236
+ #
1237
+ # (Optional) You can pass inline or managed [session policies][9] to
1238
+ # this operation. You can pass a single JSON policy document to use as
1239
+ # an inline session policy. You can also specify up to 10 managed
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
1249
+ # assumed. For more information, see [Session Policies][9] in the *IAM
1250
+ # User Guide*.
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
802
1281
  # the *IAM User Guide*.
803
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
+ #
804
1289
  # Before your application can call `AssumeRoleWithWebIdentity`, you must
805
1290
  # have an identity token from a supported identity provider and create a
806
1291
  # role that the application can assume. The role that your application
@@ -808,30 +1293,31 @@ module Aws::STS
808
1293
  # identity token. In other words, the identity provider must be
809
1294
  # specified in the role's trust policy.
810
1295
  #
811
- # Calling `AssumeRoleWithWebIdentity` can result in an entry in your AWS
812
- # CloudTrail logs. The entry includes the [Subject][10] of the provided
813
- # 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
814
1299
  # identifiable information (PII) in this field. For example, you could
815
1300
  # instead use a GUID or a pairwise identifier, as [suggested in the OIDC
816
- # specification][11].
1301
+ # specification][15].
817
1302
  #
818
1303
  # For more information about how to use web identity federation and the
819
1304
  # `AssumeRoleWithWebIdentity` API, see the following resources:
820
1305
  #
821
- # * [Using Web Identity Federation APIs for Mobile Apps][12] and
822
- # [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].
823
1308
  #
824
- # * [ Web Identity Federation Playground][14]. This interactive website
825
- # lets you walk through the process of authenticating via Login with
826
- # Amazon, Facebook, or Google, getting temporary security credentials,
827
- # and then using those credentials to make a request to AWS.
1309
+ # * [ Web Identity Federation Playground][18]. Walk through the process
1310
+ # of authenticating through Login with Amazon, Facebook, or Google,
1311
+ # getting temporary security credentials, and then using those
1312
+ # credentials to make a request to Amazon Web Services.
828
1313
  #
829
- # * [AWS SDK for iOS][1] and [AWS SDK for Android][2]. These toolkits
830
- # contain sample apps that show how to invoke the identity providers,
831
- # and then how to use the information from these providers to get and
832
- # use temporary security 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.
833
1319
  #
834
- # * [Web Identity Federation with Mobile Applications][15]. This article
1320
+ # * [Web Identity Federation with Mobile Applications][19]. This article
835
1321
  # discusses web identity federation and shows an example of how to use
836
1322
  # web identity federation to get access to content in Amazon S3.
837
1323
  #
@@ -839,19 +1325,23 @@ module Aws::STS
839
1325
  #
840
1326
  # [1]: http://aws.amazon.com/sdkforios/
841
1327
  # [2]: http://aws.amazon.com/sdkforandroid/
842
- # [3]: http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840
843
- # [4]: http://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664
844
- # [5]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
845
- # [6]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
846
- # [7]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
847
- # [8]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
848
- # [9]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
849
- # [10]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
850
- # [11]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
851
- # [12]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
852
- # [13]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
853
- # [14]: https://web-identity-federation-playground.s3.amazonaws.com/index.html
854
- # [15]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
1328
+ # [3]: https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840
1329
+ # [4]: https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664
1330
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1331
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1332
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1333
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
1334
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
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
855
1345
  #
856
1346
  # @option params [required, String] :role_arn
857
1347
  # The Amazon Resource Name (ARN) of the role that the caller is
@@ -888,38 +1378,74 @@ module Aws::STS
888
1378
  #
889
1379
  # Do not specify this value for OpenID Connect ID tokens.
890
1380
  #
891
- # @option params [String] :policy
892
- # An IAM policy in JSON format.
893
- #
894
- # The policy parameter is optional. If you pass a policy, the temporary
895
- # security credentials that are returned by the operation have the
896
- # permissions that are allowed by both the access policy of the role
897
- # that is being assumed, <i> <b>and</b> </i> the policy that you pass.
898
- # This gives you a way to further restrict the permissions for the
899
- # resulting temporary security credentials. You cannot use the passed
900
- # policy to grant permissions that are in excess of those allowed by the
901
- # access policy of the role that is being assumed. For more information,
902
- # see [Permissions for AssumeRoleWithWebIdentity][1] in the *IAM User
903
- # Guide*.
1381
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
1382
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
1383
+ # want to use as managed session policies. The policies must exist in
1384
+ # the same account as the role.
904
1385
  #
905
- # The format for this parameter, as described by its regex pattern, is a
906
- # string of characters up to 2048 characters in length. The characters
1386
+ # This parameter is optional. You can provide up to 10 managed policy
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.
1398
+ #
1399
+ # </note>
1400
+ #
1401
+ # Passing policies to this operation returns new temporary credentials.
1402
+ # The resulting session's permissions are the intersection of the
1403
+ # role's identity-based policy and the session policies. You can use
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*.
1410
+ #
1411
+ #
1412
+ #
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
1415
+ #
1416
+ # @option params [String] :policy
1417
+ # An IAM policy in JSON format that you want to use as an inline session
1418
+ # policy.
1419
+ #
1420
+ # This parameter is optional. Passing policies to this operation returns
1421
+ # new temporary credentials. The resulting session's permissions are
1422
+ # the intersection of the role's identity-based policy and the session
1423
+ # policies. You can use the role's temporary credentials in subsequent
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
907
1432
  # can be any ASCII character from the space character to the end of the
908
- # valid character list (\\u0020-\\u00FF). It can also include the tab
909
- # (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1433
+ # valid character list (\\u0020 through \\u00FF). It can also include
1434
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
910
1435
  # characters.
911
1436
  #
912
- # <note markdown="1"> The policy plain text must be 2048 bytes or shorter. However, an
913
- # internal conversion compresses it into a packed binary format with a
914
- # separate limit. The PackedPolicySize response element indicates by
915
- # percentage how close to the upper size limit the policy is, with 100%
916
- # equaling the maximum allowed size.
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.
917
1443
  #
918
1444
  # </note>
919
1445
  #
920
1446
  #
921
1447
  #
922
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
1448
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
923
1449
  #
924
1450
  # @option params [Integer] :duration_seconds
925
1451
  # The duration, in seconds, of the role session. The value can range
@@ -932,22 +1458,22 @@ module Aws::STS
932
1458
  # see [View the Maximum Session Duration Setting for a Role][1] in the
933
1459
  # *IAM User Guide*.
934
1460
  #
935
- # By default, the value is set to 3600 seconds.
1461
+ # By default, the value is set to `3600` seconds.
936
1462
  #
937
1463
  # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
938
1464
  # console session that you might request using the returned credentials.
939
1465
  # The request to the federation endpoint for a console sign-in token
940
1466
  # takes a `SessionDuration` parameter that specifies the maximum length
941
1467
  # of the console session. For more information, see [Creating a URL that
942
- # Enables Federated Users to Access the AWS Management Console][2] in
943
- # the *IAM User Guide*.
1468
+ # Enables Federated Users to Access the Amazon Web Services Management
1469
+ # Console][2] in the *IAM User Guide*.
944
1470
  #
945
1471
  # </note>
946
1472
  #
947
1473
  #
948
1474
  #
949
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
950
- # [2]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
1475
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1476
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
951
1477
  #
952
1478
  # @return [Types::AssumeRoleWithWebIdentityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
953
1479
  #
@@ -957,12 +1483,14 @@ module Aws::STS
957
1483
  # * {Types::AssumeRoleWithWebIdentityResponse#packed_policy_size #packed_policy_size} => Integer
958
1484
  # * {Types::AssumeRoleWithWebIdentityResponse#provider #provider} => String
959
1485
  # * {Types::AssumeRoleWithWebIdentityResponse#audience #audience} => String
1486
+ # * {Types::AssumeRoleWithWebIdentityResponse#source_identity #source_identity} => String
960
1487
  #
961
1488
  #
962
1489
  # @example Example: To assume a role as an OpenID Connect-federated user
963
1490
  #
964
1491
  # resp = client.assume_role_with_web_identity({
965
1492
  # duration_seconds: 3600,
1493
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
966
1494
  # provider_id: "www.amazon.com",
967
1495
  # role_arn: "arn:aws:iam::123456789012:role/FederatedWebIdentityRole",
968
1496
  # role_session_name: "app1",
@@ -994,6 +1522,11 @@ module Aws::STS
994
1522
  # role_session_name: "roleSessionNameType", # required
995
1523
  # web_identity_token: "clientTokenType", # required
996
1524
  # provider_id: "urlType",
1525
+ # policy_arns: [
1526
+ # {
1527
+ # arn: "arnType",
1528
+ # },
1529
+ # ],
997
1530
  # policy: "sessionPolicyDocumentType",
998
1531
  # duration_seconds: 1,
999
1532
  # })
@@ -1010,6 +1543,7 @@ module Aws::STS
1010
1543
  # resp.packed_policy_size #=> Integer
1011
1544
  # resp.provider #=> String
1012
1545
  # resp.audience #=> String
1546
+ # resp.source_identity #=> String
1013
1547
  #
1014
1548
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity AWS API Documentation
1015
1549
  #
@@ -1021,33 +1555,34 @@ module Aws::STS
1021
1555
  end
1022
1556
 
1023
1557
  # Decodes additional information about the authorization status of a
1024
- # request from an encoded message returned in response to an AWS
1025
- # request.
1558
+ # request from an encoded message returned in response to an Amazon Web
1559
+ # Services request.
1026
1560
  #
1027
- # For example, if a user is not authorized to perform an action that he
1028
- # or she has requested, the request returns a
1561
+ # For example, if a user is not authorized to perform an operation that
1562
+ # he or she has requested, the request returns a
1029
1563
  # `Client.UnauthorizedOperation` response (an HTTP 403 response). Some
1030
- # AWS actions additionally return an encoded message that can provide
1031
- # details about this authorization failure.
1564
+ # Amazon Web Services operations additionally return an encoded message
1565
+ # that can provide details about this authorization failure.
1032
1566
  #
1033
- # <note markdown="1"> Only certain AWS actions return an encoded authorization message. The
1034
- # documentation for an individual action indicates whether that action
1035
- # returns an encoded message in addition to returning an HTTP 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.
1036
1571
  #
1037
1572
  # </note>
1038
1573
  #
1039
1574
  # The message is encoded because the details of the authorization status
1040
- # can constitute privileged information that the user who requested the
1041
- # action should not see. To decode an authorization status message, a
1042
- # user must be granted permissions via an IAM policy to request the
1043
- # `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
1575
+ # can contain privileged information that the user who requested the
1576
+ # operation should not see. To decode an authorization status message, a
1577
+ # user must be granted permissions through an IAM [policy][1] to request
1578
+ # the `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
1044
1579
  # action.
1045
1580
  #
1046
1581
  # The decoded message includes the following type of information:
1047
1582
  #
1048
1583
  # * Whether the request was denied due to an explicit deny or due to the
1049
1584
  # absence of an explicit allow. For more information, see [Determining
1050
- # 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*.
1051
1586
  #
1052
1587
  # * The principal who made the request.
1053
1588
  #
@@ -1059,7 +1594,8 @@ module Aws::STS
1059
1594
  #
1060
1595
  #
1061
1596
  #
1062
- # [1]: http://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
1063
1599
  #
1064
1600
  # @option params [required, String] :encoded_message
1065
1601
  # The encoded message that was returned with the response.
@@ -1099,8 +1635,83 @@ module Aws::STS
1099
1635
  req.send_request(options)
1100
1636
  end
1101
1637
 
1102
- # Returns details about the IAM identity whose credentials are used to
1103
- # 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
1104
1715
  #
1105
1716
  # @return [Types::GetCallerIdentityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1106
1717
  #
@@ -1173,97 +1784,117 @@ module Aws::STS
1173
1784
  # access key ID, a secret access key, and a security token) for a
1174
1785
  # federated user. A typical use is in a proxy application that gets
1175
1786
  # temporary security credentials on behalf of distributed applications
1176
- # inside a corporate network. Because you must call the
1177
- # `GetFederationToken` action using the long-term security credentials
1178
- # of an IAM user, this call is appropriate in contexts where those
1179
- # credentials can be safely stored, usually in a server-based
1180
- # application. For a comparison of `GetFederationToken` with the other
1181
- # APIs that produce temporary credentials, see [Requesting Temporary
1182
- # Security Credentials][1] and [Comparing the AWS STS APIs][2] in the
1183
- # *IAM User Guide*.
1787
+ # inside a corporate network. You must call the `GetFederationToken`
1788
+ # operation using the long-term security credentials of an IAM user. As
1789
+ # a result, this call is appropriate in contexts where those credentials
1790
+ # can be safely stored, usually in a server-based application. For a
1791
+ # comparison of `GetFederationToken` with the other API operations that
1792
+ # produce temporary credentials, see [Requesting Temporary Security
1793
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
1794
+ # operations][2] in the *IAM User Guide*.
1184
1795
  #
1185
- # <note markdown="1"> If you are creating a mobile-based or browser-based app that can
1796
+ # <note markdown="1"> You can create a mobile-based or browser-based app that can
1186
1797
  # authenticate users using a web identity provider like Login with
1187
1798
  # Amazon, Facebook, Google, or an OpenID Connect-compatible identity
1188
- # provider, we recommend that you use [Amazon Cognito][3] or
1189
- # `AssumeRoleWithWebIdentity`. For more information, see [Federation
1190
- # Through a Web-based Identity Provider][4].
1799
+ # provider. In this case, we recommend that you use [Amazon Cognito][3]
1800
+ # or `AssumeRoleWithWebIdentity`. For more information, see [Federation
1801
+ # Through a Web-based Identity Provider][4] in the *IAM User Guide*.
1191
1802
  #
1192
1803
  # </note>
1193
1804
  #
1194
- # The `GetFederationToken` action must be called by using the long-term
1195
- # AWS security credentials of an IAM user. You can also call
1196
- # `GetFederationToken` using the security credentials of an AWS root
1197
- # account, but we do not recommended it. Instead, we recommend that you
1198
- # create an IAM user for the purpose of the proxy application and then
1199
- # attach a policy to the IAM user that limits federated users to only
1200
- # the actions and resources that they need access to. For more
1201
- # information, see [IAM Best Practices][5] in the *IAM User Guide*.
1202
- #
1203
- # The temporary security credentials that are obtained by using the
1204
- # long-term credentials of an IAM user are valid for the specified
1205
- # duration, from 900 seconds (15 minutes) up to a maximium of 129600
1206
- # seconds (36 hours). The default is 43200 seconds (12 hours). Temporary
1207
- # credentials that are obtained by using AWS root account credentials
1208
- # have a maximum duration of 3600 seconds (1 hour).
1209
- #
1210
- # The temporary security credentials created by `GetFederationToken` can
1211
- # be used to make API calls to any AWS service with the following
1212
- # exceptions:
1805
+ # You can also call `GetFederationToken` using the security credentials
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*.
1213
1812
  #
1214
- # * You cannot use these credentials to call any IAM APIs.
1813
+ # **Session duration**
1215
1814
  #
1216
- # * You cannot call any STS APIs except `GetCallerIdentity`.
1815
+ # The temporary credentials are valid for the specified duration, from
1816
+ # 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
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).
1217
1821
  #
1218
1822
  # **Permissions**
1219
1823
  #
1220
- # The permissions for the temporary security credentials returned by
1221
- # `GetFederationToken` are determined by a combination of the following:
1222
- #
1223
- # * The policy or policies that are attached to the IAM user whose
1224
- # credentials are used to call `GetFederationToken`.
1225
- #
1226
- # * The policy that is passed as a parameter in the call.
1227
- #
1228
- # The passed policy is attached to the temporary security credentials
1229
- # that result from the `GetFederationToken` API call--that is, to the
1230
- # *federated user*. When the federated user makes an AWS request, AWS
1231
- # evaluates the policy attached to the federated user in combination
1232
- # with the policy or policies attached to the IAM user whose credentials
1233
- # were used to call `GetFederationToken`. AWS allows the federated
1234
- # user's request only when both the federated user <i> <b>and</b> </i>
1235
- # the IAM user are explicitly allowed to perform the requested action.
1236
- # The passed policy cannot grant more permissions than those that are
1237
- # defined in the IAM user policy.
1238
- #
1239
- # A typical use case is that the permissions of the IAM user whose
1240
- # credentials are used to call `GetFederationToken` are designed to
1241
- # allow access to all the actions and resources that any federated user
1242
- # will need. Then, for individual users, you pass a policy to the
1243
- # operation that scopes down the permissions to a level that's
1244
- # appropriate to that individual user, using a policy that allows only a
1245
- # subset of permissions that are granted to the IAM user.
1246
- #
1247
- # If you do not pass a policy, the resulting temporary security
1248
- # credentials have no effective permissions. The only exception is when
1249
- # the temporary security credentials are used to access a resource that
1250
- # has a resource-based policy that specifically allows the federated
1251
- # user to access the resource.
1252
- #
1253
- # For more information about how permissions work, see [Permissions for
1254
- # GetFederationToken][6]. For information about using
1824
+ # You can use the temporary credentials created by `GetFederationToken`
1825
+ # in any Amazon Web Services service except the following:
1826
+ #
1827
+ # * You cannot call any IAM operations using the CLI or the Amazon Web
1828
+ # Services API.
1829
+ #
1830
+ # * You cannot call any STS operations except `GetCallerIdentity`.
1831
+ #
1832
+ # You must pass an inline or managed [session policy][6] to this
1833
+ # operation. You can pass a single JSON policy document to use as an
1834
+ # inline session policy. You can also specify up to 10 managed policies
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
1837
+ # characters.
1838
+ #
1839
+ # Though the session policy parameters are optional, if you do not pass
1840
+ # a policy, then the resulting federated user session has no
1841
+ # permissions. When you pass session policies, the session permissions
1842
+ # are the intersection of the IAM user policies and the session policies
1843
+ # that you pass. This gives you a way to further restrict the
1844
+ # permissions for a federated user. You cannot use session policies to
1845
+ # grant more permissions than those that are defined in the permissions
1846
+ # policy of the IAM user. For more information, see [Session
1847
+ # Policies][6] in the *IAM User Guide*. For information about using
1255
1848
  # `GetFederationToken` to create temporary security credentials, see
1256
1849
  # [GetFederationToken—Federation Through a Custom Identity Broker][7].
1257
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.
1258
1886
  #
1259
1887
  #
1260
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1261
- # [2]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1888
+ #
1889
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1890
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1262
1891
  # [3]: http://aws.amazon.com/cognito/
1263
- # [4]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1264
- # [5]: http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
1265
- # [6]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html
1266
- # [7]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
1892
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1893
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
1894
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
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
1267
1898
  #
1268
1899
  # @option params [required, String] :name
1269
1900
  # The name of the federated user. The name is used as an identifier for
@@ -1277,53 +1908,144 @@ module Aws::STS
1277
1908
  # characters: =,.@-
1278
1909
  #
1279
1910
  # @option params [String] :policy
1280
- # An IAM policy in JSON format that is passed with the
1281
- # `GetFederationToken` call and evaluated along with the policy or
1282
- # policies that are attached to the IAM user whose credentials are used
1283
- # to call `GetFederationToken`. The passed policy is used to scope down
1284
- # the permissions that are available to the IAM user, by allowing only a
1285
- # subset of the permissions that are granted to the IAM user. The passed
1286
- # policy cannot grant more permissions than those granted to the IAM
1287
- # user. The final permissions for the federated user are the most
1288
- # restrictive set based on the intersection of the passed policy and the
1289
- # IAM user policy.
1290
- #
1291
- # If you do not pass a policy, the resulting temporary security
1292
- # credentials have no effective permissions. The only exception is when
1293
- # the temporary security credentials are used to access a resource that
1294
- # has a resource-based policy that specifically allows the federated
1295
- # user to access the resource.
1911
+ # An IAM policy in JSON format that you want to use as an inline session
1912
+ # policy.
1913
+ #
1914
+ # You must pass an inline or managed [session policy][1] to this
1915
+ # operation. You can pass a single JSON policy document to use as an
1916
+ # inline session policy. You can also specify up to 10 managed policies
1917
+ # to use as managed session policies.
1918
+ #
1919
+ # This parameter is optional. However, if you do not pass any session
1920
+ # policies, then the resulting federated user session has no
1921
+ # permissions.
1922
+ #
1923
+ # When you pass session policies, the session permissions are the
1924
+ # intersection of the IAM user policies and the session policies that
1925
+ # you pass. This gives you a way to further restrict the permissions for
1926
+ # a federated user. You cannot use session policies to grant more
1927
+ # permissions than those that are defined in the permissions policy of
1928
+ # the IAM user. For more information, see [Session Policies][1] in the
1929
+ # *IAM User Guide*.
1296
1930
  #
1297
- # The format for this parameter, as described by its regex pattern, is a
1298
- # string of characters up to 2048 characters in length. The 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
1299
1940
  # can be any ASCII character from the space character to the end of the
1300
- # valid character list (\\u0020-\\u00FF). It can also include the tab
1301
- # (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1941
+ # valid character list (\\u0020 through \\u00FF). It can also include
1942
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1302
1943
  # characters.
1303
1944
  #
1304
- # <note markdown="1"> The policy plain text must be 2048 bytes or shorter. However, an
1305
- # internal conversion compresses it into a packed binary format with a
1306
- # separate limit. The PackedPolicySize response element indicates by
1307
- # percentage how close to the upper size limit the policy is, with 100%
1308
- # equaling the maximum allowed size.
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.
1309
1951
  #
1310
1952
  # </note>
1311
1953
  #
1312
- # For more information about how permissions work, see [Permissions for
1313
- # GetFederationToken][1].
1954
+ #
1955
+ #
1956
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1957
+ #
1958
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
1959
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
1960
+ # want to use as a managed session policy. The policies must exist in
1961
+ # the same account as the IAM user that is requesting federated access.
1962
+ #
1963
+ # You must pass an inline or managed [session policy][1] to this
1964
+ # operation. You can pass a single JSON policy document to use as an
1965
+ # inline session policy. You can also specify up to 10 managed policies
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
1968
+ # characters. You can provide up to 10 managed policy ARNs. For more
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.
1972
+ #
1973
+ # This parameter is optional. However, if you do not pass any session
1974
+ # policies, then the resulting federated user session has no
1975
+ # permissions.
1976
+ #
1977
+ # When you pass session policies, the session permissions are the
1978
+ # intersection of the IAM user policies and the session policies that
1979
+ # you pass. This gives you a way to further restrict the permissions for
1980
+ # a federated user. You cannot use session policies to grant more
1981
+ # permissions than those that are defined in the permissions policy of
1982
+ # the IAM user. For more information, see [Session Policies][1] in the
1983
+ # *IAM User Guide*.
1984
+ #
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.
1998
+ #
1999
+ # </note>
1314
2000
  #
1315
2001
  #
1316
2002
  #
1317
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html
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
1318
2005
  #
1319
2006
  # @option params [Integer] :duration_seconds
1320
2007
  # The duration, in seconds, that the session should last. Acceptable
1321
2008
  # durations for federation sessions range from 900 seconds (15 minutes)
1322
- # to 129600 seconds (36 hours), with 43200 seconds (12 hours) as the
1323
- # default. Sessions obtained using AWS account (root) credentials are
1324
- # restricted to a maximum of 3600 seconds (one hour). If the specified
1325
- # duration is longer than one hour, the session obtained by using AWS
1326
- # account (root) credentials defaults to one hour.
2009
+ # to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
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
1327
2049
  #
1328
2050
  # @return [Types::GetFederationTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1329
2051
  #
@@ -1336,8 +2058,18 @@ module Aws::STS
1336
2058
  #
1337
2059
  # resp = client.get_federation_token({
1338
2060
  # duration_seconds: 3600,
1339
- # name: "Bob",
1340
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}]}",
2061
+ # name: "testFedUserSession",
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
+ # ],
1341
2073
  # })
1342
2074
  #
1343
2075
  # resp.to_h outputs the following:
@@ -1352,7 +2084,7 @@ module Aws::STS
1352
2084
  # arn: "arn:aws:sts::123456789012:federated-user/Bob",
1353
2085
  # federated_user_id: "123456789012:Bob",
1354
2086
  # },
1355
- # packed_policy_size: 6,
2087
+ # packed_policy_size: 8,
1356
2088
  # }
1357
2089
  #
1358
2090
  # @example Request syntax with placeholder values
@@ -1360,7 +2092,18 @@ module Aws::STS
1360
2092
  # resp = client.get_federation_token({
1361
2093
  # name: "userNameType", # required
1362
2094
  # policy: "sessionPolicyDocumentType",
2095
+ # policy_arns: [
2096
+ # {
2097
+ # arn: "arnType",
2098
+ # },
2099
+ # ],
1363
2100
  # duration_seconds: 1,
2101
+ # tags: [
2102
+ # {
2103
+ # key: "tagKeyType", # required
2104
+ # value: "tagValueType", # required
2105
+ # },
2106
+ # ],
1364
2107
  # })
1365
2108
  #
1366
2109
  # @example Response structure
@@ -1382,53 +2125,60 @@ module Aws::STS
1382
2125
  req.send_request(options)
1383
2126
  end
1384
2127
 
1385
- # Returns a set of temporary credentials for an AWS account or IAM user.
1386
- # The credentials consist of an access key ID, a secret access key, and
1387
- # a security token. Typically, you use `GetSessionToken` if you want to
1388
- # use MFA to protect programmatic calls to specific AWS APIs like Amazon
1389
- # EC2 `StopInstances`. MFA-enabled IAM users would need to call
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
1390
2134
  # `GetSessionToken` and submit an MFA code that is associated with their
1391
2135
  # MFA device. Using the temporary security credentials that are returned
1392
- # from the call, IAM users can then make programmatic calls to APIs that
1393
- # require MFA authentication. If you do not supply a correct MFA code,
1394
- # then the API returns an access denied error. For a comparison of
1395
- # `GetSessionToken` with the other APIs that produce temporary
1396
- # credentials, see [Requesting Temporary Security Credentials][1] and
1397
- # [Comparing the AWS STS APIs][2] in the *IAM User Guide*.
1398
- #
1399
- # The `GetSessionToken` action must be called by using the long-term AWS
1400
- # security credentials of the AWS account or an IAM user. Credentials
1401
- # that are created by IAM users are valid for the duration that you
1402
- # specify, from 900 seconds (15 minutes) up to a maximum of 129600
1403
- # seconds (36 hours), with a default of 43200 seconds (12 hours);
1404
- # credentials that are created by using account credentials can range
1405
- # from 900 seconds (15 minutes) up to a maximum of 3600 seconds (1
1406
- # hour), with a default of 1 hour.
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
2138
+ # correct MFA code, then the API returns an access denied error. For a
2139
+ # comparison of `GetSessionToken` with the other API operations that
2140
+ # produce temporary credentials, see [Requesting Temporary Security
2141
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
2142
+ # operations][2] in the *IAM User Guide*.
2143
+ #
2144
+ # **Session Duration**
2145
+ #
2146
+ # The `GetSessionToken` operation must be called by using the long-term
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**
1407
2156
  #
1408
2157
  # The temporary security credentials created by `GetSessionToken` can be
1409
- # used to make API calls to any AWS service with the following
1410
- # exceptions:
2158
+ # used to make API calls to any Amazon Web Services service with the
2159
+ # following exceptions:
1411
2160
  #
1412
- # * You cannot call any IAM APIs unless MFA authentication information
1413
- # is included in the request.
2161
+ # * You cannot call any IAM API operations unless MFA authentication
2162
+ # information is included in the request.
1414
2163
  #
1415
2164
  # * You cannot call any STS API *except* `AssumeRole` or
1416
2165
  # `GetCallerIdentity`.
1417
2166
  #
1418
- # <note markdown="1"> We recommend that you do not call `GetSessionToken` with root account
1419
- # credentials. Instead, follow our [best practices][3] by creating one
1420
- # or more IAM users, giving them the necessary permissions, and using
1421
- # 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.
1422
2172
  #
1423
2173
  # </note>
1424
2174
  #
1425
- # The permissions associated with the temporary security credentials
1426
- # returned by `GetSessionToken` are based on the permissions associated
1427
- # with account or IAM user whose credentials are used to call the
1428
- # action. If `GetSessionToken` is called using root account credentials,
1429
- # the temporary credentials have root account permissions. Similarly, if
1430
- # `GetSessionToken` is called using the credentials of an IAM user, the
1431
- # temporary credentials have the same permissions as the IAM user.
2175
+ # The credentials that are returned by `GetSessionToken` are based on
2176
+ # permissions associated with the user whose credentials were used to
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.
1432
2182
  #
1433
2183
  # For more information about using `GetSessionToken` to create temporary
1434
2184
  # credentials, go to [Temporary Credentials for Users in Untrusted
@@ -1436,18 +2186,19 @@ module Aws::STS
1436
2186
  #
1437
2187
  #
1438
2188
  #
1439
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1440
- # [2]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1441
- # [3]: http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users
1442
- # [4]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
2189
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
2190
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
2191
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users
2192
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
1443
2193
  #
1444
2194
  # @option params [Integer] :duration_seconds
1445
2195
  # The duration, in seconds, that the credentials should remain valid.
1446
2196
  # Acceptable durations for IAM user sessions range from 900 seconds (15
1447
- # minutes) to 129600 seconds (36 hours), with 43200 seconds (12 hours)
1448
- # as the default. Sessions for AWS account owners are restricted to a
1449
- # maximum of 3600 seconds (one hour). If the duration is longer than one
1450
- # hour, the session for AWS account owners defaults to one hour.
2197
+ # minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12 hours)
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.
1451
2202
  #
1452
2203
  # @option params [String] :serial_number
1453
2204
  # The identification number of the MFA device that is associated with
@@ -1456,10 +2207,10 @@ module Aws::STS
1456
2207
  # The value is either the serial number for a hardware device (such as
1457
2208
  # `GAHT12345678`) or an Amazon Resource Name (ARN) for a virtual device
1458
2209
  # (such as `arn:aws:iam::123456789012:mfa/user`). You can find the
1459
- # device for an IAM user by going to the AWS Management Console and
1460
- # 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.
1461
2212
  #
1462
- # The regex used to validated this parameter is a string of characters
2213
+ # The regex used to validate this parameter is a string of characters
1463
2214
  # consisting of upper- and lower-case alphanumeric characters with no
1464
2215
  # spaces. You can also include underscores or any of the following
1465
2216
  # characters: =,.@:/-
@@ -1467,9 +2218,9 @@ module Aws::STS
1467
2218
  # @option params [String] :token_code
1468
2219
  # The value provided by the MFA device, if MFA is required. If any
1469
2220
  # policy requires the IAM user to submit an MFA code, specify this
1470
- # value. If MFA authentication is required, and the user does not
1471
- # provide a code when requesting a set of temporary security
1472
- # credentials, the user will receive an "access denied" response when
2221
+ # value. If MFA authentication is required, the user must provide a code
2222
+ # when requesting a set of temporary security credentials. A user who
2223
+ # fails to provide the code receives an "access denied" response when
1473
2224
  # requesting resources that require MFA authentication.
1474
2225
  #
1475
2226
  # The format for this parameter, as described by its regex pattern, is a
@@ -1535,7 +2286,7 @@ module Aws::STS
1535
2286
  params: params,
1536
2287
  config: config)
1537
2288
  context[:gem_name] = 'aws-sdk-core'
1538
- context[:gem_version] = '3.46.2'
2289
+ context[:gem_version] = '3.126.2'
1539
2290
  Seahorse::Client::Request.new(handlers, context)
1540
2291
  end
1541
2292