aws-sdk-core 3.260.0 → 3.271.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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +85 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-core/json/error_handler.rb +1 -1
  5. data/lib/aws-sdk-core/log/formatter.rb +3 -2
  6. data/lib/aws-sdk-core/log/param_filter.rb +73 -9
  7. data/lib/aws-sdk-core/login_credentials.rb +21 -6
  8. data/lib/aws-sdk-core/pageable_response.rb +8 -1
  9. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +53 -20
  10. data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +8 -9
  11. data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +3 -9
  12. data/lib/aws-sdk-core/plugins/retry_errors.rb +36 -49
  13. data/lib/aws-sdk-core/plugins/stub_responses.rb +1 -1
  14. data/lib/aws-sdk-core/plugins/user_agent.rb +2 -1
  15. data/lib/aws-sdk-core/response.rb +23 -0
  16. data/lib/aws-sdk-core/rest/response/headers.rb +4 -3
  17. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +1 -1
  18. data/lib/aws-sdk-core/xml/error_handler.rb +1 -1
  19. data/lib/aws-sdk-core.rb +1 -0
  20. data/lib/aws-sdk-signin/client.rb +503 -75
  21. data/lib/aws-sdk-signin/client_api.rb +218 -3
  22. data/lib/aws-sdk-signin/endpoints.rb +55 -0
  23. data/lib/aws-sdk-signin/errors.rb +67 -0
  24. data/lib/aws-sdk-signin/types.rb +611 -132
  25. data/lib/aws-sdk-signin.rb +2 -2
  26. data/lib/aws-sdk-sso/client.rb +7 -6
  27. data/lib/aws-sdk-sso.rb +1 -1
  28. data/lib/aws-sdk-ssooidc/client.rb +7 -6
  29. data/lib/aws-sdk-ssooidc.rb +1 -1
  30. data/lib/aws-sdk-sts/client.rb +240 -122
  31. data/lib/aws-sdk-sts/client_api.rb +84 -0
  32. data/lib/aws-sdk-sts/errors.rb +57 -0
  33. data/lib/aws-sdk-sts/types.rb +461 -141
  34. data/lib/aws-sdk-sts.rb +1 -1
  35. data/lib/seahorse/client/configuration.rb +68 -1
  36. data/lib/seahorse/client/h2/connection.rb +9 -1
  37. data/lib/seahorse/client/http/request.rb +19 -0
  38. data/lib/seahorse/client/net_http/handler.rb +1 -1
  39. data/lib/seahorse/model/shapes.rb +6 -6
  40. metadata +2 -1
@@ -25,7 +25,7 @@ Aws::Plugins::GlobalConfiguration.add_identifier(:signin)
25
25
  # structure.
26
26
  #
27
27
  # signin = Aws::Signin::Client.new
28
- # resp = signin.create_o_auth_2_token(params)
28
+ # resp = signin.batch_revoke_sessions(params)
29
29
  #
30
30
  # See {Client} for more information.
31
31
  #
@@ -56,7 +56,7 @@ module Aws::Signin
56
56
  autoload :EndpointProvider, 'aws-sdk-signin/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-signin/endpoints'
58
58
 
59
- GEM_VERSION = '3.260.0'
59
+ GEM_VERSION = '3.271.0'
60
60
 
61
61
  end
62
62
 
@@ -264,7 +264,8 @@ module Aws::SSO
264
264
  # An integer representing the maximum number attempts that will be made for
265
265
  # a single request, including the initial attempt. For example,
266
266
  # setting this value to 5 will result in a request being retried up to
267
- # 4 times. Used in `standard` and `adaptive` retry modes.
267
+ # 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
268
+ # except for DynamoDB and DynamoDB Streams, which default to 4.
268
269
  #
269
270
  # @option options [String] :profile ("default")
270
271
  # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
@@ -327,15 +328,15 @@ module Aws::SSO
327
328
  # used by the default backoff function. This option is only used in the
328
329
  # `legacy` retry mode.
329
330
  #
330
- # @option options [String] :retry_mode ("legacy")
331
+ # @option options [String] :retry_mode ("standard")
331
332
  # Specifies which retry algorithm to use. Values are:
332
333
  #
333
- # * `legacy` - The pre-existing retry behavior. This is the default
334
- # value if no retry mode is provided.
334
+ # * `legacy` - The pre-existing retry behavior.
335
335
  #
336
336
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
337
337
  # This includes support for retry quotas, which limit the number of
