aws-sdk-core 3.39.0 → 3.54.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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/aws-sdk-core/async_client_stubs.rb +80 -0
  4. data/lib/aws-sdk-core/binary/decode_handler.rb +9 -1
  5. data/lib/aws-sdk-core/binary/encode_handler.rb +32 -0
  6. data/lib/aws-sdk-core/binary/event_builder.rb +122 -0
  7. data/lib/aws-sdk-core/binary/event_parser.rb +48 -18
  8. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +5 -2
  9. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +53 -0
  10. data/lib/aws-sdk-core/binary.rb +3 -0
  11. data/lib/aws-sdk-core/client_side_monitoring/request_metrics.rb +63 -9
  12. data/lib/aws-sdk-core/client_stubs.rb +1 -1
  13. data/lib/aws-sdk-core/ecs_credentials.rb +12 -8
  14. data/lib/aws-sdk-core/errors.rb +38 -2
  15. data/lib/aws-sdk-core/event_emitter.rb +42 -0
  16. data/lib/aws-sdk-core/instance_profile_credentials.rb +12 -8
  17. data/lib/aws-sdk-core/json/error_handler.rb +19 -2
  18. data/lib/aws-sdk-core/json/handler.rb +19 -1
  19. data/lib/aws-sdk-core/log/param_filter.rb +1 -1
  20. data/lib/aws-sdk-core/param_validator.rb +9 -1
  21. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +22 -3
  22. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +5 -1
  23. data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +14 -0
  24. data/lib/aws-sdk-core/plugins/invocation_id.rb +33 -0
  25. data/lib/aws-sdk-core/plugins/retry_errors.rb +2 -0
  26. data/lib/aws-sdk-core/plugins/stub_responses.rb +19 -7
  27. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +53 -0
  28. data/lib/aws-sdk-core/plugins/user_agent.rb +6 -0
  29. data/lib/aws-sdk-core/process_credentials.rb +7 -1
  30. data/lib/aws-sdk-core/query/handler.rb +6 -1
  31. data/lib/aws-sdk-core/refreshing_credentials.rb +1 -1
  32. data/lib/aws-sdk-core/resources/collection.rb +1 -1
  33. data/lib/aws-sdk-core/structure.rb +6 -2
  34. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +19 -0
  35. data/lib/aws-sdk-core/stubbing/stub_data.rb +13 -4
  36. data/lib/aws-sdk-core/waiters/waiter.rb +2 -2
  37. data/lib/aws-sdk-core/xml/error_handler.rb +26 -3
  38. data/lib/aws-sdk-core.rb +1 -0
  39. data/lib/aws-sdk-sts/client.rb +622 -427
  40. data/lib/aws-sdk-sts/client_api.rb +35 -0
  41. data/lib/aws-sdk-sts/errors.rb +128 -0
  42. data/lib/aws-sdk-sts/types.rb +498 -165
  43. data/lib/aws-sdk-sts.rb +1 -1
  44. data/lib/seahorse/client/async_base.rb +50 -0
  45. data/lib/seahorse/client/async_response.rb +62 -0
  46. data/lib/seahorse/client/base.rb +1 -1
  47. data/lib/seahorse/client/configuration.rb +4 -2
  48. data/lib/seahorse/client/events.rb +1 -1
  49. data/lib/seahorse/client/h2/connection.rb +244 -0
  50. data/lib/seahorse/client/h2/handler.rb +151 -0
  51. data/lib/seahorse/client/http/async_response.rb +42 -0
  52. data/lib/seahorse/client/http/response.rb +13 -8
  53. data/lib/seahorse/client/net_http/patches.rb +7 -1
  54. data/lib/seahorse/client/networking_error.rb +28 -0
  55. data/lib/seahorse/client/plugin.rb +1 -1
  56. data/lib/seahorse/client/plugins/content_length.rb +7 -2
  57. data/lib/seahorse/client/plugins/h2.rb +64 -0
  58. data/lib/seahorse/model/api.rb +4 -0
  59. data/lib/seahorse/model/operation.rb +4 -0
  60. data/lib/seahorse/model/shapes.rb +2 -2
  61. data/lib/seahorse.rb +9 -0
  62. metadata +23 -5
@@ -23,6 +23,7 @@ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
23
  require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
24
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
25
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
26
27
  require 'aws-sdk-core/plugins/signature_v4.rb'
27
28
  require 'aws-sdk-core/plugins/protocols/query.rb'
28
29
 
@@ -55,6 +56,7 @@ module Aws::STS
55
56
  add_plugin(Aws::Plugins::JsonvalueConverter)
56
57
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
57
58
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
+ add_plugin(Aws::Plugins::TransferEncoding)
58
60
  add_plugin(Aws::Plugins::SignatureV4)
59
61
  add_plugin(Aws::Plugins::Protocols::Query)
60
62
 
@@ -199,46 +201,77 @@ module Aws::STS
199
201
  # When `true`, request parameters are validated before
200
202
  # sending the request.
201
203
  #
204
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
205
+ # requests through. Formatted like 'http://proxy.com:123'.
206
+ #
207
+ # @option options [Float] :http_open_timeout (15) The number of
208
+ # seconds to wait when opening a HTTP session before rasing a
209
+ # `Timeout::Error`.
210
+ #
211
+ # @option options [Integer] :http_read_timeout (60) The default
212
+ # number of seconds to wait for response data. This value can
213
+ # safely be set
214
+ # per-request on the session yeidled by {#session_for}.
215
+ #
216
+ # @option options [Float] :http_idle_timeout (5) The number of
217
+ # seconds a connection is allowed to sit idble before it is
218
+ # considered stale. Stale connections are closed and removed
219
+ # from the pool before making a request.
220
+ #
221
+ # @option options [Float] :http_continue_timeout (1) The number of
222
+ # seconds to wait for a 100-continue response before sending the
223
+ # request body. This option has no effect unless the request has
224
+ # "Expect" header set to "100-continue". Defaults to `nil` which
225
+ # disables this behaviour. This value can safely be set per
226
+ # request on the session yeidled by {#session_for}.
227
+ #
228
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
229
+ # HTTP debug output will be sent to the `:logger`.
230
+ #
231
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
232
+ # SSL peer certificates are verified when establishing a
233
+ # connection.
234
+ #
235
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
236
+ # certificate authority bundle file that should be used when
237
+ # verifying peer certificates. If you do not pass
238
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
239
+ # will be used if available.
240
+ #
241
+ # @option options [String] :ssl_ca_directory Full path of the
242
+ # directory that contains the unbundled SSL certificate
243
+ # authority files for verifying peer certificates. If you do
244
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
245
+ # system default will be used if available.
246
+ #
202
247
  def initialize(*args)
203
248
  super
204
249
  end
205
250
 
206
251
  # @!group API Operations
