aws-sdk-core 3.209.1 → 3.240.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +331 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-core/arn.rb +1 -3
  5. data/lib/aws-sdk-core/assume_role_credentials.rb +9 -8
  6. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +3 -2
  7. data/lib/aws-sdk-core/cbor/decoder.rb +0 -2
  8. data/lib/aws-sdk-core/cbor/encoder.rb +2 -2
  9. data/lib/aws-sdk-core/cbor.rb +3 -56
  10. data/lib/aws-sdk-core/client_stubs.rb +35 -55
  11. data/lib/aws-sdk-core/credential_provider.rb +4 -0
  12. data/lib/aws-sdk-core/credential_provider_chain.rb +91 -22
  13. data/lib/aws-sdk-core/credentials.rb +6 -0
  14. data/lib/aws-sdk-core/ecs_credentials.rb +14 -13
  15. data/lib/aws-sdk-core/endpoints/matchers.rb +3 -9
  16. data/lib/aws-sdk-core/endpoints.rb +37 -13
  17. data/lib/aws-sdk-core/error_handler.rb +5 -0
  18. data/lib/aws-sdk-core/errors.rb +5 -2
  19. data/lib/aws-sdk-core/event_emitter.rb +1 -1
  20. data/lib/aws-sdk-core/instance_profile_credentials.rb +147 -157
  21. data/lib/aws-sdk-core/json/error_handler.rb +14 -3
  22. data/lib/aws-sdk-core/json/handler.rb +1 -0
  23. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  24. data/lib/aws-sdk-core/login_credentials.rb +229 -0
  25. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +347 -171
  26. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
  27. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +75 -59
  28. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  29. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  30. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +44 -25
  31. data/lib/aws-sdk-core/plugins/sign.rb +30 -21
  32. data/lib/aws-sdk-core/plugins/stub_responses.rb +30 -8
  33. data/lib/aws-sdk-core/plugins/user_agent.rb +35 -2
  34. data/lib/aws-sdk-core/process_credentials.rb +1 -1
  35. data/lib/aws-sdk-core/refreshing_credentials.rb +8 -11
  36. data/lib/aws-sdk-core/rest/request/headers.rb +3 -3
  37. data/lib/aws-sdk-core/rpc_v2/builder.rb +1 -1
  38. data/lib/aws-sdk-core/{cbor → rpc_v2}/cbor_engine.rb +4 -5
  39. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +3 -1
  40. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +27 -16
  41. data/lib/aws-sdk-core/rpc_v2/handler.rb +2 -1
  42. data/lib/aws-sdk-core/rpc_v2/parser.rb +9 -1
  43. data/lib/aws-sdk-core/rpc_v2.rb +65 -2
  44. data/lib/aws-sdk-core/shared_config.rb +104 -21
  45. data/lib/aws-sdk-core/shared_credentials.rb +1 -0
  46. data/lib/aws-sdk-core/sso_credentials.rb +3 -1
  47. data/lib/aws-sdk-core/static_token_provider.rb +1 -2
  48. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  49. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  50. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  51. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  52. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  53. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  54. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +13 -15
  55. data/lib/aws-sdk-core/stubbing.rb +2 -2
  56. data/lib/aws-sdk-core/token.rb +3 -3
  57. data/lib/aws-sdk-core/token_provider.rb +4 -0
  58. data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
  59. data/lib/aws-sdk-core/util.rb +2 -1
  60. data/lib/aws-sdk-core/xml/error_handler.rb +3 -1
  61. data/lib/aws-sdk-core.rb +4 -0
  62. data/lib/aws-sdk-signin/client.rb +604 -0
  63. data/lib/aws-sdk-signin/client_api.rb +119 -0
  64. data/lib/aws-sdk-signin/customizations.rb +1 -0
  65. data/lib/aws-sdk-signin/endpoint_parameters.rb +69 -0
  66. data/lib/aws-sdk-signin/endpoint_provider.rb +59 -0
  67. data/lib/aws-sdk-signin/endpoints.rb +20 -0
  68. data/lib/aws-sdk-signin/errors.rb +122 -0
  69. data/lib/aws-sdk-signin/plugins/endpoints.rb +77 -0
  70. data/lib/aws-sdk-signin/resource.rb +26 -0
  71. data/lib/aws-sdk-signin/types.rb +299 -0
  72. data/lib/aws-sdk-signin.rb +63 -0
  73. data/lib/aws-sdk-sso/client.rb +76 -47
  74. data/lib/aws-sdk-sso/endpoint_parameters.rb +13 -10
  75. data/lib/aws-sdk-sso/endpoint_provider.rb +16 -20
  76. data/lib/aws-sdk-sso/endpoints.rb +2 -42
  77. data/lib/aws-sdk-sso/plugins/endpoints.rb +1 -14
  78. data/lib/aws-sdk-sso.rb +1 -1
  79. data/lib/aws-sdk-ssooidc/client.rb +132 -73
  80. data/lib/aws-sdk-ssooidc/client_api.rb +11 -0
  81. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +13 -10
  82. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  83. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -42
  84. data/lib/aws-sdk-ssooidc/errors.rb +10 -0
  85. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +1 -14
  86. data/lib/aws-sdk-ssooidc/types.rb +65 -21
  87. data/lib/aws-sdk-ssooidc.rb +1 -1
  88. data/lib/aws-sdk-sts/client.rb +416 -107
  89. data/lib/aws-sdk-sts/client_api.rb +105 -8
  90. data/lib/aws-sdk-sts/customizations.rb +0 -1
  91. data/lib/aws-sdk-sts/endpoint_parameters.rb +15 -14
  92. data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
  93. data/lib/aws-sdk-sts/endpoints.rb +2 -94
  94. data/lib/aws-sdk-sts/errors.rb +79 -0
  95. data/lib/aws-sdk-sts/plugins/endpoints.rb +1 -22
  96. data/lib/aws-sdk-sts/presigner.rb +2 -6
  97. data/lib/aws-sdk-sts/types.rb +343 -32
  98. data/lib/aws-sdk-sts.rb +1 -1
  99. data/lib/seahorse/client/async_base.rb +4 -5
  100. data/lib/seahorse/client/base.rb +0 -14
  101. data/lib/seahorse/client/h2/connection.rb +18 -28
  102. data/lib/seahorse/client/h2/handler.rb +6 -1
  103. data/lib/seahorse/client/http/response.rb +1 -1
  104. data/lib/seahorse/client/net_http/connection_pool.rb +4 -1
  105. data/lib/seahorse/client/networking_error.rb +1 -1
  106. data/lib/seahorse/client/plugins/h2.rb +4 -4
  107. data/lib/seahorse/client/request_context.rb +2 -2
  108. data/lib/seahorse/client/response.rb +2 -0
  109. data/lib/seahorse/util.rb +2 -1
  110. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  111. data/sig/seahorse/client/async_base.rbs +18 -0
  112. metadata +69 -17