338
- # unsuccessful retries a client can make.
338
+ # unsuccessful retries a client can make. This is the default value
339
+ # if no retry mode is provided.
339
340
  #
340
341
  # * `adaptive` - A retry mode that includes all the functionality of
341
342
  # `standard` mode along with automatic client side throttling.
@@ -703,7 +704,7 @@ module Aws::SSO
703
704
  tracer: tracer
704
705
  )
705
706
  context[:gem_name] = 'aws-sdk-core'
706
- context[:gem_version] = '3.260.0'
707
+ context[:gem_version] = '3.271.0'
707
708
  Seahorse::Client::Request.new(handlers, context)
708
709
  end
709
710
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.260.0'
59
+ GEM_VERSION = '3.271.0'
60
60
 
61
61
  end
62
62
 
@@ -264,7 +264,8 @@ module Aws::SSOOIDC
264
264
  # An integer representing the maximum number attempts that will be made for
265
265
  # a single request, including the initial attempt. For example,
266
266
  # setting this value to 5 will result in a request being retried up to
267
- # 4 times. Used in `standard` and `adaptive` retry modes.
267
+ # 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
268
+ # except for DynamoDB and DynamoDB Streams, which default to 4.
268
269
  #
269
270
  # @option options [String] :profile ("default")
270
271
  # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
@@ -327,15 +328,15 @@ module Aws::SSOOIDC
327
328
  # used by the default backoff function. This option is only used in the
328
329
  # `legacy` retry mode.
329
330
  #
330
- # @option options [String] :retry_mode ("legacy")
331
+ # @option options [String] :retry_mode ("standard")
331
332
  # Specifies which retry algorithm to use. Values are:
332
333
  #
333
- # * `legacy` - The pre-existing retry behavior. This is the default
334
- # value if no retry mode is provided.
334
+ # * `legacy` - The pre-existing retry behavior.
335
335
  #
336
336
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
337
337
  # This includes support for retry quotas, which limit the number of
338
- # unsuccessful retries a client can make.
338
+ # unsuccessful retries a client can make. This is the default value
339
+ # if no retry mode is provided.
339
340
  #
340
341
  # * `adaptive` - A retry mode that includes all the functionality of
341
342
  # `standard` mode along with automatic client side throttling.
@@ -1086,7 +1087,7 @@ module Aws::SSOOIDC
1086
1087
  tracer: tracer
1087
1088
  )
1088
1089
  context[:gem_name] = 'aws-sdk-core'
1089
- context[:gem_version] = '3.260.0'
1090
+ context[:gem_version] = '3.271.0'
1090
1091
  Seahorse::Client::Request.new(handlers, context)
1091
1092
  end
1092
1093
 
@@ -56,7 +56,7 @@ module Aws::SSOOIDC
56
56
  autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
58
58
 
59
- GEM_VERSION = '3.260.0'
59
+ GEM_VERSION = '3.271.0'
60
60
 
61
61
  end
62
62
 
@@ -266,7 +266,8 @@ module Aws::STS
266
266
  # An integer representing the maximum number attempts that will be made for
267
267
  # a single request, including the initial attempt. For example,
268
268
  # setting this value to 5 will result in a request being retried up to
269
- # 4 times. Used in `standard` and `adaptive` retry modes.
269
+ # 4 times. Used in `standard` and `adaptive` retry modes. Defaults to 3,
270
+ # except for DynamoDB and DynamoDB Streams, which default to 4.
270
271
  #
271
272
  # @option options [String] :profile ("default")
272
273
  # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
@@ -329,15 +330,15 @@ module Aws::STS
329
330
  # used by the default backoff function. This option is only used in the
330
331
  # `legacy` retry mode.
331
332
  #
332
- # @option options [String] :retry_mode ("legacy")
333
+ # @option options [String] :retry_mode ("standard")
333
334
  # Specifies which retry algorithm to use. Values are:
334
335
  #
335
- # * `legacy` - The pre-existing retry behavior. This is the default
336
- # value if no retry mode is provided.
336
+ # * `legacy` - The pre-existing retry behavior.
337
337
  #
338
338
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
339
339
  # This includes support for retry quotas, which limit the number of
340
- # unsuccessful retries a client can make.
340
+ # unsuccessful retries a client can make. This is the default value
341
+ # if no retry mode is provided.
341
342
  #
342
343
  # * `adaptive` - A retry mode that includes all the functionality of
343
344
  # `standard` mode along with automatic client side throttling.