207
252
 
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*.
216
- #
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`.
253
+ # Returns a set of temporary security credentials that you can use to
254
+ # access AWS resources that you might not normally have access to. These
255
+ # temporary credentials consist of an access key ID, a secret access
256
+ # key, and a security token. Typically, you use `AssumeRole` within your
257
+ # account or for cross-account access. For a comparison of `AssumeRole`
258
+ # with other API operations that produce temporary credentials, see
259
+ # [Requesting Temporary Security Credentials][1] and [Comparing the AWS
260
+ # STS API operations][2] in the *IAM User Guide*.
261
+ #
262
+ # You cannot use AWS account root user credentials to call `AssumeRole`.
263
+ # You must use credentials for an IAM user or an IAM role to call
264
+ # `AssumeRole`.
220
265
  #
221
266
  # For cross-account access, imagine that you own multiple accounts and
222
267
  # need to access resources in each account. You could create long-term
223
268
  # credentials in each account to access those resources. However,
224
269
  # managing all those credentials and remembering which one can access
225
270
  # 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*.
271
+ # of long-term credentials in one account. Then use temporary security
272
+ # credentials to access all the other accounts by assuming roles in
273
+ # those accounts. For more information about roles, see [IAM Roles][3]
274
+ # in the *IAM User Guide*.
242
275
  #
243
276
  # By default, the temporary security credentials created by `AssumeRole`
244
277
  # last for one hour. However, you can use the optional `DurationSeconds`
@@ -246,85 +279,88 @@ module Aws::STS
246
279
  # value from 900 seconds (15 minutes) up to the maximum session duration
247
280
  # setting for the role. This setting can have a value from 1 hour to 12
248
281
  # 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
282
+ # the Maximum Session Duration Setting for a Role][4] in the *IAM User
250
283
  # 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*.
284
+ # `AssumeRole*` API operations or the `assume-role*` CLI commands.
285
+ # However the limit does not apply when you use those operations to
286
+ # create a console URL. For more information, see [Using IAM Roles][5]
287
+ # in the *IAM User Guide*.
255
288
  #
256
289
  # 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
274
- # the *IAM User Guide*.
275
- #
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
290
+ # to make API calls to any AWS service with the following exception: You
291
+ # cannot call the AWS STS `GetFederationToken` or `GetSessionToken` API
292
+ # operations.
293
+ #
294
+ # (Optional) You can pass inline or managed [session policies][6] to
295
+ # this operation. You can pass a single JSON policy document to use as
296
+ # an inline session policy. You can also specify up to 10 managed
297
+ # policies to use as managed session policies. The plain text that you
298
+ # use for both inline and managed session policies shouldn't exceed
299
+ # 2048 characters. Passing policies to this operation returns new
300
+ # temporary credentials. The resulting session's permissions are the
301
+ # intersection of the role's identity-based policy and the session
302
+ # policies. You can use the role's temporary credentials in subsequent
303
+ # AWS API calls to access resources in the account that owns the role.
304
+ # You cannot use session policies to grant more permissions than those
305
+ # allowed by the identity-based policy of the role that is being
306
+ # assumed. For more information, see [Session Policies][6] in the *IAM
307
+ # User Guide*.
308
+ #
309
+ # To assume a role from a different account, your AWS account must be
310
+ # trusted by the role. The trust relationship is defined in the role's
311
+ # trust policy when the role is created. That trust policy states which
312
+ # accounts are allowed to delegate that access to users in the account.
313
+ #
314
+ # A user who wants to access a role in a different account must also
315
+ # have permissions that are delegated from the user account
316
+ # administrator. The administrator must attach a policy that allows the
317
+ # user to call `AssumeRole` for the ARN of the role in the other
318
+ # account. If the user is in the same account as the role, then you can
319
+ # do either of the following:
320
+ #
321
+ # * Attach a policy to the user (identical to the previous user in a
322
+ # different account).
323
+ #
324
+ # * Add the user as a principal directly in the role's trust policy.
325
+ #
326
+ # In this case, the trust policy acts as an IAM resource-based policy.
327
+ # Users in the same account as the role do not need explicit permission
328
+ # to assume the role. For more information about trust policies and
329
+ # resource-based policies, see [IAM Policies][7] in the *IAM User
293
330
  # Guide*.
294
331
  #
295
332
  # **Using MFA with AssumeRole**
296
333
  #
297
- # You can optionally include multi-factor authentication (MFA)
334
+ # (Optional) You can include multi-factor authentication (MFA)
298
335
  # 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
305
- # authentication might look like the following example.
336
+ # cross-account scenarios to ensure that the user that assumes the role
337
+ # has been authenticated with an AWS MFA device. In that scenario, the
338
+ # trust policy of the role being assumed includes a condition that tests
339
+ # for MFA authentication. If the caller does not include valid MFA
340
+ # information, the request to assume the role is denied. The condition
341
+ # in a trust policy that tests for MFA authentication might look like
342
+ # the following example.
306
343
  #
307
344
  # `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
308
345
  #
309
- # For more information, see [Configuring MFA-Protected API Access][9] in
346
+ # For more information, see [Configuring MFA-Protected API Access][8] in
310
347
  # the *IAM User Guide* guide.
311
348
  #
312
349
  # To use MFA with `AssumeRole`, you pass values for the `SerialNumber`
313
350
  # and `TokenCode` parameters. The `SerialNumber` value identifies the
314
351
  # user's hardware or virtual MFA device. The `TokenCode` is the
315
- # time-based one-time password (TOTP) that the MFA devices produces.
352
+ # time-based one-time password (TOTP) that the MFA device produces.
316
353
  #
317
354
  #
318
355
  #
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
356
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
357
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
358
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html
359
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
360
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
361
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
362
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
363
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
328
364
  #
329
365
  # @option params [required, String] :role_arn
330
366
  # The Amazon Resource Name (ARN) of the role to assume.
@@ -337,47 +373,82 @@ module Aws::STS
337
373
  # cross-account scenarios, the role session name is visible to, and can
338
374
  # be logged by the account that owns the role. The role session name is
339
375
  # also used in the ARN of the assumed role principal. This means that
340
- # subsequent cross-account API requests using the temporary security
376
+ # subsequent cross-account API requests that use the temporary security
341
377
  # credentials will expose the role session name to the external account
342
- # in their CloudTrail logs.
378
+ # in their AWS CloudTrail logs.
343
379
  #
344
380
  # The regex used to validate this parameter is a string of characters
345
381
  # consisting of upper- and lower-case alphanumeric characters with no
346
382
  # spaces. You can also include underscores or any of the following
347
383
  # characters: =,.@-