@@ -7,35 +7,35 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
- require 'seahorse/client/plugins/content_length.rb'
11
- require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
- require 'aws-sdk-core/plugins/logging.rb'
13
- require 'aws-sdk-core/plugins/param_converter.rb'
14
- require 'aws-sdk-core/plugins/param_validator.rb'
15
- require 'aws-sdk-core/plugins/user_agent.rb'
16
- require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
- require 'aws-sdk-core/plugins/retry_errors.rb'
18
- require 'aws-sdk-core/plugins/global_configuration.rb'
19
- require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
- require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
- require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
- require 'aws-sdk-core/plugins/response_paging.rb'
23
- require 'aws-sdk-core/plugins/stub_responses.rb'
24
- require 'aws-sdk-core/plugins/idempotency_token.rb'
25
- require 'aws-sdk-core/plugins/invocation_id.rb'
26
- require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
27
- require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
28
- require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
29
- require 'aws-sdk-core/plugins/transfer_encoding.rb'
30
- require 'aws-sdk-core/plugins/http_checksum.rb'
31
- require 'aws-sdk-core/plugins/checksum_algorithm.rb'
32
- require 'aws-sdk-core/plugins/request_compression.rb'
33
- require 'aws-sdk-core/plugins/defaults_mode.rb'
34
- require 'aws-sdk-core/plugins/recursion_detection.rb'
35
- require 'aws-sdk-core/plugins/telemetry.rb'
36
- require 'aws-sdk-core/plugins/sign.rb'
37
- require 'aws-sdk-core/plugins/protocols/query.rb'
38
- require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
10
+ require 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/query'
38
+ require 'aws-sdk-sts/plugins/sts_regional_endpoints'
39
39
 
40
40
  module Aws::STS
41
41
  # An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
@@ -97,8 +97,8 @@ module Aws::STS
97
97
  # class name or an instance of a plugin class.
98
98
  #
99
99
  # @option options [required, Aws::CredentialProvider] :credentials
100
- # Your AWS credentials. This can be an instance of any one of the
101
- # following classes:
100
+ # Your AWS credentials used for authentication. This can be any class that includes and implements
101
+ # `Aws::CredentialProvider`, or instance of any one of the following classes:
102
102
  #
103
103
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
104
104
  # credentials.
@@ -126,22 +126,24 @@ module Aws::STS
126
126
  # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
127
127
  # from the Cognito Identity service.
128
128
  #
129
- # When `:credentials` are not configured directly, the following
130
- # locations will be searched for credentials:
129
+ # When `:credentials` are not configured directly, the following locations will be searched for credentials:
131
130
  #
132
131
  # * `Aws.config[:credentials]`
132
+ #
133
133
  # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
134
134
  # `:account_id` options.
135
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
136
- # ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
135
+ #
136
+ # * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
137
+ # `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
138
+ #
137
139
  # * `~/.aws/credentials`
140
+ #
138
141
  # * `~/.aws/config`
139
- # * EC2/ECS IMDS instance profile - When used by default, the timeouts
140
- # are very aggressive. Construct and pass an instance of
141
- # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
142
- # enable retries and extended timeouts. Instance profile credential
143
- # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
144
- # to true.
142
+ #
143
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive.
144
+ # Construct and pass an instance of `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
145
+ # enable retries and extended timeouts. Instance profile credential fetching can be disabled by
146
+ # setting `ENV['AWS_EC2_METADATA_DISABLED']` to `true`.
145
147
  #
146
148
  # @option options [required, String] :region
147
149
  # The AWS region to connect to. The configured `:region` is
@@ -169,6 +171,11 @@ module Aws::STS
169
171
  # When false, the request will raise a `RetryCapacityNotAvailableError` and will
170
172
  # not retry instead of sleeping.
171
173
  #
174
+ # @option options [Array<String>] :auth_scheme_preference
175
+ # A list of preferred authentication schemes to use when making a request. Supported values are:
176
+ # `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
177
+ # shared config as `auth_scheme_preference`, the value should be a comma-separated list.
178
+ #
172
179
  # @option options [Boolean] :client_side_monitoring (false)
173
180
  # When `true`, client-side metrics will be collected for all API requests from
174
181
  # this client.
@@ -202,8 +209,7 @@ module Aws::STS
202
209
  # accepted modes and the configuration defaults that are included.
203
210
  #
204
211
  # @option options [Boolean] :disable_host_prefix_injection (false)
205
- # Set to true to disable SDK automatically adding host prefix
206
- # to default service endpoint when available.
212
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
207
213
  #
208
214
  # @option options [Boolean] :disable_request_compression (false)
209
215
  # When set to 'true' the request body will not be compressed
@@ -256,14 +262,37 @@ module Aws::STS
256
262
  # 4 times. Used in `standard` and `adaptive` retry modes.