@@ -642,15 +643,6 @@ module Aws::STS
642
643
  # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
643
644
  # Service Namespaces][1] in the Amazon Web Services General Reference.
644
645
  #
645
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
646
- # policy, managed policy ARNs, and session tags into a packed binary
647
- # format that has a separate limit. Your request can fail for this limit
648
- # even if your plaintext meets the other requirements. The
649
- # `PackedPolicySize` response element indicates by percentage how close
650
- # the policies and tags for your request are to the upper size limit.
651
- #
652
- # </note>
653
- #
654
646
  # Passing policies to this operation returns new temporary credentials.
655
647
  # The resulting session's permissions are the intersection of the
656
648
  # role's identity-based policy and the session policies. You can use
@@ -687,15 +679,6 @@ module Aws::STS
687
679
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
688
680
  # characters.
689
681
  #
690
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
691
- # policy, managed policy ARNs, and session tags into a packed binary
692
- # format that has a separate limit. Your request can fail for this limit
693
- # even if your plaintext meets the other requirements. The
694
- # `PackedPolicySize` response element indicates by percentage how close
695
- # the policies and tags for your request are to the upper size limit.
696
- #
697
- # </note>
698
- #
699
682
  # For more information about role session permissions, see [Session
700
683
  # policies][1].
701
684
  #
@@ -752,15 +735,6 @@ module Aws::STS
752
735
  # can’t exceed 256 characters. For these and additional limits, see [IAM
753
736
  # and STS Character Limits][2] in the *IAM User Guide*.
754
737
  #
755
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
756
- # policy, managed policy ARNs, and session tags into a packed binary
757
- # format that has a separate limit. Your request can fail for this limit
758
- # even if your plaintext meets the other requirements. The
759
- # `PackedPolicySize` response element indicates by percentage how close
760
- # the policies and tags for your request are to the upper size limit.
761
- #
762
- # </note>
763
- #
764
738
  # You can pass a session tag with the same key as a tag that is already
765
739
  # attached to the role. When you do, session tags override a role tag
766
740
  # with the same key.
@@ -1093,15 +1067,6 @@ module Aws::STS
1093
1067
  # characters. For these and additional limits, see [IAM and STS
1094
1068
  # Character Limits][8] in the *IAM User Guide*.
1095
1069
  #
1096
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1097
- # policy, managed policy ARNs, and session tags into a packed binary
1098
- # format that has a separate limit. Your request can fail for this limit
1099
- # even if your plaintext meets the other requirements. The
1100
- # `PackedPolicySize` response element indicates by percentage how close
1101
- # the policies and tags for your request are to the upper size limit.
1102
- #
1103
- # </note>
1104
- #
1105
1070
  # You can pass a session tag with the same key as a tag that is attached
1106
1071
  # to the role. When you do, session tags override the role's tags with
1107
1072
  # the same key.
@@ -1184,15 +1149,6 @@ module Aws::STS
1184
1149
  # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
1185
1150
  # Service Namespaces][1] in the Amazon Web Services General Reference.
1186
1151
  #
1187
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1188
- # policy, managed policy ARNs, and session tags into a packed binary
1189
- # format that has a separate limit. Your request can fail for this limit
1190
- # even if your plaintext meets the other requirements. The
1191
- # `PackedPolicySize` response element indicates by percentage how close
1192
- # the policies and tags for your request are to the upper size limit.
1193
- #
1194
- # </note>
1195
- #
1196
1152
  # Passing policies to this operation returns new temporary credentials.
1197
1153
  # The resulting session's permissions are the intersection of the
1198
1154
  # role's identity-based policy and the session policies. You can use
@@ -1232,15 +1188,6 @@ module Aws::STS
1232
1188
  # For more information about role session permissions, see [Session
1233
1189
  # policies][1].
1234
1190
  #
1235
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1236
- # policy, managed policy ARNs, and session tags into a packed binary
1237
- # format that has a separate limit. Your request can fail for this limit
1238
- # even if your plaintext meets the other requirements. The
1239
- # `PackedPolicySize` response element indicates by percentage how close
1240
- # the policies and tags for your request are to the upper size limit.
1241
- #
1242
- # </note>
1243
- #
1244
1191
  #
1245
1192
  #
1246
1193
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
@@ -1296,6 +1243,7 @@ module Aws::STS
1296
1243
  # * {Types::AssumeRoleWithSAMLResponse#source_identity #source_identity} => String