348
384
  #
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*.
385
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
386
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
387
+ # want to use as managed session policies. The policies must exist in
388
+ # the same account as the role.
389
+ #
390
+ # This parameter is optional. You can provide up to 10 managed policy
391
+ # ARNs. However, the plain text that you use for both inline and managed
392
+ # session policies shouldn't exceed 2048 characters. For more
393
+ # information about ARNs, see [Amazon Resource Names (ARNs) and AWS
394
+ # Service Namespaces](general/latest/gr/aws-arns-and-namespaces.html) in
395
+ # the AWS General Reference.
396
+ #
397
+ # <note markdown="1"> The characters in this parameter count towards the 2048 character
398
+ # session policy guideline. However, an AWS conversion compresses the
399
+ # session policies into a packed binary format that has a separate
400
+ # limit. This is the enforced limit. The `PackedPolicySize` response
401
+ # element indicates by percentage how close the policy is to the upper
402
+ # size limit.
362
403
  #
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
404
+ # </note>
405
+ #
406
+ # Passing policies to this operation returns new temporary credentials.
407
+ # The resulting session's permissions are the intersection of the
408
+ # role's identity-based policy and the session policies. You can use
409
+ # the role's temporary credentials in subsequent AWS API calls to
410
+ # access resources in the account that owns the role. You cannot use
411
+ # session policies to grant more permissions than those allowed by the
412
+ # identity-based policy of the role that is being assumed. For more
413
+ # information, see [Session Policies][1] in the *IAM User Guide*.
414
+ #
415
+ #
416
+ #
417
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
418
+ #
419
+ # @option params [String] :policy
420
+ # An IAM policy in JSON format that you want to use as an inline session
421
+ # policy.
422
+ #
423
+ # This parameter is optional. Passing policies to this operation returns
424
+ # new temporary credentials. The resulting session's permissions are
425
+ # the intersection of the role's identity-based policy and the session
426
+ # policies. You can use the role's temporary credentials in subsequent
427
+ # AWS API calls to access resources in the account that owns the role.
428
+ # You cannot use session policies to grant more permissions than those
429
+ # allowed by the identity-based policy of the role that is being
430
+ # assumed. For more information, see [Session Policies][1] in the *IAM
431
+ # User Guide*.
432
+ #
433
+ # The plain text that you use for both inline and managed session
434
+ # policies shouldn't exceed 2048 characters. The JSON policy characters
365
435
  # 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)
436
+ # valid character list (\\u0020 through \\u00FF). It can also include
437
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
368
438
  # characters.
369
439
  #
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.
440
+ # <note markdown="1"> The characters in this parameter count towards the 2048 character
441
+ # session policy guideline. However, an AWS conversion compresses the
442
+ # session policies into a packed binary format that has a separate
443
+ # limit. This is the enforced limit. The `PackedPolicySize` response
444
+ # element indicates by percentage how close the policy is to the upper
445
+ # size limit.
375
446
  #
376
447
  # </note>
377
448
  #
378
449
  #
379
450
  #
380
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
451
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
381
452
  #
382
453
  # @option params [Integer] :duration_seconds
383
454
  # The duration, in seconds, of the role session. The value can range
@@ -390,7 +461,7 @@ module Aws::STS
390
461
  # see [View the Maximum Session Duration Setting for a Role][1] in the
391
462
  # *IAM User Guide*.
392
463
  #
393
- # By default, the value is set to 3600 seconds.
464
+ # By default, the value is set to `3600` seconds.
394
465
  #
395
466
  # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
396
467
  # console session that you might request using the returned credentials.
@@ -404,29 +475,30 @@ module Aws::STS
404
475
  #
405
476
  #
406
477
  #
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
478
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
479
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
409
480
  #
410
481
  # @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*.
482
+ # A unique identifier that might be required when you assume a role in
483
+ # another account. If the administrator of the account to which the role
484
+ # belongs provided you with an external ID, then provide that value in
485
+ # the `ExternalId` parameter. This value can be any string, such as a
486
+ # passphrase or account number. A cross-account role is usually set up
487
+ # to trust everyone in an account. Therefore, the administrator of the
488
+ # trusting account might send an external ID to the administrator of the
489
+ # trusted account. That way, only someone with the ID can assume the
490
+ # role, rather than everyone in the account. For more information about
491
+ # the external ID, see [How to Use an External ID When Granting Access
492
+ # to Your AWS Resources to a Third Party][1] in the *IAM User Guide*.
421
493
  #
422
- # The regex used to validated this parameter is a string of characters
494
+ # The regex used to validate this parameter is a string of characters
423
495
  # consisting of upper- and lower-case alphanumeric characters with no
424
496
  # spaces. You can also include underscores or any of the following
425
497
  # characters: =,.@:/-
426
498
  #
427
499
  #
428
500
  #
429
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
501
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
430
502
  #
431
503
  # @option params [String] :serial_number
432
504
  # The identification number of the MFA device that is associated with
@@ -464,7 +536,7 @@ module Aws::STS
464
536
  # resp = client.assume_role({
465
537
  # duration_seconds: 3600,
466
538
  # external_id: "123ABC",
467
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}]}",
539
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
468
540
  # role_arn: "arn:aws:iam::123456789012:role/demo",
469
541
  # role_session_name: "Bob",
470
542
  # })
@@ -489,6 +561,11 @@ module Aws::STS
489
561
  # resp = client.assume_role({
490
562
  # role_arn: "arnType", # required
491
563
  # role_session_name: "roleSessionNameType", # required
564
+ # policy_arns: [
565
+ # {
566
+ # arn: "arnType",
567
+ # },
568
+ # ],
492
569
  # policy: "sessionPolicyDocumentType",
493
570
  # duration_seconds: 1,
494
571
  # external_id: "externalIdType",
@@ -520,9 +597,9 @@ module Aws::STS
520
597
  # provides a mechanism for tying an enterprise identity store or
521
598
  # directory to role-based AWS access without user-specific credentials
522
599
  # 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*.
600
+ # other API operations that produce temporary credentials, see
601
+ # [Requesting Temporary Security Credentials][1] and [Comparing the AWS
602
+ # STS API operations][2] in the *IAM User Guide*.
526
603
  #
527
604
  # The temporary security credentials returned by this operation consist
528
605
  # of an access key ID, a secret access key, and a security token.
@@ -541,37 +618,36 @@ module Aws::STS
541
618
  # for your role, see [View the Maximum Session Duration Setting for a
542
619
  # Role][3] in the *IAM User Guide*. The maximum session duration limit
543
620
  # 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*.
621
+ # `assume-role*` CLI commands. However the limit does not apply when you
622
+ # use those operations to create a console URL. For more information,
623
+ # see [Using IAM Roles][4] in the *IAM User Guide*.
547
624
  #
548
625
  # The temporary security credentials created by `AssumeRoleWithSAML` can
549
626
  # 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*.