257
263
  #
258
264
  # @option options [String] :profile ("default")
259
- # Used when loading credentials from the shared credentials file
260
- # at HOME/.aws/credentials. When not specified, 'default' is used.
265
+ # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
266
+ # When not specified, 'default' is used.
267
+ #
268
+ # @option options [String] :request_checksum_calculation ("when_supported")
269
+ # Determines when a checksum will be calculated for request payloads. Values are:
270
+ #
271
+ # * `when_supported` - (default) When set, a checksum will be
272
+ # calculated for all request payloads of operations modeled with the
273
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
274
+ # `requestAlgorithmMember` is modeled.
275
+ # * `when_required` - When set, a checksum will only be calculated for
276
+ # request payloads of operations modeled with the `httpChecksum` trait where
277
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
278
+ # is modeled and supplied.
261
279
  #
262
280
  # @option options [Integer] :request_min_compression_size_bytes (10240)
263
281
  # The minimum size in bytes that triggers compression for request
264
282
  # bodies. The value must be non-negative integer value between 0
265
283
  # and 10485780 bytes inclusive.
266
284
  #
285
+ # @option options [String] :response_checksum_validation ("when_supported")
286
+ # Determines when checksum validation will be performed on response payloads. Values are:
287
+ #
288
+ # * `when_supported` - (default) When set, checksum validation is performed on all
289
+ # response payloads of operations modeled with the `httpChecksum` trait where
290
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
291
+ # are supported.
292
+ # * `when_required` - When set, checksum validation is not performed on
293
+ # response payloads of operations unless the checksum algorithm is supported and
294
+ # the `requestValidationModeMember` member is set to `ENABLED`.
295
+ #
267
296
  # @option options [Proc] :retry_backoff
268
297
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
269
298
  # This option is only used in the `legacy` retry mode.
@@ -352,8 +381,8 @@ module Aws::STS
352
381
  # `Aws::Telemetry::OTelProvider` for telemetry provider.
353
382
  #
354
383
  # @option options [Aws::TokenProvider] :token_provider
355
- # A Bearer Token Provider. This can be an instance of any one of the
356
- # following classes:
384
+ # Your Bearer token used for authentication. This can be any class that includes and implements
385
+ # `Aws::TokenProvider`, or instance of any one of the following classes:
357
386
  #
358
387
  # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
359
388
  # tokens.
@@ -460,8 +489,8 @@ module Aws::STS
460
489
  # token. Typically, you use `AssumeRole` within your account or for
461
490
  # cross-account access. For a comparison of `AssumeRole` with other API
462
491
  # operations that produce temporary credentials, see [Requesting
463
- # Temporary Security Credentials][1] and [Comparing the Amazon Web
464
- # Services STS API operations][2] in the *IAM User Guide*.
492
+ # Temporary Security Credentials][1] and [Compare STS credentials][2] in
493
+ # the *IAM User Guide*.
465
494
  #
466
495
  # **Permissions**
467
496
  #
@@ -470,9 +499,9 @@ module Aws::STS
470
499
  # following exception: You cannot call the Amazon Web Services STS
471
500
  # `GetFederationToken` or `GetSessionToken` API operations.
472
501
  #
473
- # (Optional) You can pass inline or managed [session policies][3] to
474
- # this operation. You can pass a single JSON policy document to use as
475
- # an inline session policy. You can also specify up to 10 managed policy
502
+ # (Optional) You can pass inline or managed session policies to this
503
+ # operation. You can pass a single JSON policy document to use as an
504
+ # inline session policy. You can also specify up to 10 managed policy
476
505
  # Amazon Resource Names (ARNs) to use as managed session policies. The
477
506
  # plaintext that you use for both inline and managed session policies
478
507
  # can't exceed 2,048 characters. Passing policies to this operation
@@ -545,7 +574,7 @@ module Aws::STS
545
574
  # denied. The condition in a trust policy that tests for MFA
546
575
  # authentication might look like the following example.
547
576
  #
548
- # `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
577
+ # `"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}`
549
578
  #
550
579
  # For more information, see [Configuring MFA-Protected API Access][8] in
551
580
  # the *IAM User Guide* guide.
@@ -558,7 +587,7 @@ module Aws::STS
558
587
  #
559
588
  #
560
589
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
561
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
590
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
562
591
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
563
592
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
564
593
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
@@ -581,10 +610,21 @@ module Aws::STS
581
610
  # credentials will expose the role session name to the external account
582
611
  # in their CloudTrail logs.
583
612
  #
613
+ # For security purposes, administrators can view this field in
614
+ # [CloudTrail logs][1] to help identify who performed an action in
615
+ # Amazon Web Services. Your administrator might require that you specify
616
+ # your user name as the session name when you assume the role. For more
617
+ # information, see [ `sts:RoleSessionName` ][2].
618
+ #
584
619
  # The regex used to validate this parameter is a string of characters
585
620
  # consisting of upper- and lower-case alphanumeric characters with no
586
621
  # spaces. You can also include underscores or any of the following
587
- # characters: =,.@-
622
+ # characters: +=,.@-
623
+ #
624
+ #
625
+ #
626
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
627
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
588
628
  #
589
629
  # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
590
630
  # The Amazon Resource Names (ARNs) of the IAM managed policies that you
@@ -651,6 +691,9 @@ module Aws::STS
651
691
  #
652
692
  # </note>
653
693
  #
694
+ # For more information about role session permissions, see [Session
695
+ # policies][1].
696
+ #
654
697
  #
655
698
  #
656
699
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
@@ -673,9 +716,8 @@ module Aws::STS
673
716
  # depending on the maximum session duration setting for your role.
674
717
  # However, if you assume a role using role chaining and provide a
675
718
  # `DurationSeconds` parameter value greater than one hour, the operation