1297
1244
  # * {Types::AssumeRoleWithSAMLResponse#session_token_utilization #session_token_utilization} => Integer
1298
1245
  # * {Types::AssumeRoleWithSAMLResponse#session_token_size #session_token_size} => Integer
1246
+ # * {Types::AssumeRoleWithSAMLResponse#trusted_identity_propagation_context #trusted_identity_propagation_context} => Types::TrustedIdentityPropagationContext
1299
1247
  #
1300
1248
  #
1301
1249
  # @example Example: To assume a role using a SAML assertion
@@ -1360,6 +1308,12 @@ module Aws::STS
1360
1308
  # resp.source_identity #=> String
1361
1309
  # resp.session_token_utilization #=> Integer
1362
1310
  # resp.session_token_size #=> Integer
1311
+ # resp.trusted_identity_propagation_context.origin_identity.subject #=> String
1312
+ # resp.trusted_identity_propagation_context.origin_identity.subject_type #=> String
1313
+ # resp.trusted_identity_propagation_context.origin_identity.issuer #=> String
1314
+ # resp.trusted_identity_propagation_context.origin_identity.federated_provider_arn #=> String
1315
+ # resp.trusted_identity_propagation_context.transaction_context.identity_provider #=> Hash
1316
+ # resp.trusted_identity_propagation_context.transaction_context.identity_provider["transactionContextKeyType"] #=> String
1363
1317
  #
1364
1318
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML AWS API Documentation
1365
1319
  #
@@ -1456,15 +1410,6 @@ module Aws::STS
1456
1410
  # characters. For these and additional limits, see [IAM and STS
1457
1411
  # Character Limits][10] in the *IAM User Guide*.
1458
1412
  #
1459
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1460
- # policy, managed policy ARNs, and session tags into a packed binary
1461
- # format that has a separate limit. Your request can fail for this limit
1462
- # even if your plaintext meets the other requirements. The
1463
- # `PackedPolicySize` response element indicates by percentage how close
1464
- # the policies and tags for your request are to the upper size limit.
1465
- #
1466
- # </note>
1467
- #
1468
1413
  # You can pass a session tag with the same key as a tag that is attached
1469
1414
  # to the role. When you do, the session tag overrides the role tag with
1470
1415
  # the same key.
@@ -1604,15 +1549,6 @@ module Aws::STS
1604
1549
  # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
1605
1550
  # Service Namespaces][1] in the Amazon Web Services General Reference.
1606
1551
  #
1607
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1608
- # policy, managed policy ARNs, and session tags into a packed binary
1609
- # format that has a separate limit. Your request can fail for this limit
1610
- # even if your plaintext meets the other requirements. The
1611
- # `PackedPolicySize` response element indicates by percentage how close
1612
- # the policies and tags for your request are to the upper size limit.
1613
- #
1614
- # </note>
1615
- #
1616
1552
  # Passing policies to this operation returns new temporary credentials.
1617
1553
  # The resulting session's permissions are the intersection of the
1618
1554
  # role's identity-based policy and the session policies. You can use
@@ -1652,15 +1588,6 @@ module Aws::STS
1652
1588
  # For more information about role session permissions, see [Session
1653
1589
  # policies][1].
1654
1590
  #
1655
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
1656
- # policy, managed policy ARNs, and session tags into a packed binary
1657
- # format that has a separate limit. Your request can fail for this limit
1658
- # even if your plaintext meets the other requirements. The
1659
- # `PackedPolicySize` response element indicates by percentage how close
1660
- # the policies and tags for your request are to the upper size limit.
1661
- #
1662
- # </note>
1663
- #
1664
1591
  #
1665
1592
  #
1666
1593
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
@@ -1711,6 +1638,7 @@ module Aws::STS
1711
1638
  # * {Types::AssumeRoleWithWebIdentityResponse#source_identity #source_identity} => String
1712
1639
  # * {Types::AssumeRoleWithWebIdentityResponse#session_token_utilization #session_token_utilization} => Integer
1713
1640
  # * {Types::AssumeRoleWithWebIdentityResponse#session_token_size #session_token_size} => Integer
1641
+ # * {Types::AssumeRoleWithWebIdentityResponse#trusted_identity_propagation_context #trusted_identity_propagation_context} => Types::TrustedIdentityPropagationContext
1714
1642
  #
1715
1643
  #
1716
1644
  # @example Example: To assume a role as an OpenID Connect-federated user
@@ -1774,6 +1702,12 @@ module Aws::STS
1774
1702
  # resp.source_identity #=> String