627
+ # exception: you cannot call the STS `GetFederationToken` or
628
+ # `GetSessionToken` API operations.
629
+ #
630
+ # (Optional) You can pass inline or managed [session policies][5] to
631
+ # this operation. You can pass a single JSON policy document to use as
632
+ # an inline session policy. You can also specify up to 10 managed
633
+ # policies to use as managed session policies. The plain text that you
634
+ # use for both inline and managed session policies shouldn't exceed
635
+ # 2048 characters. Passing policies to this operation returns new
636
+ # temporary credentials. The resulting session's permissions are the
637
+ # intersection of the role's identity-based policy and the session
638
+ # policies. You can use the role's temporary credentials in subsequent
639
+ # AWS API calls to access resources in the account that owns the role.
640
+ # You cannot use session policies to grant more permissions than those
641
+ # allowed by the identity-based policy of the role that is being
642
+ # assumed. For more information, see [Session Policies][5] in the *IAM
643
+ # User Guide*.
568
644
  #
569
645
  # Before your application can call `AssumeRoleWithSAML`, you must
570
646
  # configure your SAML identity provider (IdP) to issue the claims
571
647
  # required by AWS. Additionally, you must use AWS Identity and Access
572
648
  # 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.
649
+ # that represents your identity provider. You must also create an IAM
650
+ # role that specifies this SAML provider in its trust policy.
575
651
  #
576
652
  # Calling `AssumeRoleWithSAML` does not require the use of AWS security
577
653
  # credentials. The identity of the caller is validated by using keys in
@@ -580,9 +656,9 @@ module Aws::STS
580
656
  #
581
657
  # Calling `AssumeRoleWithSAML` can result in an entry in your AWS
582
658
  # 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
659
+ # of the SAML assertion. We recommend that you use a `NameIDType` that
660
+ # is not associated with any personally identifiable information (PII).
661
+ # For example, you could instead use the Persistent Identifier
586
662
  # (`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`).
587
663
  #
588
664
  # For more information, see the following resources:
@@ -598,15 +674,15 @@ module Aws::STS
598
674
  #
599
675
  #
600
676
  #
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
677
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
678
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
679
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
680
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
681
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
682
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
683
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
684
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
685
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
610
686
  #
611
687
  # @option params [required, String] :role_arn
612
688
  # The Amazon Resource Name (ARN) of the role that the caller is
@@ -620,44 +696,79 @@ module Aws::STS
620
696
  # The base-64 encoded SAML authentication response provided by the IdP.
621
697
  #
622
698
  # For more information, see [Configuring a Relying Party and Adding
623
- # Claims][1] in the *Using IAM* guide.
699
+ # Claims][1] in the *IAM User Guide*.
624
700
  #
625
701
  #
626
702
  #
627
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html
703
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html
628
704
  #
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*.
705
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
706
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
707
+ # want to use as managed session policies. The policies must exist in
708
+ # the same account as the role.
642
709
  #
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
710
+ # This parameter is optional. You can provide up to 10 managed policy
711
+ # ARNs. However, the plain text that you use for both inline and managed
712
+ # session policies shouldn't exceed 2048 characters. For more
713
+ # information about ARNs, see [Amazon Resource Names (ARNs) and AWS
714
+ # Service Namespaces](general/latest/gr/aws-arns-and-namespaces.html) in
715
+ # the AWS General Reference.
716
+ #
717
+ # <note markdown="1"> The characters in this parameter count towards the 2048 character
718
+ # session policy guideline. However, an AWS conversion compresses the
719
+ # session policies into a packed binary format that has a separate
720
+ # limit. This is the enforced limit. The `PackedPolicySize` response
721
+ # element indicates by percentage how close the policy is to the upper
722
+ # size limit.
723
+ #
724
+ # </note>
725
+ #
726
+ # Passing policies to this operation returns new temporary credentials.
727
+ # The resulting session's permissions are the intersection of the
728
+ # role's identity-based policy and the session policies. You can use
729
+ # the role's temporary credentials in subsequent AWS API calls to
730
+ # access resources in the account that owns the role. You cannot use
731
+ # session policies to grant more permissions than those allowed by the
732
+ # identity-based policy of the role that is being assumed. For more
733
+ # information, see [Session Policies][1] in the *IAM User Guide*.
734
+ #
735
+ #
736
+ #
737
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
738
+ #
739
+ # @option params [String] :policy
740
+ # An IAM policy in JSON format that you want to use as an inline session
741
+ # policy.
742
+ #
743
+ # This parameter is optional. Passing policies to this operation returns
744
+ # new temporary credentials. The resulting session's permissions are
745
+ # the intersection of the role's identity-based policy and the session
746
+ # policies. You can use the role's temporary credentials in subsequent
747
+ # AWS API calls to access resources in the account that owns the role.
748
+ # You cannot use session policies to grant more permissions than those
749
+ # allowed by the identity-based policy of the role that is being
750
+ # assumed. For more information, see [Session Policies][1] in the *IAM
751
+ # User Guide*.
752
+ #
753
+ # The plain text that you use for both inline and managed session
754
+ # policies shouldn't exceed 2048 characters. The JSON policy characters
645
755
  # 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)
756
+ # valid character list (\\u0020 through \\u00FF). It can also include
757
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
648
758
  # characters.
649
759
  #
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.
760
+ # <note markdown="1"> The characters in this parameter count towards the 2048 character
761
+ # session policy guideline. However, an AWS conversion compresses the
762
+ # session policies into a packed binary format that has a separate
763
+ # limit. This is the enforced limit. The `PackedPolicySize` response
764
+ # element indicates by percentage how close the policy is to the upper
765
+ # size limit.
655
766
  #
656
767
  # </note>
657
768
  #
658
769
  #
659
770
  #
660
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
771
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
661
772
  #
662
773
  # @option params [Integer] :duration_seconds
663
774
  # The duration, in seconds, of the role session. Your role session lasts
@@ -673,7 +784,7 @@ module Aws::STS
673
784
  # maximum value for your role, see [View the Maximum Session Duration
674
785
  # Setting for a Role][1] in the *IAM User Guide*.
675
786
  #
676
- # By default, the value is set to 3600 seconds.
787
+ # By default, the value is set to `3600` seconds.
677
788
  #
678
789
  # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
679
790
  # console session that you might request using the returned credentials.
@@ -687,8 +798,8 @@ module Aws::STS
687
798
  #
688
799
  #
689
800
  #
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
801
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
802
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
692
803
  #
693
804
  # @return [Types::AssumeRoleWithSAMLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
694
805
  #
@@ -707,6 +818,11 @@ module Aws::STS
707
818
  # role_arn: "arnType", # required
708
819
  # principal_arn: "arnType", # required
709
820
  # saml_assertion: "SAMLAssertionType", # required
821
+ # policy_arns: [
822
+ # {
823
+ # arn: "arnType",
824
+ # },
825
+ # ],
710
826
  # policy: "sessionPolicyDocumentType",
711
827
  # duration_seconds: 1,
712
828
  # })
@@ -737,16 +853,17 @@ module Aws::STS
737
853
 
738
854
  # Returns a set of temporary security credentials for users who have
739
855
  # 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.
856
+ # provider. Example providers include Amazon Cognito, Login with Amazon,
857
+ # Facebook, Google, or any OpenID Connect-compatible identity provider.
742
858
  #