676
- # fails. To learn how to view the maximum value for your role, see [View
677
- # the Maximum Session Duration Setting for a Role][1] in the *IAM User
678
- # Guide*.
719
+ # fails. To learn how to view the maximum value for your role, see
720
+ # [Update the maximum session duration for a role][1].
679
721
  #
680
722
  # By default, the value is set to `3600` seconds.
681
723
  #
@@ -691,7 +733,7 @@ module Aws::STS
691
733
  #
692
734
  #
693
735
  #
694
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
736
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
695
737
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
696
738
  #
697
739
  # @option params [Array<Types::Tag>] :tags
@@ -744,9 +786,8 @@ module Aws::STS
744
786
  # passes to subsequent sessions in a role chain. For more information,
745
787
  # see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
746
788
  #
747
- # This parameter is optional. When you set session tags as transitive,
748
- # the session policy and session tags packed binary limit is not
749
- # affected.
789
+ # This parameter is optional. The transitive status of a session tag
790
+ # does not impact its packed binary size.
750
791
  #
751
792
  # If you choose not to specify a transitive tag key, then no tags are
752
793
  # passed from this session to any subsequent sessions.
@@ -772,7 +813,7 @@ module Aws::STS
772
813
  # The regex used to validate this parameter is a string of characters
773
814
  # consisting of upper- and lower-case alphanumeric characters with no
774
815
  # spaces. You can also include underscores or any of the following
775
- # characters: =,.@:/-
816
+ # characters: +=,.@:\\/-
776
817
  #
777
818
  #
778
819
  #
@@ -790,7 +831,7 @@ module Aws::STS
790
831
  # The regex used to validate this parameter is a string of characters
791
832
  # consisting of upper- and lower-case alphanumeric characters with no
792
833
  # spaces. You can also include underscores or any of the following
793
- # characters: =,.@-
834
+ # characters: +=/:,.@-
794
835
  #
795
836
  # @option params [String] :token_code
796
837
  # The value provided by the MFA device, if the trust policy of the role
@@ -804,26 +845,29 @@ module Aws::STS
804
845
  #
805
846
  # @option params [String] :source_identity
806
847
  # The source identity specified by the principal that is calling the
807
- # `AssumeRole` operation.
848
+ # `AssumeRole` operation. The source identity value persists across
849
+ # [chained role][1] sessions.
808
850
  #
809
851
  # You can require users to specify a source identity when they assume a
810
- # role. You do this by using the `sts:SourceIdentity` condition key in a
811
- # role trust policy. You can use source identity information in
852
+ # role. You do this by using the [ `sts:SourceIdentity` ][2] condition
853
+ # key in a role trust policy. You can use source identity information in
812
854
  # CloudTrail logs to determine who took actions with a role. You can use
813
855
  # the `aws:SourceIdentity` condition key to further control access to
814
856
  # Amazon Web Services resources based on the value of source identity.
815
857
  # For more information about using source identity, see [Monitor and
816
- # control actions taken with assumed roles][1] in the *IAM User Guide*.
858
+ # control actions taken with assumed roles][3] in the *IAM User Guide*.
817
859
  #
818
860
  # The regex used to validate this parameter is a string of characters
819
861
  # consisting of upper- and lower-case alphanumeric characters with no
820
862
  # spaces. You can also include underscores or any of the following
821
- # characters: =,.@-. You cannot use a value that begins with the text
863
+ # characters: +=,.@-. You cannot use a value that begins with the text
822
864
  # `aws:`. This prefix is reserved for Amazon Web Services internal use.
823
865
  #
824
866
  #
825
867
  #
826
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
868
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
869
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
870
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
827
871
  #
828
872
  # @option params [Array<Types::ProvidedContext>] :provided_contexts
829
873
  # A list of previously acquired trusted context assertions in the format
@@ -834,7 +878,7 @@ module Aws::STS
834
878
  # a single trusted context assertion and the ARN of the context provider
835
879
  # from which the trusted context assertion was generated.
836
880
  #
837
- # `[\{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"\}]`
881
+ # `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
838
882
  #
839
883
  # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
840
884
  #
@@ -848,7 +892,7 @@ module Aws::STS
848
892
  #
849
893
  # resp = client.assume_role({
850
894
  # external_id: "123ABC",
851
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
895
+ # policy: "escaped-JSON-IAM-POLICY",
852
896
  # role_arn: "arn:aws:iam::123456789012:role/demo",
853
897
  # role_session_name: "testAssumeRoleSession",
854
898
  # tags: [
@@ -944,14 +988,19 @@ module Aws::STS
944
988
  # user-specific credentials or configuration. For a comparison of
945
989
  # `AssumeRoleWithSAML` with the other API operations that produce
946
990
  # temporary credentials, see [Requesting Temporary Security
947
- # Credentials][1] and [Comparing the Amazon Web Services STS API
948
- # operations][2] in the *IAM User Guide*.
991
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
992
+ # Guide*.
949
993
  #
950
994
  # The temporary security credentials returned by this operation consist
951
995
  # of an access key ID, a secret access key, and a security token.
952
996
  # Applications can use these temporary security credentials to sign
953
997
  # calls to Amazon Web Services services.
954
998
  #
999
+ # <note markdown="1"> AssumeRoleWithSAML will not work on IAM Identity Center managed roles.
1000
+ # These roles' names start with `AWSReservedSSO_`.
1001
+ #
1002
+ # </note>
1003
+ #
955
1004
  # **Session Duration**
956
1005
  #
957
1006
  # By default, the temporary security credentials created by
@@ -1075,7 +1124,7 @@ module Aws::STS
1075
1124
  #
1076
1125
  #
1077
1126
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1078
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1127
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
1079
1128
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1080
1129
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
1081
1130
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
@@ -1163,6 +1212,9 @@ module Aws::STS
1163
1212
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1164
1213
  # characters.
1165
1214
  #