1775
1703
  # resp.session_token_utilization #=> Integer
1776
1704
  # resp.session_token_size #=> Integer
1705
+ # resp.trusted_identity_propagation_context.origin_identity.subject #=> String
1706
+ # resp.trusted_identity_propagation_context.origin_identity.subject_type #=> String
1707
+ # resp.trusted_identity_propagation_context.origin_identity.issuer #=> String
1708
+ # resp.trusted_identity_propagation_context.origin_identity.federated_provider_arn #=> String
1709
+ # resp.trusted_identity_propagation_context.transaction_context.identity_provider #=> Hash
1710
+ # resp.trusted_identity_propagation_context.transaction_context.identity_provider["transactionContextKeyType"] #=> String
1777
1711
  #
1778
1712
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity AWS API Documentation
1779
1713
  #
@@ -2237,7 +2171,8 @@ module Aws::STS
2237
2171
  # * You cannot call any IAM operations using the CLI or the Amazon Web
2238
2172
  # Services API. This limitation does not apply to console sessions.
2239
2173
  #
2240
- # * You cannot call any STS operations except `GetCallerIdentity`.
2174
+ # * You cannot call any STS operations except `GetCallerIdentity`,
2175
+ # `GetScopedCredentials`, or `GetDelegatedAccessToken`.
2241
2176
  #
2242
2177
  # You can use temporary credentials for single sign-on (SSO) to the
2243
2178
  # console.
@@ -2355,15 +2290,6 @@ module Aws::STS
2355
2290
  # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
2356
2291
  # characters.
2357
2292
  #
2358
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
2359
- # policy, managed policy ARNs, and session tags into a packed binary
2360
- # format that has a separate limit. Your request can fail for this limit
2361
- # even if your plaintext meets the other requirements. The
2362
- # `PackedPolicySize` response element indicates by percentage how close
2363
- # the policies and tags for your request are to the upper size limit.
2364
- #
2365
- # </note>
2366
- #
2367
2293
  #
2368
2294
  #
2369
2295
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
@@ -2402,15 +2328,6 @@ module Aws::STS
2402
2328
  # are granted in addition to the permissions that are granted by the
2403
2329
  # session policies.
2404
2330
  #
2405
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
2406
- # policy, managed policy ARNs, and session tags into a packed binary
2407
- # format that has a separate limit. Your request can fail for this limit
2408
- # even if your plaintext meets the other requirements. The
2409
- # `PackedPolicySize` response element indicates by percentage how close
2410
- # the policies and tags for your request are to the upper size limit.
2411
- #
2412
- # </note>
2413
- #
2414
2331
  #
2415
2332
  #
2416
2333
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
@@ -2435,15 +2352,6 @@ module Aws::STS
2435
2352
  # can’t exceed 256 characters. For these and additional limits, see [IAM
2436
2353
  # and STS Character Limits][2] in the *IAM User Guide*.
2437
2354
  #
2438
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline session
2439
- # policy, managed policy ARNs, and session tags into a packed binary
2440
- # format that has a separate limit. Your request can fail for this limit
2441
- # even if your plaintext meets the other requirements. The
2442
- # `PackedPolicySize` response element indicates by percentage how close
2443
- # the policies and tags for your request are to the upper size limit.
2444
- #
2445
- # </note>
2446
- #
2447
2355
  # You can pass a session tag with the same key as a tag that is already
2448
2356
  # attached to the user you are federating. When you do, session tags
2449
2357
  # override a user tag with the same key.
@@ -2550,6 +2458,148 @@ module Aws::STS
2550
2458
  req.send_request(options)
2551
2459
  end
2552
2460
 