743
859
  # <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.
860
+ # can use Amazon Cognito with the [AWS SDK for iOS Developer Guide][1]
861
+ # and the [AWS SDK for Android Developer Guide][2] to uniquely identify
862
+ # a user. You can also supply the user with a consistent identity
863
+ # throughout the lifetime of an application.
747
864
  #
748
865
  # To learn more about Amazon Cognito, see [Amazon Cognito Overview][3]
749
- # in the *AWS SDK for Android Developer Guide* guide and [Amazon Cognito
866
+ # in *AWS SDK for Android Developer Guide* and [Amazon Cognito
750
867
  # Overview][4] in the *AWS SDK for iOS Developer Guide*.
751
868
  #
752
869
  # </note>
@@ -755,18 +872,18 @@ module Aws::STS
755
872
  # security credentials. Therefore, you can distribute an application
756
873
  # (for example, on mobile devices) that requests temporary security
757
874
  # 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*.
875
+ # application. You also don't need to deploy server-based proxy
876
+ # services that use long-term AWS credentials. Instead, the identity of
877
+ # the caller is validated by using a token from the web identity
878
+ # provider. For a comparison of `AssumeRoleWithWebIdentity` with the
879
+ # other API operations that produce temporary credentials, see
880
+ # [Requesting Temporary Security Credentials][5] and [Comparing the AWS
881
+ # STS API operations][6] in the *IAM User Guide*.
765
882
  #
766
883
  # The temporary security credentials returned by this API consist of an
767
884
  # access key ID, a secret access key, and a security token. Applications
768
885
  # can use these temporary security credentials to sign calls to AWS
769
- # service APIs.
886
+ # service API operations.
770
887
  #
771
888
  # By default, the temporary security credentials created by
772
889
  # `AssumeRoleWithWebIdentity` last for one hour. However, you can use
@@ -777,29 +894,29 @@ module Aws::STS
777
894
  # value for your role, see [View the Maximum Session Duration Setting
778
895
  # for a Role][7] in the *IAM User Guide*. The maximum session duration
779
896
  # 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*.
897
+ # `assume-role*` CLI commands. However the limit does not apply when you
898
+ # use those operations to create a console URL. For more information,
899
+ # see [Using IAM Roles][8] in the *IAM User Guide*.
783
900
  #
784
901
  # The temporary security credentials created by
785
902
  # `AssumeRoleWithWebIdentity` can be used to make API calls to any AWS
786
903
  # 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
802
- # the *IAM User Guide*.
904
+ # `GetFederationToken` or `GetSessionToken` API operations.
905
+ #
906
+ # (Optional) You can pass inline or managed [session policies][9] to
907
+ # this operation. You can pass a single JSON policy document to use as
908
+ # an inline session policy. You can also specify up to 10 managed
909
+ # policies to use as managed session policies. The plain text that you
910
+ # use for both inline and managed session policies shouldn't exceed
911
+ # 2048 characters. Passing policies to this operation returns new
912
+ # temporary credentials. The resulting session's permissions are the
913
+ # intersection of the role's identity-based policy and the session
914
+ # policies. You can use the role's temporary credentials in subsequent
915
+ # AWS API calls to access resources in the account that owns the role.
916
+ # You cannot use session policies to grant more permissions than those
917
+ # allowed by the identity-based policy of the role that is being
918
+ # assumed. For more information, see [Session Policies][9] in the *IAM
919
+ # User Guide*.
803
920
  #
804
921
  # Before your application can call `AssumeRoleWithWebIdentity`, you must
805
922
  # have an identity token from a supported identity provider and create a
@@ -818,18 +935,19 @@ module Aws::STS
818
935
  # For more information about how to use web identity federation and the
819
936
  # `AssumeRoleWithWebIdentity` API, see the following resources:
820
937
  #
821
- # * [Using Web Identity Federation APIs for Mobile Apps][12] and
822
- # [Federation Through a Web-based Identity Provider][13].
938
+ # * [Using Web Identity Federation API Operations for Mobile Apps][12]
939
+ # and [Federation Through a Web-based Identity Provider][13].
823
940
  #
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.
941
+ # * [ Web Identity Federation Playground][14]. Walk through the process
942
+ # of authenticating through Login with Amazon, Facebook, or Google,
943
+ # getting temporary security credentials, and then using those
944
+ # credentials to make a request to AWS.
828
945
  #
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.
946
+ # * [AWS SDK for iOS Developer Guide][1] and [AWS SDK for Android
947
+ # Developer Guide][2]. These toolkits contain sample apps that show
948
+ # how to invoke the identity providers, and then how to use the
949
+ # information from these providers to get and use temporary security
950
+ # credentials.
833
951
  #
834
952
  # * [Web Identity Federation with Mobile Applications][15]. This article
835
953
  # discusses web identity federation and shows an example of how to use
@@ -839,17 +957,17 @@ module Aws::STS
839
957
  #
840
958
  # [1]: http://aws.amazon.com/sdkforios/
841
959
  # [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
960
+ # [3]: https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840
961
+ # [4]: https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664
962
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
963
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
964
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
965
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
966
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
849
967
  # [10]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
850
968
  # [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
969
+ # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
970
+ # [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
853
971
  # [14]: https://web-identity-federation-playground.s3.amazonaws.com/index.html
854
972
  # [15]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
855
973
  #
@@ -888,38 +1006,73 @@ module Aws::STS
888
1006
  #
889
1007
  # Do not specify this value for OpenID Connect ID tokens.
890
1008
  #
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*.
1009
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
1010
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
1011
+ # want to use as managed session policies. The policies must exist in
1012
+ # the same account as the role.
1013
+ #
1014
+ # This parameter is optional. You can provide up to 10 managed policy
1015
+ # ARNs. However, the plain text that you use for both inline and managed
1016
+ # session policies shouldn't exceed 2048 characters. For more
1017
+ # information about ARNs, see [Amazon Resource Names (ARNs) and AWS
1018
+ # Service Namespaces](general/latest/gr/aws-arns-and-namespaces.html) in
1019
+ # the AWS General Reference.
1020
+ #
1021
+ # <note markdown="1"> The characters in this parameter count towards the 2048 character
1022
+ # session policy guideline. However, an AWS conversion compresses the
1023
+ # session policies into a packed binary format that has a separate
1024
+ # limit. This is the enforced limit. The `PackedPolicySize` response
1025
+ # element indicates by percentage how close the policy is to the upper
1026
+ # size limit.
904
1027
  #
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
1028
+ # </note>
1029
+ #
1030
+ # Passing policies to this operation returns new temporary credentials.
1031
+ # The resulting session's permissions are the intersection of the
1032
+ # role's identity-based policy and the session policies. You can use
1033
+ # the role's temporary credentials in subsequent AWS API calls to
1034
+ # access resources in the account that owns the role. You cannot use
1035
+ # session policies to grant more permissions than those allowed by the
1036
+ # identity-based policy of the role that is being assumed. For more
1037
+ # information, see [Session Policies][1] in the *IAM User Guide*.
1038
+ #
1039
+ #
1040
+ #
1041
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1042
+ #
1043
+ # @option params [String] :policy
1044
+ # An IAM policy in JSON format that you want to use as an inline session
1045
+ # policy.
1046
+ #
1047
+ # This parameter is optional. Passing policies to this operation returns
1048
+ # new temporary credentials. The resulting session's permissions are
1049
+ # the intersection of the role's identity-based policy and the session
1050
+ # policies. You can use the role's temporary credentials in subsequent
1051
+ # AWS API calls to access resources in the account that owns the role.
1052
+ # You cannot use session policies to grant more permissions than those
1053
+ # allowed by the identity-based policy of the role that is being
1054
+ # assumed. For more information, see [Session Policies][1] in the *IAM
1055
+ # User Guide*.
1056
+ #
1057
+ # The plain text that you use for both inline and managed session
1058
+ # policies shouldn't exceed 2048 characters. The JSON policy characters
907
1059
  # 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)