1215
+ # For more information about role session permissions, see [Session
1216
+ # policies][1].
1217
+ #
1166
1218
  # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1167
1219
  # policy, managed policy ARNs, and session tags into a packed binary
1168
1220
  # format that has a separate limit. Your request can fail for this limit
@@ -1317,8 +1369,8 @@ module Aws::STS
1317
1369
  # a token from the web identity provider. For a comparison of
1318
1370
  # `AssumeRoleWithWebIdentity` with the other API operations that produce
1319
1371
  # temporary credentials, see [Requesting Temporary Security
1320
- # Credentials][4] and [Comparing the Amazon Web Services STS API
1321
- # operations][5] in the *IAM User Guide*.
1372
+ # Credentials][4] and [Compare STS credentials][5] in the *IAM User
1373
+ # Guide*.
1322
1374
  #
1323
1375
  # The temporary security credentials returned by this API consist of an
1324
1376
  # access key ID, a secret access key, and a security token. Applications
@@ -1333,9 +1385,9 @@ module Aws::STS
1333
1385
  # your session. You can provide a value from 900 seconds (15 minutes) up
1334
1386
  # to the maximum session duration setting for the role. This setting can
1335
1387
  # have a value from 1 hour to 12 hours. To learn how to view the maximum
1336
- # value for your role, see [View the Maximum Session Duration Setting
1337
- # for a Role][6] in the *IAM User Guide*. The maximum session duration
1338
- # limit applies when you use the `AssumeRole*` API operations or the
1388
+ # value for your role, see [Update the maximum session duration for a
1389
+ # role ][6] in the *IAM User Guide*. The maximum session duration limit
1390
+ # applies when you use the `AssumeRole*` API operations or the
1339
1391
  # `assume-role*` CLI commands. However the limit does not apply when you
1340
1392
  # use those operations to create a console URL. For more information,
1341
1393
  # see [Using IAM Roles][7] in the *IAM User Guide*.
@@ -1367,7 +1419,8 @@ module Aws::STS
1367
1419
  # (Optional) You can configure your IdP to pass attributes into your web
1368
1420
  # identity token as session tags. Each session tag consists of a key
1369
1421
  # name and an associated value. For more information about session tags,
1370
- # see [Passing Session Tags in STS][9] in the *IAM User Guide*.
1422
+ # see [Passing session tags using AssumeRoleWithWebIdentity][9] in the
1423
+ # *IAM User Guide*.
1371
1424
  #
1372
1425
  # You can pass up to 50 session tags. The plaintext session tag keys
1373
1426
  # can’t exceed 128 characters and the values can’t exceed 256
@@ -1413,38 +1466,29 @@ module Aws::STS
1413
1466
  # instead use a GUID or a pairwise identifier, as [suggested in the OIDC
1414
1467
  # specification][14].
1415
1468
  #
1416
- # For more information about how to use web identity federation and the
1469
+ # For more information about how to use OIDC federation and the
1417
1470
  # `AssumeRoleWithWebIdentity` API, see the following resources:
1418
1471
  #
1419
1472
  # * [Using Web Identity Federation API Operations for Mobile Apps][15]
1420
1473
  # and [Federation Through a Web-based Identity Provider][16].
1421
1474
  #
1422
- # * [ Web Identity Federation Playground][17]. Walk through the process
1423
- # of authenticating through Login with Amazon, Facebook, or Google,
1424
- # getting temporary security credentials, and then using those
1425
- # credentials to make a request to Amazon Web Services.
1426
- #
1427
1475
  # * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
1428
1476
  # Services SDK for Android Developer Guide][3]. These toolkits contain
1429
1477
  # sample apps that show how to invoke the identity providers. The
1430
1478
  # toolkits then show how to use the information from these providers
1431
1479
  # to get and use temporary security credentials.
1432
1480
  #
1433
- # * [Web Identity Federation with Mobile Applications][18]. This article
1434
- # discusses web identity federation and shows an example of how to use
1435
- # web identity federation to get access to content in Amazon S3.
1436
- #
1437
1481
  #
1438
1482
  #
1439
1483
  # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
1440
1484
  # [2]: http://aws.amazon.com/sdkforios/
1441
1485
  # [3]: http://aws.amazon.com/sdkforandroid/
1442
1486
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1443
- # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1444
- # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1487
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
1488
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
1445
1489
  # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
1446
1490
  # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1447
- # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
1491
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_adding-assume-role-idp
1448
1492
  # [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
1449
1493
  # [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
1450
1494
  # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
@@ -1452,13 +1496,29 @@ module Aws::STS
1452
1496
  # [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
1453
1497
  # [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
1454
1498
  # [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1455
- # [17]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
1456
- # [18]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
1457
1499
  #
1458
1500
  # @option params [required, String] :role_arn
1459
1501
  # The Amazon Resource Name (ARN) of the role that the caller is
1460
1502
  # assuming.
1461
1503
  #
1504
+ # <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools that
1505
+ # assume [cross-account IAM roles][1]. The trust policies of these roles
1506
+ # must accept the `cognito-identity.amazonaws.com` service principal and
1507
+ # must contain the `cognito-identity.amazonaws.com:aud` condition key to
1508
+ # restrict role assumption to users from your intended identity pools. A
1509
+ # policy that trusts Amazon Cognito identity pools without this
1510
+ # condition creates a risk that a user from an unintended identity pool
1511
+ # can assume the role. For more information, see [ Trust policies for
1512
+ # IAM roles in Basic (Classic) authentication ][2] in the *Amazon
1513
+ # Cognito Developer Guide*.
1514
+ #
1515
+ # </note>
1516
+ #
1517
+ #
1518
+ #
1519
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
1520
+ # [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
1521
+ #
1462
1522
  # @option params [required, String] :role_session_name
1463
1523
  # An identifier for the assumed role session. Typically, you pass the
1464
1524
  # name or identifier that is associated with the user who is using your