2461
+ # Returns a set of temporary security credentials that are scoped down
2462
+ # from the caller's existing temporary security credentials.
2463
+ # `GetScopedCredentials` preserves the caller's identity while
2464
+ # narrowing the permissions and optionally shortening the session
2465
+ # lifetime.
2466
+ #
2467
+ # For a comparison of `GetScopedCredentials` with the other API
2468
+ # operations that produce temporary security credentials, see
2469
+ # [Requesting Temporary Security Credentials][1] and [Compare STS
2470
+ # credentials][2] in the IAM User Guide.
2471
+ #
2472
+ # **Credential requirements**
2473
+ #
2474
+ # You can only call `GetScopedCredentials` with temporary security
2475
+ # credentials, for example, credentials from an assumed role or a
2476
+ # federated session. You cannot call it with IAM user credentials or
2477
+ # root credentials. If you want to scope down IAM user credentials,
2478
+ # first call `GetSessionToken` to get temporary security credentials,
2479
+ # and then call `GetScopedCredentials` with those credentials.
2480
+ #
2481
+ # <note markdown="1"> The `GetScopedCredentials` API is not available on the STS Global
2482
+ # endpoint.
2483
+ #
2484
+ # </note>
2485
+ #
2486
+ #
2487
+ #
2488
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
2489
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
2490
+ #
2491
+ # @option params [String] :policy
2492
+ # An IAM policy in JSON format that you want to use as a scope down
2493
+ # policy.
2494
+ #
2495
+ # A request must provide at least one of `Policy` or `DurationSeconds`.
2496
+ # Both parameters are optional individually, but you must specify at
2497
+ # least one of them.
2498
+ #
2499
+ # The resulting session's permissions are the intersection of the
2500
+ # calling session's existing permissions and this scope down policy.
2501
+ # You cannot use this scope down policy to grant more permissions than
2502
+ # the calling session already has.
2503
+ #
2504
+ # The plaintext of the scope down policy cannot exceed 2,048 characters.
2505
+ # The JSON policy characters can be any ASCII character from the space
2506
+ # character to the end of the valid character list (\\u0020 through
2507
+ # \\u00FF). It can also include the tab (\\u0009), linefeed (\\u000A),
2508
+ # and carriage return (\\u000D) characters.
2509
+ #
2510
+ # <note markdown="1"> An internal conversion compresses the inline scope down policy into a
2511
+ # packed binary format that has a separate limit. If the packed policy
2512
+ # exceeds this limit, the request fails with `PackedPolicyTooLarge`.
2513
+ #
2514
+ # If the document is not valid IAM policy JSON, the request fails with
2515
+ # `MalformedPolicyDocument`.
2516
+ #
2517
+ # </note>
2518
+ #
2519
+ # @option params [Integer] :duration_seconds
2520
+ # The duration, in seconds, of the resulting scoped down credentials.
2521
+ # The value can range from 1 second to 129,600 seconds (36 hours).
2522
+ #
2523
+ # If you do not specify this value, the scoped down credentials will
2524
+ # inherit the calling session's expiration time.
2525
+ #
2526
+ # @option params [Integer] :minimum_session_token_size
2527
+ # The minimum size, in bytes, of the session token that STS issues for
2528
+ # the request. STS increases the session token to at least this size,
2529
+ # regardless of its actual content. The value must not exceed 4,096
2530
+ # bytes. When set to 0 or not specified, the session token size is
2531
+ # unchanged.
2532
+ #
2533
+ # @option params [String] :scoped_session_description
2534
+ # A caller-supplied description of the scoped session. The value cannot
2535
+ # exceed 256 characters. This description is logged to CloudTrail for
2536
+ # the request, so you can use it to record the purpose of the scoped
2537
+ # session.
2538
+ #
2539
+ # @return [Types::GetScopedCredentialsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2540
+ #
2541
+ # * {Types::GetScopedCredentialsResponse#credentials #credentials} => Types::Credentials
2542
+ # * {Types::GetScopedCredentialsResponse#session_info #session_info} => Types::ScopedSession
2543
+ # * {Types::GetScopedCredentialsResponse#session_token_utilization #session_token_utilization} => Integer
2544
+ # * {Types::GetScopedCredentialsResponse#session_token_size #session_token_size} => Integer
2545
+ # * {Types::GetScopedCredentialsResponse#scoped_policies_count #scoped_policies_count} => Integer
2546
+ # * {Types::GetScopedCredentialsResponse#source_identity #source_identity} => String
2547
+ #
2548
+ #
2549
+ # @example Example: To scope down existing temporary credentials
2550
+ #
2551
+ # resp = client.get_scoped_credentials({
2552
+ # duration_seconds: 3600,
2553
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"s3:GetObject\",\"Resource\":\"arn:aws:s3:::example-bucket/*\"}]}",
2554
+ # })
2555
+ #
2556
+ # resp.to_h outputs the following:
2557
+ # {
2558
+ # credentials: {
2559
+ # access_key_id: "AKIAIOSFODNN7EXAMPLE",
2560
+ # expiration: Time.parse("2011-07-15T23:28:33.359Z"),
2561
+ # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
2562
+ # session_token: "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtpZ3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE",
2563
+ # },
2564
+ # scoped_policies_count: 1,
2565
+ # session_info: {
2566
+ # arn: "arn:aws:sts::123456789012:assumed-role/example-role/example-session",
2567
+ # scoped_session_id: "AROAEXAMPLEID:example-session",
2568
+ # },
2569
+ # source_identity: "example-source-identity",
2570
+ # }
2571
+ #
2572
+ # @example Request syntax with placeholder values
2573
+ #
2574
+ # resp = client.get_scoped_credentials({
2575
+ # policy: "sessionPolicyDocumentType",
2576
+ # duration_seconds: 1,
2577
+ # minimum_session_token_size: 1,
2578
+ # scoped_session_description: "scopedSessionDescriptionType",
2579
+ # })
2580
+ #
2581
+ # @example Response structure
2582
+ #
2583
+ # resp.credentials.access_key_id #=> String
2584
+ # resp.credentials.secret_access_key #=> String
2585
+ # resp.credentials.session_token #=> String
2586
+ # resp.credentials.expiration #=> Time
2587
+ # resp.session_info.scoped_session_id #=> String
2588
+ # resp.session_info.arn #=> String
2589
+ # resp.session_token_utilization #=> Integer
2590
+ # resp.session_token_size #=> Integer
2591
+ # resp.scoped_policies_count #=> Integer
2592
+ # resp.source_identity #=> String
2593
+ #
2594
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetScopedCredentials AWS API Documentation
2595
+ #
2596
+ # @overload get_scoped_credentials(params = {})
2597
+ # @param [Hash] params ({})
2598
+ def get_scoped_credentials(params = {}, options = {})
2599
+ req = build_request(:get_scoped_credentials, params)
2600
+ req.send_request(options)
2601
+ end
2602
+
2553
2603
  # Returns a set of temporary credentials for an Amazon Web Services