1060
+ # valid character list (\\u0020 through \\u00FF). It can also include
1061
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
910
1062
  # characters.
911
1063
  #
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.
1064
+ # <note markdown="1"> The characters in this parameter count towards the 2048 character
1065
+ # session policy guideline. However, an AWS conversion compresses the
1066
+ # session policies into a packed binary format that has a separate
1067
+ # limit. This is the enforced limit. The `PackedPolicySize` response
1068
+ # element indicates by percentage how close the policy is to the upper
1069
+ # size limit.
917
1070
  #
918
1071
  # </note>
919
1072
  #
920
1073
  #
921
1074
  #
922
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html
1075
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
923
1076
  #
924
1077
  # @option params [Integer] :duration_seconds
925
1078
  # The duration, in seconds, of the role session. The value can range
@@ -932,7 +1085,7 @@ module Aws::STS
932
1085
  # see [View the Maximum Session Duration Setting for a Role][1] in the
933
1086
  # *IAM User Guide*.
934
1087
  #
935
- # By default, the value is set to 3600 seconds.
1088
+ # By default, the value is set to `3600` seconds.
936
1089
  #
937
1090
  # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
938
1091
  # console session that you might request using the returned credentials.
@@ -946,8 +1099,8 @@ module Aws::STS
946
1099
  #
947
1100
  #
948
1101
  #
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
1102
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1103
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
951
1104
  #
952
1105
  # @return [Types::AssumeRoleWithWebIdentityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
953
1106
  #
@@ -963,6 +1116,7 @@ module Aws::STS
963
1116
  #
964
1117
  # resp = client.assume_role_with_web_identity({
965
1118
  # duration_seconds: 3600,
1119
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
966
1120
  # provider_id: "www.amazon.com",
967
1121
  # role_arn: "arn:aws:iam::123456789012:role/FederatedWebIdentityRole",
968
1122
  # role_session_name: "app1",
@@ -994,6 +1148,11 @@ module Aws::STS
994
1148
  # role_session_name: "roleSessionNameType", # required
995
1149
  # web_identity_token: "clientTokenType", # required
996
1150
  # provider_id: "urlType",
1151
+ # policy_arns: [
1152
+ # {
1153
+ # arn: "arnType",
1154
+ # },
1155
+ # ],
997
1156
  # policy: "sessionPolicyDocumentType",
998
1157
  # duration_seconds: 1,
999
1158
  # })
@@ -1024,21 +1183,22 @@ module Aws::STS
1024
1183
  # request from an encoded message returned in response to an AWS
1025
1184
  # request.
1026
1185
  #
1027
- # For example, if a user is not authorized to perform an action that he
1028
- # or she has requested, the request returns a
1186
+ # For example, if a user is not authorized to perform an operation that
1187
+ # he or she has requested, the request returns a
1029
1188
  # `Client.UnauthorizedOperation` response (an HTTP 403 response). Some
1030
- # AWS actions additionally return an encoded message that can provide
1189
+ # AWS operations additionally return an encoded message that can provide
1031
1190
  # details about this authorization failure.
1032
1191
  #
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.
1192
+ # <note markdown="1"> Only certain AWS operations return an encoded authorization message.
1193
+ # The documentation for an individual operation indicates whether that
1194
+ # operation returns an encoded message in addition to returning an HTTP
1195
+ # code.
1036
1196
  #
1037
1197
  # </note>
1038
1198
  #
1039
1199
  # The message is encoded because the details of the authorization status
1040
1200
  # can constitute privileged information that the user who requested the
1041
- # action should not see. To decode an authorization status message, a
1201
+ # operation should not see. To decode an authorization status message, a
1042
1202
  # user must be granted permissions via an IAM policy to request the
1043
1203
  # `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
1044
1204
  # action.
@@ -1059,7 +1219,7 @@ module Aws::STS
1059
1219
  #
1060
1220
  #
1061
1221
  #
1062
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
1222
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
1063
1223
  #
1064
1224
  # @option params [required, String] :encoded_message
1065
1225
  # The encoded message that was returned with the response.
@@ -1173,97 +1333,79 @@ module Aws::STS
1173
1333
  # access key ID, a secret access key, and a security token) for a
1174
1334
  # federated user. A typical use is in a proxy application that gets
1175
1335
  # 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
1336
+ # inside a corporate network. You must call the `GetFederationToken`
1337
+ # operation using the long-term security credentials of an IAM user. As
1338
+ # a result, this call is appropriate in contexts where those credentials
1339
+ # can be safely stored, usually in a server-based application. For a
1340
+ # comparison of `GetFederationToken` with the other API operations that
1341
+ # produce temporary credentials, see [Requesting Temporary Security
1342
+ # Credentials][1] and [Comparing the AWS STS API operations][2] in the
1183
1343
  # *IAM User Guide*.
1184
1344
  #
1185
- # <note markdown="1"> If you are creating a mobile-based or browser-based app that can
1345
+ # <note markdown="1"> You can create a mobile-based or browser-based app that can
1186
1346
  # authenticate users using a web identity provider like Login with
1187
1347
  # 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
1348
+ # provider. In this case, we recommend that you use [Amazon Cognito][3]
1349
+ # or `AssumeRoleWithWebIdentity`. For more information, see [Federation
1190
1350
  # Through a Web-based Identity Provider][4].
1191
1351
  #
1192
1352
  # </note>
1193
1353
  #
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).
1354
+ # You can also call `GetFederationToken` using the security credentials
1355
+ # of an AWS account root user, but we do not recommend it. Instead, we
1356
+ # recommend that you create an IAM user for the purpose of the proxy
1357
+ # application. Then attach a policy to the IAM user that limits
1358
+ # federated users to only the actions and resources that they need to
1359
+ # access. For more information, see [IAM Best Practices][5] in the *IAM
1360
+ # User Guide*.
1361
+ #
1362
+ # The temporary credentials are valid for the specified duration, from
1363
+ # 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
1364
+ # hours). The default is 43,200 seconds (12 hours). Temporary
1365
+ # credentials that are obtained by using AWS account root user
1366
+ # credentials have a maximum duration of 3,600 seconds (1 hour).
1209
1367
  #