@@ -1467,18 +1527,31 @@ module Aws::STS
1467
1527
  # is included as part of the ARN and assumed role ID in the
1468
1528
  # `AssumedRoleUser` response element.
1469
1529
  #
1530
+ # For security purposes, administrators can view this field in
1531
+ # [CloudTrail logs][1] to help identify who performed an action in
1532
+ # Amazon Web Services. Your administrator might require that you specify
1533
+ # your user name as the session name when you assume the role. For more
1534
+ # information, see [ `sts:RoleSessionName` ][2].
1535
+ #
1470
1536
  # The regex used to validate this parameter is a string of characters
1471
1537
  # consisting of upper- and lower-case alphanumeric characters with no
1472
1538
  # spaces. You can also include underscores or any of the following
1473
1539
  # characters: =,.@-
1474
1540
  #
1541
+ #
1542
+ #
1543
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
1544
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
1545
+ #
1475
1546
  # @option params [required, String] :web_identity_token
1476
1547
  # The OAuth 2.0 access token or OpenID Connect ID token that is provided
1477
1548
  # by the identity provider. Your application must get this token by
1478
1549
  # authenticating the user who is using your application with a web
1479
1550
  # identity provider before the application makes an
1480
- # `AssumeRoleWithWebIdentity` call. Only tokens with RSA algorithms
1481
- # (RS256) are supported.
1551
+ # `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
1552
+ # formatted as either an integer or a long integer. Tokens must be
1553
+ # signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
1554
+ # (ES256, ES384, or ES512).
1482
1555
  #
1483
1556
  # @option params [String] :provider_id
1484
1557
  # The fully qualified host component of the domain name of the OAuth 2.0
@@ -1547,6 +1620,9 @@ module Aws::STS
1547
1620
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1548
1621
  # characters.
1549
1622
  #
1623
+ # For more information about role session permissions, see [Session
1624
+ # policies][1].
1625
+ #
1550
1626
  # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1551
1627
  # policy, managed policy ARNs, and session tags into a packed binary
1552
1628
  # format that has a separate limit. Your request can fail for this limit
@@ -1603,7 +1679,7 @@ module Aws::STS
1603
1679
  #
1604
1680
  # resp = client.assume_role_with_web_identity({
1605
1681
  # duration_seconds: 3600,
1606
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
1682
+ # policy: "escaped-JSON-IAM-POLICY",
1607
1683
  # provider_id: "www.amazon.com",
1608
1684
  # role_arn: "arn:aws:iam::123456789012:role/FederatedWebIdentityRole",
1609
1685
  # role_session_name: "app1",
@@ -1667,6 +1743,134 @@ module Aws::STS
1667
1743
  req.send_request(options)
1668
1744
  end
1669
1745
 