2554
2604
  # account or IAM user. The credentials consist of an access key ID, a
2555
2605
  # secret access key, and a security token. Typically, you use
@@ -2595,8 +2645,9 @@ module Aws::STS
2595
2645
  # * You cannot call any IAM API operations unless MFA authentication
2596
2646
  # information is included in the request.
2597
2647
  #
2598
- # * You cannot call any STS API *except* `AssumeRole` or
2599
- # `GetCallerIdentity`.
2648
+ # * You cannot call any STS API *except* `AssumeRole`,
2649
+ # `GetCallerIdentity`, `GetScopedCredentials`, `GetWebIdentityToken`,
2650
+ # or `GetDelegatedAccessToken`.
2600
2651
  #
2601
2652
  # The credentials that `GetSessionToken` returns are based on
2602
2653
  # permissions associated with the IAM user whose credentials were used
@@ -2720,11 +2771,18 @@ module Aws::STS
2720
2771
  end
2721
2772
 
2722
2773
  # Returns a signed JSON Web Token (JWT) that represents the calling
2723
- # Amazon Web Services identity. The returned JWT can be used to
2724
- # authenticate with external services that support OIDC discovery. The
2725
- # token is signed by Amazon Web Services STS and can be publicly
2726
- # verified using the verification keys published at the issuer's JWKS
2727
- # endpoint.
2774
+ # Amazon Web Services identity or, if you set `SubjectMode` to
2775
+ # `OriginIdentity`, the human user or workload on whose behalf the
2776
+ # calling session acts. The returned JWT can be used to authenticate
2777
+ # with external services that support OIDC discovery. The token is
2778
+ # signed by Amazon Web Services STS and can be publicly verified using
2779
+ # the verification keys published at the issuer's JWKS endpoint.
2780
+ #
2781
+ # The `sub` (subject) claim contains the identity that `SubjectMode`
2782
+ # selects. Whichever subject mode you use, the `principal_id` claim
2783
+ # under the `https://sts.amazonaws.com/` namespace contains the ARN of
2784
+ # the principal that requested the token, when that principal has an
2785
+ # ARN. For a role session, this is the ARN of the role.
2728
2786
  #
2729
2787
  # <note markdown="1"> The `GetWebIdentityToken` API is not available on the STS Global
2730
2788
  # endpoint.
@@ -2751,6 +2809,64 @@ module Aws::STS
2751
2809
  # (JWT). Valid values are RS256 (RSA with SHA-256) and ES384 (ECDSA
2752
2810
  # using P-384 curve with SHA-384).
2753
2811
  #