1210
1368
  # The temporary security credentials created by `GetFederationToken` can
1211
1369
  # be used to make API calls to any AWS service with the following
1212
1370
  # exceptions:
1213
1371
  #
1214
- # * You cannot use these credentials to call any IAM APIs.
1372
+ # * You cannot use these credentials to call any IAM API operations.
1215
1373
  #
1216
- # * You cannot call any STS APIs except `GetCallerIdentity`.
1374
+ # * You cannot call any STS API operations except `GetCallerIdentity`.
1217
1375
  #
1218
1376
  # **Permissions**
1219
1377
  #
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
1378
+ # You must pass an inline or managed [session policy][6] to this
1379
+ # operation. You can pass a single JSON policy document to use as an
1380
+ # inline session policy. You can also specify up to 10 managed policies
1381
+ # to use as managed session policies. The plain text that you use for
1382
+ # both inline and managed session policies shouldn't exceed 2048
1383
+ # characters.
1384
+ #
1385
+ # Though the session policy parameters are optional, if you do not pass
1386
+ # a policy, then the resulting federated user session has no
1387
+ # permissions. The only exception is when the credentials are used to
1388
+ # access a resource that has a resource-based policy that specifically
1389
+ # references the federated user session in the `Principal` element of
1390
+ # the policy. When you pass session policies, the session permissions
1391
+ # are the intersection of the IAM user policies and the session policies
1392
+ # that you pass. This gives you a way to further restrict the
1393
+ # permissions for a federated user. You cannot use session policies to
1394
+ # grant more permissions than those that are defined in the permissions
1395
+ # policy of the IAM user. For more information, see [Session
1396
+ # Policies][6] in the *IAM User Guide*. For information about using
1255
1397
  # `GetFederationToken` to create temporary security credentials, see
1256
1398
  # [GetFederationToken—Federation Through a Custom Identity Broker][7].
1257
1399
  #
1258
1400
  #
1259
1401
  #
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
1402
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1403
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1262
1404
  # [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
1405
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1406
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
1407
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1408
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
1267
1409
  #
1268
1410
  # @option params [required, String] :name
1269
1411
  # The name of the federated user. The name is used as an identifier for
@@ -1277,53 +1419,100 @@ module Aws::STS
1277
1419
  # characters: =,.@-
1278
1420
  #
1279
1421
  # @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.
1422
+ # An IAM policy in JSON format that you want to use as an inline session
1423
+ # policy.
1424
+ #
1425
+ # You must pass an inline or managed [session policy][1] to this
1426
+ # operation. You can pass a single JSON policy document to use as an
1427
+ # inline session policy. You can also specify up to 10 managed policies
1428
+ # to use as managed session policies.
1429
+ #
1430
+ # This parameter is optional. However, if you do not pass any session
1431
+ # policies, then the resulting federated user session has no
1432
+ # permissions. The only exception is when the credentials are used to
1433
+ # access a resource that has a resource-based policy that specifically
1434
+ # references the federated user session in the `Principal` element of
1435
+ # the policy.
1436
+ #
1437
+ # When you pass session policies, the session permissions are the
1438
+ # intersection of the IAM user policies and the session policies that
1439
+ # you pass. This gives you a way to further restrict the permissions for
1440
+ # a federated user. You cannot use session policies to grant more
1441
+ # permissions than those that are defined in the permissions policy of
1442
+ # the IAM user. For more information, see [Session Policies][1] in the
1443
+ # *IAM User Guide*.
1296
1444
  #
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
1445
+ # The plain text that you use for both inline and managed session
1446
+ # policies shouldn't exceed 2048 characters. The JSON policy characters
1299
1447
  # 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)
1448
+ # valid character list (\\u0020 through \\u00FF). It can also include
1449
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1302
1450
  # characters.
1303
1451
  #
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.
1452
+ # <note markdown="1"> The characters in this parameter count towards the 2048 character
1453
+ # session policy guideline. However, an AWS conversion compresses the
1454
+ # session policies into a packed binary format that has a separate
1455
+ # limit. This is the enforced limit. The `PackedPolicySize` response
1456
+ # element indicates by percentage how close the policy is to the upper
1457
+ # size limit.
1309
1458
  #
1310
1459
  # </note>
1311
1460
  #
1312
- # For more information about how permissions work, see [Permissions for
1313
- # GetFederationToken][1].
1461
+ #
1462
+ #
1463
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1464
+ #
1465
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
1466
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
1467
+ # want to use as a managed session policy. The policies must exist in
1468
+ # the same account as the IAM user that is requesting federated access.
1469
+ #
1470
+ # You must pass an inline or managed [session policy][1] to this
1471
+ # operation. You can pass a single JSON policy document to use as an
1472
+ # inline session policy. You can also specify up to 10 managed policies
1473
+ # to use as managed session policies. The plain text that you use for
1474
+ # both inline and managed session policies shouldn't exceed 2048
1475
+ # characters. You can provide up to 10 managed policy ARNs. For more
1476
+ # information about ARNs, see [Amazon Resource Names (ARNs) and AWS
1477
+ # Service Namespaces](general/latest/gr/aws-arns-and-namespaces.html) in
1478
+ # the AWS General Reference.
1479
+ #
1480
+ # This parameter is optional. However, if you do not pass any session
1481
+ # policies, then the resulting federated user session has no
1482
+ # permissions. The only exception is when the credentials are used to
1483
+ # access a resource that has a resource-based policy that specifically
1484
+ # references the federated user session in the `Principal` element of
1485
+ # the policy.
1486
+ #
1487
+ # When you pass session policies, the session permissions are the
1488
+ # intersection of the IAM user policies and the session policies that
1489
+ # you pass. This gives you a way to further restrict the permissions for
1490
+ # a federated user. You cannot use session policies to grant more
1491
+ # permissions than those that are defined in the permissions policy of
1492
+ # the IAM user. For more information, see [Session Policies][1] in the
1493
+ # *IAM User Guide*.
1494
+ #
1495
+ # <note markdown="1"> The characters in this parameter count towards the 2048 character
1496
+ # session policy guideline. However, an AWS conversion compresses the
1497
+ # session policies into a packed binary format that has a separate
1498
+ # limit. This is the enforced limit. The `PackedPolicySize` response
1499
+ # element indicates by percentage how close the policy is to the upper
1500
+ # size limit.
1501
+ #
1502
+ # </note>
1314
1503
  #
1315
1504
  #
1316
1505
  #
1317
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html
1506
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1318
1507
  #
1319
1508
  # @option params [Integer] :duration_seconds