1746
+ # Returns a set of short term credentials you can use to perform
1747
+ # privileged tasks on a member account in your organization. You must
1748
+ # use credentials from an Organizations management account or a
1749
+ # delegated administrator account for IAM to call `AssumeRoot`. You
1750
+ # cannot use root user credentials to make this call.
1751
+ #
1752
+ # Before you can launch a privileged session, you must have centralized
1753
+ # root access in your organization. For steps to enable this feature,
1754
+ # see [Centralize root access for member accounts][1] in the *IAM User
1755
+ # Guide*.
1756
+ #
1757
+ # <note markdown="1"> The STS global endpoint is not supported for AssumeRoot. You must send
1758
+ # this request to a Regional STS endpoint. For more information, see
1759
+ # [Endpoints][2].
1760
+ #
1761
+ # </note>
1762
+ #
1763
+ # You can track AssumeRoot in CloudTrail logs to determine what actions
1764
+ # were performed in a session. For more information, see [Track
1765
+ # privileged tasks in CloudTrail][3] in the *IAM User Guide*.
1766
+ #
1767
+ # When granting access to privileged tasks you should only grant the
1768
+ # necessary permissions required to perform that task. For more
1769
+ # information, see [Security best practices in IAM][4]. In addition, you
1770
+ # can use [service control policies][5] (SCPs) to manage and limit
1771
+ # permissions in your organization. See [General examples][6] in the
1772
+ # *Organizations User Guide* for more information on SCPs.
1773
+ #
1774
+ #
1775
+ #
1776
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
1777
+ # [2]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
1778
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
1779
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
1780
+ # [5]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html
1781
+ # [6]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_general.html
1782
+ #
1783
+ # @option params [required, String] :target_principal
1784
+ # The member account principal ARN or account ID.
1785
+ #
1786
+ # @option params [required, Types::PolicyDescriptorType] :task_policy_arn
1787
+ # The identity based policy that scopes the session to the privileged
1788
+ # tasks that can be performed. You must use one of following Amazon Web
1789
+ # Services managed policies to scope root session actions:
1790
+ #
1791
+ # * [IAMAuditRootUserCredentials][1]
1792
+ #
1793
+ # * [IAMCreateRootUserPassword][2]
1794
+ #
1795
+ # * [IAMDeleteRootUserCredentials][3]
1796
+ #
1797
+ # * [S3UnlockBucketPolicy][4]
1798
+ #
1799
+ # * [SQSUnlockQueuePolicy][5]
1800
+ #
1801
+ #
1802
+ #
1803
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
1804
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
1805
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
1806
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
1807
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
1808
+ #
1809
+ # @option params [Integer] :duration_seconds
1810
+ # The duration, in seconds, of the privileged session. The value can
1811
+ # range from 0 seconds up to the maximum session duration of 900 seconds
1812
+ # (15 minutes). If you specify a value higher than this setting, the
1813
+ # operation fails.
1814
+ #
1815
+ # By default, the value is set to `900` seconds.
1816
+ #
1817
+ # @return [Types::AssumeRootResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1818
+ #
1819
+ # * {Types::AssumeRootResponse#credentials #credentials} => Types::Credentials
1820
+ # * {Types::AssumeRootResponse#source_identity #source_identity} => String
1821
+ #
1822
+ #
1823
+ # @example Example: To launch a privileged session
1824
+ #
1825
+ # # The following command retrieves a set of short-term credentials you can use to unlock an S3 bucket for a member account
1826
+ # # by removing the bucket policy.
1827
+ #
1828
+ # resp = client.assume_root({
1829
+ # duration_seconds: 900,
1830
+ # target_principal: "111122223333",
1831
+ # task_policy_arn: {
1832
+ # arn: "arn:aws:iam::aws:policy/root-task/S3UnlockBucketPolicy",
1833
+ # },
1834
+ # })
1835
+ #
1836
+ # resp.to_h outputs the following:
1837
+ # {
1838
+ # credentials: {
1839
+ # access_key_id: "ASIAJEXAMPLEXEG2JICEA",
1840
+ # expiration: Time.parse("2024-11-15T00:05:07Z"),
1841
+ # secret_access_key: "9drTJvcXLB89EXAMPLELB8923FB892xMFI",
1842
+ # session_token: "AQoXdzELDDY//////////wEaoAK1wvxJY12r2IrDFT2IvAzTCn3zHoZ7YNtpiQLF0MqZye/qwjzP2iEXAMPLEbw/m3hsj8VBTkPORGvr9jM5sgP+w9IZWZnU+LWhmg+a5fDi2oTGUYcdg9uexQ4mtCHIHfi4citgqZTgco40Yqr4lIlo4V2b2Dyauk0eYFNebHtYlFVgAUj+7Indz3LU0aTWk1WKIjHmmMCIoTkyYp/k7kUG7moeEYKSitwQIi6Gjn+nyzM+PtoA3685ixzv0R7i5rjQi0YE0lf1oeie3bDiNHncmzosRM6SFiPzSvp6h/32xQuZsjcypmwsPSDtTPYcs0+YN/8BRi2/IcrxSpnWEXAMPLEXSDFTAQAM6Dl9zR0tXoybnlrZIwMLlMi1Kcgo5OytwU=",
1843
+ # },
1844
+ # source_identity: "Alice",
1845
+ # }
1846
+ #
1847
+ # @example Request syntax with placeholder values
1848
+ #
1849
+ # resp = client.assume_root({
1850
+ # target_principal: "TargetPrincipalType", # required
1851
+ # task_policy_arn: { # required
1852
+ # arn: "arnType",
1853
+ # },
1854
+ # duration_seconds: 1,
1855
+ # })
1856
+ #
1857
+ # @example Response structure
1858
+ #
1859
+ # resp.credentials.access_key_id #=> String
1860
+ # resp.credentials.secret_access_key #=> String
1861
+ # resp.credentials.session_token #=> String
1862
+ # resp.credentials.expiration #=> Time
1863
+ # resp.source_identity #=> String
1864
+ #
1865
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoot AWS API Documentation
1866
+ #
1867
+ # @overload assume_root(params = {})
1868
+ # @param [Hash] params ({})
1869
+ def assume_root(params = {}, options = {})
1870
+ req = build_request(:assume_root, params)
1871
+ req.send_request(options)
1872
+ end
1873
+
1670
1874
  # Decodes additional information about the authorization status of a
1671
1875
  # request from an encoded message returned in response to an Amazon Web
1672
1876
  # Services request.
@@ -1893,6 +2097,46 @@ module Aws::STS
1893
2097
  req.send_request(options)
1894
2098
  end
1895
2099
 
2100
+ # Exchanges a trade-in token for temporary Amazon Web Services
2101
+ # credentials with the permissions associated with the assumed
2102
+ # principal. This operation allows you to obtain credentials for a
2103
+ # specific principal based on a trade-in token, enabling delegation of
2104
+ # access to Amazon Web Services resources.
2105
+ #
2106
+ # @option params [required, String] :trade_in_token
2107
+ # The token to exchange for temporary Amazon Web Services credentials.
2108
+ # This token must be valid and unexpired at the time of the request.
2109
+ #
2110
+ # @return [Types::GetDelegatedAccessTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2111
+ #
2112
+ # * {Types::GetDelegatedAccessTokenResponse#credentials #credentials} => Types::Credentials
2113
+ # * {Types::GetDelegatedAccessTokenResponse#packed_policy_size #packed_policy_size} => Integer
2114
+ # * {Types::GetDelegatedAccessTokenResponse#assumed_principal #assumed_principal} => String
2115
+ #
2116
+ # @example Request syntax with placeholder values
2117
+ #
2118
+ # resp = client.get_delegated_access_token({
2119
+ # trade_in_token: "tradeInTokenType", # required
2120
+ # })
2121
+ #
2122
+ # @example Response structure
2123
+ #
2124
+ # resp.credentials.access_key_id #=> String
2125
+ # resp.credentials.secret_access_key #=> String
2126
+ # resp.credentials.session_token #=> String
2127
+ # resp.credentials.expiration #=> Time
2128
+ # resp.packed_policy_size #=> Integer
2129
+ # resp.assumed_principal #=> String
2130
+ #
2131
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetDelegatedAccessToken AWS API Documentation
2132
+ #
2133
+ # @overload get_delegated_access_token(params = {})
2134
+ # @param [Hash] params ({})
2135
+ def get_delegated_access_token(params = {}, options = {})
2136
+ req = build_request(:get_delegated_access_token, params)
2137
+ req.send_request(options)
2138
+ end
2139
+
1896
2140
  # Returns a set of temporary security credentials (consisting of an
1897
2141
  # access key ID, a secret access key, and a security token) for a user.
1898
2142
  # A typical use is in a proxy application that gets temporary security
@@ -1905,8 +2149,8 @@ module Aws::STS
1905
2149
  # usually in a server-based application. For a comparison of
1906
2150
  # `GetFederationToken` with the other API operations that produce