2812
+ # @option params [String] :scope
2813
+ # One or more OAuth 2.0 scope values to include in the JSON Web Token
2814
+ # (JWT). Amazon Web Services STS copies the value exactly as you send it
2815
+ # into the top-level `scope` claim of the token. If you don't specify
2816
+ # `Scope`, the token doesn't include a `scope` claim.
2817
+ #
2818
+ # Separate multiple values with a single space, as defined in [RFC 6749,
2819
+ # section 3.3][1] on the IETF website. Don't begin or end `Scope` with
2820
+ # a space. Each scope value can contain printable ASCII characters
2821
+ # except spaces, double quotation marks (`"`), commas (`,`), and
2822
+ # backslashes (``).
2823
+ #
2824
+ # You can't repeat a scope value. Scope values are case sensitive. This
2825
+ # means that `read` and `READ` are separate values.
2826
+ #
2827
+ # You can specify `Scope` only when `SubjectMode` is `OriginIdentity`
2828
+ # and you request exactly one audience. To specify `Scope`, the calling
2829
+ # principal must have permission for the `sts:SetWebIdentityTokenScope`
2830
+ # action in addition to `sts:GetWebIdentityToken`. You can use the
2831
+ # multivalued `sts:IdentityTokenScope` condition key in a policy to
2832
+ # control which scope values a principal can request.
2833
+ #
2834
+ #
2835
+ #
2836
+ # [1]: https://www.rfc-editor.org/rfc/rfc6749#section-3.3
2837
+ #
2838
+ # @option params [String] :subject_mode
2839
+ # Specifies which identity STS puts in the `sub` (subject) claim of the
2840
+ # JSON Web Token (JWT). Valid values are `AWSIdentity` and
2841
+ # `OriginIdentity`. If you don't specify a value, Amazon Web Services
2842
+ # STS uses `AWSIdentity`.
2843
+ #
2844
+ # * `AWSIdentity` – The `sub` claim contains the ARN of the calling
2845
+ # Amazon Web Services principal.
2846
+ #
2847
+ # * `OriginIdentity` – The `sub` claim contains the value of the
2848
+ # `aws:OriginIdentity/Subject` key in the trusted identity propagation
2849
+ # context of the calling session. For example, this can identify the
2850
+ # human user or workload on whose behalf the calling session acts.
2851
+ # Amazon Web Services STS also adds a `subject_mode` claim to the
2852
+ # token.
2853
+ #
2854
+ # To use `OriginIdentity`, the trusted identity propagation context of
2855
+ # the calling session must contain the `aws:OriginIdentity/Subject`
2856
+ # key and either the `aws:OriginIdentity/Issuer` key or the
2857
+ # `aws:OriginIdentity/FederatedProviderArn` key. If it doesn't, or if
2858
+ # the subject is blank, Amazon Web Services STS rejects the request
2859
+ # with a validation error.
2860
+ #
2861
+ # Amazon Web Services STS denies the request if the subject begins
2862
+ # with the text `arn:`, in any combination of uppercase and lowercase
2863
+ # letters. Amazon Web Services STS also denies the request if the
2864
+ # subject begins or ends with a space, or contains a control, format,
2865
+ # or separator character other than a space.
2866
+ #
2867
+ # You can use the `sts:SubjectMode` condition key in a policy to control
2868
+ # which subject modes a principal can request.
2869
+ #
2754
2870
  # @option params [Array<Types::Tag>] :tags
2755
2871
  # An optional list of tags to include in the JSON Web Token (JWT). These
2756
2872
  # tags are added as custom claims to the JWT and can be used by the
@@ -2767,6 +2883,8 @@ module Aws::STS
2767
2883
  # audience: ["webIdentityTokenAudienceStringType"], # required
2768
2884
  # duration_seconds: 1,
2769
2885
  # signing_algorithm: "jwtAlgorithmType", # required
2886
+ # scope: "webIdentityTokenScopeType",
2887
+ # subject_mode: "AWSIdentity", # accepts AWSIdentity, OriginIdentity
2770
2888
  # tags: [
2771
2889
  # {
2772
2890
  # key: "tagKeyType", # required
@@ -2807,7 +2925,7 @@ module Aws::STS
2807
2925
  tracer: tracer
2808
2926
  )
2809
2927
  context[:gem_name] = 'aws-sdk-core'
2810
- context[:gem_version] = '3.260.0'
2928
+ context[:gem_version] = '3.271.0'
2811
2929
  Seahorse::Client::Request.new(handlers, context)
2812
2930
  end
2813
2931