1320
1509
  # The duration, in seconds, that the session should last. Acceptable
1321
1510
  # 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.
1511
+ # to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
1512
+ # default. Sessions obtained using AWS account root user credentials are
1513
+ # restricted to a maximum of 3,600 seconds (one hour). If the specified
1514
+ # duration is longer than one hour, the session obtained by using root
1515
+ # user credentials defaults to one hour.
1327
1516
  #
1328
1517
  # @return [Types::GetFederationTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1329
1518
  #
@@ -1337,7 +1526,7 @@ module Aws::STS
1337
1526
  # resp = client.get_federation_token({
1338
1527
  # duration_seconds: 3600,
1339
1528
  # name: "Bob",
1340
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}]}",
1529
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
1341
1530
  # })
1342
1531
  #
1343
1532
  # resp.to_h outputs the following:
@@ -1360,6 +1549,11 @@ module Aws::STS
1360
1549
  # resp = client.get_federation_token({
1361
1550
  # name: "userNameType", # required
1362
1551
  # policy: "sessionPolicyDocumentType",
1552
+ # policy_arns: [
1553
+ # {
1554
+ # arn: "arnType",
1555
+ # },
1556
+ # ],
1363
1557
  # duration_seconds: 1,
1364
1558
  # })
1365
1559
  #
@@ -1385,50 +1579,51 @@ module Aws::STS
1385
1579
  # Returns a set of temporary credentials for an AWS account or IAM user.
1386
1580
  # The credentials consist of an access key ID, a secret access key, and
1387
1581
  # 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
1390
- # `GetSessionToken` and submit an MFA code that is associated with their
1391
- # 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.
1582
+ # use MFA to protect programmatic calls to specific AWS API operations
1583
+ # like Amazon EC2 `StopInstances`. MFA-enabled IAM users would need to
1584
+ # call `GetSessionToken` and submit an MFA code that is associated with
1585
+ # their MFA device. Using the temporary security credentials that are
1586
+ # returned from the call, IAM users can then make programmatic calls to
1587
+ # API operations that require MFA authentication. If you do not supply a
1588
+ # correct MFA code, then the API returns an access denied error. For a
1589
+ # comparison of `GetSessionToken` with the other API operations that
1590
+ # produce temporary credentials, see [Requesting Temporary Security
1591
+ # Credentials][1] and [Comparing the AWS STS API operations][2] in the
1592
+ # *IAM User Guide*.
1593
+ #
1594
+ # The `GetSessionToken` operation must be called by using the long-term
1595
+ # AWS security credentials of the AWS account root user or an IAM user.
1596
+ # Credentials that are created by IAM users are valid for the duration
1597
+ # that you specify. This duration can range from 900 seconds (15
1598
+ # minutes) up to a maximum of 129,600 seconds (36 hours), with a default
1599
+ # of 43,200 seconds (12 hours). Credentials based on account credentials
1600
+ # can range from 900 seconds (15 minutes) up to 3,600 seconds (1 hour),
1601
+ # with a default of 1 hour.
1407
1602
  #
1408
1603
  # The temporary security credentials created by `GetSessionToken` can be
1409
1604
  # used to make API calls to any AWS service with the following
1410
1605
  # exceptions:
1411
1606
  #
1412
- # * You cannot call any IAM APIs unless MFA authentication information
1413
- # is included in the request.
1607
+ # * You cannot call any IAM API operations unless MFA authentication
1608
+ # information is included in the request.
1414
1609
  #
1415
1610
  # * You cannot call any STS API *except* `AssumeRole` or
1416
1611
  # `GetCallerIdentity`.
1417
1612
  #
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.
1613
+ # <note markdown="1"> We recommend that you do not call `GetSessionToken` with AWS account
1614
+ # root user credentials. Instead, follow our [best practices][3] by
1615
+ # creating one or more IAM users, giving them the necessary permissions,
1616
+ # and using IAM users for everyday interaction with AWS.
1422
1617
  #
1423
1618
  # </note>
1424
1619
  #
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.
1620
+ # The credentials that are returned by `GetSessionToken` are based on
1621
+ # permissions associated with the user whose credentials were used to
1622
+ # call the operation. If `GetSessionToken` is called using AWS account
1623
+ # root user credentials, the temporary credentials have root user
1624
+ # permissions. Similarly, if `GetSessionToken` is called using the
1625
+ # credentials of an IAM user, the temporary credentials have the same
1626
+ # permissions as the IAM user.
1432
1627
  #
1433
1628
  # For more information about using `GetSessionToken` to create temporary
1434
1629
  # credentials, go to [Temporary Credentials for Users in Untrusted
@@ -1436,18 +1631,18 @@ module Aws::STS
1436
1631
  #
1437
1632
  #
1438
1633
  #
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
1634
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1635
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1636
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users
1637
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
1443
1638
  #
1444
1639
  # @option params [Integer] :duration_seconds
1445
1640
  # The duration, in seconds, that the credentials should remain valid.
1446
1641
  # Acceptable durations for IAM user sessions range from 900 seconds (15
1447
- # minutes) to 129600 seconds (36 hours), with 43200 seconds (12 hours)
1642
+ # minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12 hours)
1448
1643
  # 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.
1644
+ # maximum of 3,600 seconds (one hour). If the duration is longer than
1645
+ # one hour, the session for AWS account owners defaults to one hour.
1451
1646
  #
1452
1647
  # @option params [String] :serial_number
1453
1648
  # The identification number of the MFA device that is associated with
@@ -1459,7 +1654,7 @@ module Aws::STS
1459
1654
  # device for an IAM user by going to the AWS Management Console and
1460
1655
  # viewing the user's security credentials.
1461
1656
  #
1462
- # The regex used to validated this parameter is a string of characters
1657
+ # The regex used to validate this parameter is a string of characters
1463
1658
  # consisting of upper- and lower-case alphanumeric characters with no
1464
1659
  # spaces. You can also include underscores or any of the following
1465
1660
  # characters: =,.@:/-
@@ -1467,9 +1662,9 @@ module Aws::STS
1467
1662
  # @option params [String] :token_code
1468
1663
  # The value provided by the MFA device, if MFA is required. If any
1469
1664
  # 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
1665
+ # value. If MFA authentication is required, the user must provide a code
1666
+ # when requesting a set of temporary security credentials. A user who
1667
+ # fails to provide the code receives an "access denied" response when
1473
1668
  # requesting resources that require MFA authentication.
1474
1669
  #
1475
1670
  # The format for this parameter, as described by its regex pattern, is a
@@ -1535,7 +1730,7 @@ module Aws::STS
1535
1730
  params: params,
1536
1731
  config: config)
1537
1732
  context[:gem_name] = 'aws-sdk-core'
1538
- context[:gem_version] = '3.39.0'
1733
+ context[:gem_version] = '3.54.2'
1539
1734
  Seahorse::Client::Request.new(handlers, context)
1540
1735
  end
1541
1736