1907
2151
  # temporary credentials, see [Requesting Temporary Security
1908
- # Credentials][1] and [Comparing the Amazon Web Services STS API
1909
- # operations][2] in the *IAM User Guide*.
2152
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
2153
+ # Guide*.
1910
2154
  #
1911
2155
  # Although it is possible to call `GetFederationToken` using the
1912
2156
  # security credentials of an Amazon Web Services account root user
@@ -2003,7 +2247,7 @@ module Aws::STS
2003
2247
  #
2004
2248
  #
2005
2249
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
2006
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
2250
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
2007
2251
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
2008
2252
  # [4]: http://aws.amazon.com/cognito/
2009
2253
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
@@ -2175,7 +2419,7 @@ module Aws::STS
2175
2419
  # resp = client.get_federation_token({
2176
2420
  # duration_seconds: 3600,
2177
2421
  # name: "testFedUserSession",
2178
- # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
2422
+ # policy: "escaped-JSON-IAM-POLICY",
2179
2423
  # tags: [
2180
2424
  # {
2181
2425
  # key: "Project",
@@ -2255,8 +2499,8 @@ module Aws::STS
2255
2499
  # An incorrect MFA code causes the API to return an access denied error.
2256
2500
  # For a comparison of `GetSessionToken` with the other API operations
2257
2501
  # that produce temporary credentials, see [Requesting Temporary Security
2258
- # Credentials][1] and [Comparing the Amazon Web Services STS API
2259
- # operations][2] in the *IAM User Guide*.
2502
+ # Credentials][1] and [Compare STS credentials][2] in the *IAM User
2503
+ # Guide*.
2260
2504
  #
2261
2505
  # <note markdown="1"> No permissions are required for users to perform this operation. The
2262
2506
  # purpose of the `sts:GetSessionToken` operation is to authenticate the
@@ -2311,7 +2555,7 @@ module Aws::STS
2311
2555
  #
2312
2556
  #
2313
2557
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
2314
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
2558
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
2315
2559
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
2316
2560
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
2317
2561
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
@@ -2398,6 +2642,71 @@ module Aws::STS
2398
2642
  req.send_request(options)
2399
2643
  end
2400
2644
 
2645
+ # Returns a signed JSON Web Token (JWT) that represents the calling
2646
+ # Amazon Web Services identity. The returned JWT can be used to
2647
+ # authenticate with external services that support OIDC discovery. The
2648
+ # token is signed by Amazon Web Services STS and can be publicly
2649
+ # verified using the verification keys published at the issuer's JWKS
2650
+ # endpoint.
2651
+ #
2652
+ # @option params [required, Array<String>] :audience
2653
+ # The intended recipient of the web identity token. This value populates
2654
+ # the `aud` claim in the JWT and should identify the service or
2655
+ # application that will validate and use the token. The external service
2656
+ # should verify this claim to ensure the token was intended for their
2657
+ # use.
2658
+ #
2659
+ # @option params [Integer] :duration_seconds
2660
+ # The duration, in seconds, for which the JSON Web Token (JWT) will
2661
+ # remain valid. The value can range from 60 seconds (1 minute) to 3600
2662
+ # seconds (1 hour). If not specified, the default duration is 300
2663
+ # seconds (5 minutes). The token is designed to be short-lived and
2664
+ # should be used for proof of identity, then exchanged for credentials
2665
+ # or short-lived tokens in the external service.
2666
+ #
2667
+ # @option params [required, String] :signing_algorithm
2668
+ # The cryptographic algorithm to use for signing the JSON Web Token
2669
+ # (JWT). Valid values are RS256 (RSA with SHA-256) and ES384 (ECDSA
2670
+ # using P-384 curve with SHA-384).
2671
+ #
2672
+ # @option params [Array<Types::Tag>] :tags
2673
+ # An optional list of tags to include in the JSON Web Token (JWT). These
2674
+ # tags are added as custom claims to the JWT and can be used by the
2675
+ # downstream service for authorization decisions.
2676
+ #
2677
+ # @return [Types::GetWebIdentityTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2678
+ #
2679
+ # * {Types::GetWebIdentityTokenResponse#web_identity_token #web_identity_token} => String
2680
+ # * {Types::GetWebIdentityTokenResponse#expiration #expiration} => Time
2681
+ #
2682
+ # @example Request syntax with placeholder values
2683
+ #
2684
+ # resp = client.get_web_identity_token({
2685
+ # audience: ["webIdentityTokenAudienceStringType"], # required
2686
+ # duration_seconds: 1,
2687
+ # signing_algorithm: "jwtAlgorithmType", # required
2688
+ # tags: [
2689
+ # {
2690
+ # key: "tagKeyType", # required
2691
+ # value: "tagValueType", # required
2692
+ # },
2693
+ # ],
2694
+ # })
2695
+ #
2696
+ # @example Response structure
2697
+ #
2698
+ # resp.web_identity_token #=> String
2699
+ # resp.expiration #=> Time
2700
+ #
2701
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetWebIdentityToken AWS API Documentation
2702
+ #
2703
+ # @overload get_web_identity_token(params = {})
2704
+ # @param [Hash] params ({})
2705
+ def get_web_identity_token(params = {}, options = {})
2706
+ req = build_request(:get_web_identity_token, params)
2707
+ req.send_request(options)
2708
+ end
2709
+
2401
2710
  # @!endgroup
2402
2711
 
2403
2712
  # @param params ({})
@@ -2416,7 +2725,7 @@ module Aws::STS
2416
2725
  tracer: tracer
2417
2726
  )
2418
2727
  context[:gem_name] = 'aws-sdk-core'
2419
- context[:gem_version] = '3.209.1'
2728
+ context[:gem_version] = '3.240.0'
2420
2729
  Seahorse::Client::Request.new(handlers, context)
2421
2730
  end
2422
2731