aws-sdk-core 3.185.1 → 3.214.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +409 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +1 -2
  5. data/lib/aws-defaults.rb +4 -1
  6. data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
  7. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
  8. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
  9. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  10. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  11. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  12. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  13. data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
  14. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  15. data/lib/aws-sdk-core/cbor.rb +53 -0
  16. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  17. data/lib/aws-sdk-core/client_stubs.rb +23 -19
  18. data/lib/aws-sdk-core/credential_provider.rb +1 -1
  19. data/lib/aws-sdk-core/credential_provider_chain.rb +13 -6
  20. data/lib/aws-sdk-core/credentials.rb +13 -6
  21. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  22. data/lib/aws-sdk-core/ecs_credentials.rb +78 -11
  23. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  24. data/lib/aws-sdk-core/endpoints/matchers.rb +6 -9
  25. data/lib/aws-sdk-core/endpoints.rb +74 -18
  26. data/lib/aws-sdk-core/error_handler.rb +41 -0
  27. data/lib/aws-sdk-core/errors.rb +11 -2
  28. data/lib/aws-sdk-core/event_emitter.rb +0 -16
  29. data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
  30. data/lib/aws-sdk-core/json/builder.rb +8 -1
  31. data/lib/aws-sdk-core/json/error_handler.rb +17 -11
  32. data/lib/aws-sdk-core/json/handler.rb +13 -6
  33. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  34. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  35. data/lib/aws-sdk-core/json/parser.rb +32 -2
  36. data/lib/aws-sdk-core/json.rb +43 -14
  37. data/lib/aws-sdk-core/log/param_filter.rb +2 -2
  38. data/lib/aws-sdk-core/log.rb +10 -0
  39. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  40. data/lib/aws-sdk-core/pageable_response.rb +1 -1
  41. data/lib/aws-sdk-core/param_validator.rb +7 -2
  42. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  43. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +6 -3
  44. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
  45. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  46. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +9 -3
  47. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  48. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
  49. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  50. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  51. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  52. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  53. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  54. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  55. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  56. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  57. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  58. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -25
  59. data/lib/aws-sdk-core/plugins/request_compression.rb +11 -2
  60. data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
  61. data/lib/aws-sdk-core/plugins/sign.rb +27 -15
  62. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  63. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  64. data/lib/aws-sdk-core/plugins/stub_responses.rb +30 -2
  65. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  66. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  67. data/lib/aws-sdk-core/plugins/user_agent.rb +70 -26
  68. data/lib/aws-sdk-core/plugins.rb +39 -0
  69. data/lib/aws-sdk-core/process_credentials.rb +47 -28
  70. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  71. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  72. data/lib/aws-sdk-core/query/handler.rb +4 -4
  73. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  74. data/lib/aws-sdk-core/query.rb +2 -1
  75. data/lib/aws-sdk-core/refreshing_credentials.rb +12 -6
  76. data/lib/aws-sdk-core/resources.rb +8 -0
  77. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  78. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  79. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  80. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  81. data/lib/aws-sdk-core/rest/request/headers.rb +14 -6
  82. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
  83. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  84. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  85. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  86. data/lib/aws-sdk-core/rest.rb +1 -0
  87. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  88. data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
  89. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
  90. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +85 -0
  91. data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
  92. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  93. data/lib/aws-sdk-core/rpc_v2.rb +69 -0
  94. data/lib/aws-sdk-core/shared_config.rb +7 -2
  95. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  96. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  97. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  98. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  99. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  100. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  101. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  102. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  103. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
  104. data/lib/aws-sdk-core/stubbing.rb +22 -0
  105. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  106. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  107. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  108. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  109. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  110. data/lib/aws-sdk-core/telemetry.rb +78 -0
  111. data/lib/aws-sdk-core/util.rb +39 -0
  112. data/lib/aws-sdk-core/waiters/poller.rb +10 -5
  113. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  114. data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
  115. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  116. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  117. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  118. data/lib/aws-sdk-core.rb +82 -107
  119. data/lib/aws-sdk-sso/client.rb +119 -55
  120. data/lib/aws-sdk-sso/client_api.rb +7 -0
  121. data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
  122. data/lib/aws-sdk-sso/endpoints.rb +2 -54
  123. data/lib/aws-sdk-sso/plugins/endpoints.rb +23 -22
  124. data/lib/aws-sdk-sso/types.rb +1 -0
  125. data/lib/aws-sdk-sso.rb +15 -11
  126. data/lib/aws-sdk-ssooidc/client.rb +504 -83
  127. data/lib/aws-sdk-ssooidc/client_api.rb +83 -1
  128. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
  129. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +2 -2
  130. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -40
  131. data/lib/aws-sdk-ssooidc/errors.rb +52 -0
  132. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +23 -20
  133. data/lib/aws-sdk-ssooidc/types.rb +373 -51
  134. data/lib/aws-sdk-ssooidc.rb +15 -11
  135. data/lib/aws-sdk-sts/client.rb +334 -105
  136. data/lib/aws-sdk-sts/client_api.rb +36 -10
  137. data/lib/aws-sdk-sts/customizations.rb +5 -1
  138. data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
  139. data/lib/aws-sdk-sts/endpoint_provider.rb +2 -2
  140. data/lib/aws-sdk-sts/endpoints.rb +2 -118
  141. data/lib/aws-sdk-sts/plugins/endpoints.rb +23 -30
  142. data/lib/aws-sdk-sts/presigner.rb +1 -1
  143. data/lib/aws-sdk-sts/types.rb +188 -30
  144. data/lib/aws-sdk-sts.rb +15 -11
  145. data/lib/seahorse/client/async_base.rb +1 -1
  146. data/lib/seahorse/client/async_response.rb +19 -0
  147. data/lib/seahorse/client/base.rb +18 -7
  148. data/lib/seahorse/client/h2/handler.rb +14 -3
  149. data/lib/seahorse/client/handler.rb +1 -1
  150. data/lib/seahorse/client/net_http/connection_pool.rb +11 -11
  151. data/lib/seahorse/client/net_http/handler.rb +21 -9
  152. data/lib/seahorse/client/net_http/patches.rb +1 -4
  153. data/lib/seahorse/client/plugin.rb +9 -0
  154. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  155. data/lib/seahorse/client/plugins/h2.rb +3 -3
  156. data/lib/seahorse/client/plugins/net_http.rb +57 -16
  157. data/lib/seahorse/client/request_context.rb +8 -1
  158. data/lib/seahorse/model/shapes.rb +2 -2
  159. data/sig/aws-sdk-core/client_stubs.rbs +10 -0
  160. data/sig/aws-sdk-core/errors.rbs +22 -0
  161. data/sig/aws-sdk-core/resources/collection.rbs +21 -0
  162. data/sig/aws-sdk-core/structure.rbs +4 -0
  163. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  164. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  165. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  166. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  167. data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
  168. data/sig/aws-sdk-core.rbs +7 -0
  169. data/sig/seahorse/client/base.rbs +25 -0
  170. data/sig/seahorse/client/handler_builder.rbs +16 -0
  171. data/sig/seahorse/client/response.rbs +61 -0
  172. metadata +61 -19
  173. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  174. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  175. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  176. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  177. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -26,10 +26,21 @@ module Aws::STS
26
26
  # that use the temporary security credentials will expose the role
27
27
  # session name to the external account in their CloudTrail logs.
28
28
  #
29
+ # For security purposes, administrators can view this field in
30
+ # [CloudTrail logs][1] to help identify who performed an action in
31
+ # Amazon Web Services. Your administrator might require that you
32
+ # specify your user name as the session name when you assume the role.
33
+ # For more information, see [ `sts:RoleSessionName` ][2].
34
+ #
29
35
  # The regex used to validate this parameter is a string of characters
30
36
  # consisting of upper- and lower-case alphanumeric characters with no
31
37
  # spaces. You can also include underscores or any of the following
32
38
  # characters: =,.@-
39
+ #
40
+ #
41
+ #
42
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
43
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
33
44
  # @return [String]
34
45
  #
35
46
  # @!attribute [rw] policy_arns
@@ -101,6 +112,9 @@ module Aws::STS
101
112
  #
102
113
  # </note>
103
114
  #
115
+ # For more information about role session permissions, see [Session
116
+ # policies][1].
117
+ #
104
118
  #
105
119
  #
106
120
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
@@ -125,8 +139,7 @@ module Aws::STS
125
139
  # However, if you assume a role using role chaining and provide a
126
140
  # `DurationSeconds` parameter value greater than one hour, the
127
141
  # operation fails. To learn how to view the maximum value for your
128
- # role, see [View the Maximum Session Duration Setting for a Role][1]
129
- # in the *IAM User Guide*.
142
+ # role, see [Update the maximum session duration for a role][1].
130
143
  #
131
144
  # By default, the value is set to `3600` seconds.
132
145
  #
@@ -142,7 +155,7 @@ module Aws::STS
142
155
  #
143
156
  #
144
157
  #
145
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
158
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
146
159
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
147
160
  # @return [Integer]
148
161
  #
@@ -199,9 +212,8 @@ module Aws::STS
199
212
  # passes to subsequent sessions in a role chain. For more information,
200
213
  # see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
201
214
  #
202
- # This parameter is optional. When you set session tags as transitive,
203
- # the session policy and session tags packed binary limit is not
204
- # affected.
215
+ # This parameter is optional. The transitive status of a session tag
216
+ # does not impact its packed binary size.
205
217
  #
206
218
  # If you choose not to specify a transitive tag key, then no tags are
207
219
  # passed from this session to any subsequent sessions.
@@ -263,17 +275,18 @@ module Aws::STS
263
275
  #
264
276
  # @!attribute [rw] source_identity
265
277
  # The source identity specified by the principal that is calling the
266
- # `AssumeRole` operation.
278
+ # `AssumeRole` operation. The source identity value persists across
279
+ # [chained role][1] sessions.
267
280
  #
268
281
  # You can require users to specify a source identity when they assume
269
- # a role. You do this by using the `sts:SourceIdentity` condition key
270
- # in a role trust policy. You can use source identity information in
271
- # CloudTrail logs to determine who took actions with a role. You can
272
- # use the `aws:SourceIdentity` condition key to further control access
273
- # to Amazon Web Services resources based on the value of source
274
- # identity. For more information about using source identity, see
275
- # [Monitor and control actions taken with assumed roles][1] in the
276
- # *IAM User Guide*.
282
+ # a role. You do this by using the [ `sts:SourceIdentity` ][2]
283
+ # condition key in a role trust policy. You can use source identity
284
+ # information in CloudTrail logs to determine who took actions with a
285
+ # role. You can use the `aws:SourceIdentity` condition key to further
286
+ # control access to Amazon Web Services resources based on the value
287
+ # of source identity. For more information about using source
288
+ # identity, see [Monitor and control actions taken with assumed
289
+ # roles][3] in the *IAM User Guide*.
277
290
  #
278
291
  # The regex used to validate this parameter is a string of characters
279
292
  # consisting of upper- and lower-case alphanumeric characters with no
@@ -284,11 +297,22 @@ module Aws::STS
284
297
  #
285
298
  #
286
299
  #
287
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
300
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
301
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
302
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
288
303
  # @return [String]
289
304
  #
290
305
  # @!attribute [rw] provided_contexts
291
- # Reserved for future use.
306
+ # A list of previously acquired trusted context assertions in the
307
+ # format of a JSON array. The trusted context assertion is signed and
308
+ # encrypted by Amazon Web Services STS.
309
+ #
310
+ # The following is an example of a `ProvidedContext` value that
311
+ # includes a single trusted context assertion and the ARN of the
312
+ # context provider from which the trusted context assertion was
313
+ # generated.
314
+ #
315
+ # `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
292
316
  # @return [Array<Types::ProvidedContext>]
293
317
  #
294
318
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest AWS API Documentation
@@ -456,6 +480,9 @@ module Aws::STS
456
480
  # include the tab (\\u0009), linefeed (\\u000A), and carriage return
457
481
  # (\\u000D) characters.
458
482
  #
483
+ # For more information about role session permissions, see [Session
484
+ # policies][1].
485
+ #
459
486
  # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
460
487
  # session policy, managed policy ARNs, and session tags into a packed
461
488
  # binary format that has a separate limit. Your request can fail for
@@ -591,6 +618,8 @@ module Aws::STS
591
618
  #
592
619
  # @!attribute [rw] source_identity
593
620
  # The value in the `SourceIdentity` attribute in the SAML assertion.
621
+ # The source identity value persists across [chained role][1]
622
+ # sessions.
594
623
  #
595
624
  # You can require users to set a source identity value when they
596
625
  # assume a role. You do this by using the `sts:SourceIdentity`
@@ -598,12 +627,12 @@ module Aws::STS
598
627
  # taken with the role are associated with that user. After the source
599
628
  # identity is set, the value cannot be changed. It is present in the
600
629
  # request for all actions that are taken by the role and persists
601
- # across [chained role][1] sessions. You can configure your SAML
630
+ # across [chained role][2] sessions. You can configure your SAML
602
631
  # identity provider to use an attribute associated with your users,
603
632
  # like user name or email, as the source identity when calling
604
633
  # `AssumeRoleWithSAML`. You do this by adding an attribute to the SAML
605
634
  # assertion. For more information about using source identity, see
606
- # [Monitor and control actions taken with assumed roles][2] in the
635
+ # [Monitor and control actions taken with assumed roles][3] in the
607
636
  # *IAM User Guide*.
608
637
  #
609
638
  # The regex used to validate this parameter is a string of characters
@@ -613,8 +642,9 @@ module Aws::STS
613
642
  #
614
643
  #
615
644
  #
616
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining
617
- # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
645
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
646
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts
647
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
618
648
  # @return [String]
619
649
  #
620
650
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLResponse AWS API Documentation
@@ -636,6 +666,24 @@ module Aws::STS
636
666
  # @!attribute [rw] role_arn
637
667
  # The Amazon Resource Name (ARN) of the role that the caller is
638
668
  # assuming.
669
+ #
670
+ # <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools
671
+ # that assume [cross-account IAM roles][1]. The trust policies of
672
+ # these roles must accept the `cognito-identity.amazonaws.com` service
673
+ # principal and must contain the `cognito-identity.amazonaws.com:aud`
674
+ # condition key to restrict role assumption to users from your
675
+ # intended identity pools. A policy that trusts Amazon Cognito
676
+ # identity pools without this condition creates a risk that a user
677
+ # from an unintended identity pool can assume the role. For more
678
+ # information, see [ Trust policies for IAM roles in Basic (Classic)
679
+ # authentication ][2] in the *Amazon Cognito Developer Guide*.
680
+ #
681
+ # </note>
682
+ #
683
+ #
684
+ #
685
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
686
+ # [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
639
687
  # @return [String]
640
688
  #
641
689
  # @!attribute [rw] role_session_name
@@ -646,10 +694,21 @@ module Aws::STS
646
694
  # session name is included as part of the ARN and assumed role ID in
647
695
  # the `AssumedRoleUser` response element.
648
696
  #
697
+ # For security purposes, administrators can view this field in
698
+ # [CloudTrail logs][1] to help identify who performed an action in
699
+ # Amazon Web Services. Your administrator might require that you
700
+ # specify your user name as the session name when you assume the role.
701
+ # For more information, see [ `sts:RoleSessionName` ][2].
702
+ #
649
703
  # The regex used to validate this parameter is a string of characters
650
704
  # consisting of upper- and lower-case alphanumeric characters with no
651
705
  # spaces. You can also include underscores or any of the following
652
706
  # characters: =,.@-
707
+ #
708
+ #
709
+ #
710
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
711
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
653
712
  # @return [String]
654
713
  #
655
714
  # @!attribute [rw] web_identity_token
@@ -657,8 +716,9 @@ module Aws::STS
657
716
  # provided by the identity provider. Your application must get this
658
717
  # token by authenticating the user who is using your application with
659
718
  # a web identity provider before the application makes an
660
- # `AssumeRoleWithWebIdentity` call. Only tokens with RSA algorithms
661
- # (RS256) are supported.
719
+ # `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
720
+ # formatted as either an integer or a long integer. Only tokens with
721
+ # RSA algorithms (RS256) are supported.
662
722
  # @return [String]
663
723
  #
664
724
  # @!attribute [rw] provider_id
@@ -732,6 +792,9 @@ module Aws::STS
732
792
  # include the tab (\\u0009), linefeed (\\u000A), and carriage return
733
793
  # (\\u000D) characters.
734
794
  #
795
+ # For more information about role session permissions, see [Session
796
+ # policies][1].
797
+ #
735
798
  # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
736
799
  # session policy, managed policy ARNs, and session tags into a packed
737
800
  # binary format that has a separate limit. Your request can fail for
@@ -872,7 +935,7 @@ module Aws::STS
872
935
  #
873
936
  #
874
937
  #
875
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining
938
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts
876
939
  # [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html
877
940
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
878
941
  # @return [String]
@@ -891,6 +954,94 @@ module Aws::STS
891
954
  include Aws::Structure
892
955
  end
893
956
 
957
+ # @!attribute [rw] target_principal
958
+ # The member account principal ARN or account ID.
959
+ # @return [String]
960
+ #
961
+ # @!attribute [rw] task_policy_arn
962
+ # The identity based policy that scopes the session to the privileged
963
+ # tasks that can be performed. You can use one of following Amazon Web
964
+ # Services managed policies to scope root session actions. You can add
965
+ # additional customer managed policies to further limit the
966
+ # permissions for the root session.
967
+ #
968
+ # * [IAMAuditRootUserCredentials][1]
969
+ #
970
+ # * [IAMCreateRootUserPassword][2]
971
+ #
972
+ # * [IAMDeleteRootUserCredentials][3]
973
+ #
974
+ # * [S3UnlockBucketPolicy][4]
975
+ #
976
+ # * [SQSUnlockQueuePolicy][5]
977
+ #
978
+ #
979
+ #
980
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
981
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
982
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
983
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
984
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
985
+ # @return [Types::PolicyDescriptorType]
986
+ #
987
+ # @!attribute [rw] duration_seconds
988
+ # The duration, in seconds, of the privileged session. The value can
989
+ # range from 0 seconds up to the maximum session duration of 900
990
+ # seconds (15 minutes). If you specify a value higher than this
991
+ # setting, the operation fails.
992
+ #
993
+ # By default, the value is set to `900` seconds.
994
+ # @return [Integer]
995
+ #
996
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRootRequest AWS API Documentation
997
+ #
998
+ class AssumeRootRequest < Struct.new(
999
+ :target_principal,
1000
+ :task_policy_arn,
1001
+ :duration_seconds)
1002
+ SENSITIVE = []
1003
+ include Aws::Structure
1004
+ end
1005
+
1006
+ # @!attribute [rw] credentials
1007
+ # The temporary security credentials, which include an access key ID,
1008
+ # a secret access key, and a security token.
1009
+ #
1010
+ # <note markdown="1"> The size of the security token that STS API operations return is not
1011
+ # fixed. We strongly recommend that you make no assumptions about the
1012
+ # maximum size.
1013
+ #
1014
+ # </note>
1015
+ # @return [Types::Credentials]
1016
+ #
1017
+ # @!attribute [rw] source_identity
1018
+ # The source identity specified by the principal that is calling the
1019
+ # `AssumeRoot` operation.
1020
+ #
1021
+ # You can use the `aws:SourceIdentity` condition key to control access
1022
+ # based on the value of source identity. For more information about
1023
+ # using source identity, see [Monitor and control actions taken with
1024
+ # assumed roles][1] in the *IAM User Guide*.
1025
+ #
1026
+ # The regex used to validate this parameter is a string of characters
1027
+ # consisting of upper- and lower-case alphanumeric characters with no
1028
+ # spaces. You can also include underscores or any of the following
1029
+ # characters: =,.@-
1030
+ #
1031
+ #
1032
+ #
1033
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
1034
+ # @return [String]
1035
+ #
1036
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRootResponse AWS API Documentation
1037
+ #
1038
+ class AssumeRootResponse < Struct.new(
1039
+ :credentials,
1040
+ :source_identity)
1041
+ SENSITIVE = []
1042
+ include Aws::Structure
1043
+ end
1044
+
894
1045
  # The identifiers for the temporary security credentials that the
895
1046
  # operation returns.
896
1047
  #
@@ -1410,7 +1561,8 @@ module Aws::STS
1410
1561
 
1411
1562
  # The error returned if the message passed to
1412
1563
  # `DecodeAuthorizationMessage` was invalid. This can happen if the token
1413
- # contains invalid characters, such as linebreaks.
1564
+ # contains invalid characters, such as line breaks, or if the message
1565
+ # has expired.
1414
1566
  #
1415
1567
  # @!attribute [rw] message
1416
1568
  # @return [String]
@@ -1503,14 +1655,19 @@ module Aws::STS
1503
1655
  include Aws::Structure
1504
1656
  end
1505
1657
 
1506
- # Reserved for future use.
1658
+ # Contains information about the provided context. This includes the
1659
+ # signed and encrypted trusted context assertion and the context
1660
+ # provider ARN from which the trusted context assertion was generated.
1507
1661
  #
1508
1662
  # @!attribute [rw] provider_arn
1509
- # Reserved for future use.
1663
+ # The context provider ARN from which the trusted context assertion
1664
+ # was generated.
1510
1665
  # @return [String]
1511
1666
  #
1512
1667
  # @!attribute [rw] context_assertion
1513
- # Reserved for future use.
1668
+ # The signed and encrypted trusted context assertion generated by the
1669
+ # context provider. The trusted context assertion is signed and
1670
+ # encrypted by Amazon Web Services STS.
1514
1671
  # @return [String]
1515
1672
  #
1516
1673
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/ProvidedContext AWS API Documentation
@@ -1525,8 +1682,8 @@ module Aws::STS
1525
1682
  # STS is not activated in the requested region for the account that is
1526
1683
  # being asked to generate credentials. The account administrator must
1527
1684
  # use the IAM console to activate STS in that region. For more
1528
- # information, see [Activating and Deactivating Amazon Web Services STS
1529
- # in an Amazon Web Services Region][1] in the *IAM User Guide*.
1685
+ # information, see [Activating and Deactivating STS in an Amazon Web
1686
+ # Services Region][1] in the *IAM User Guide*.
1530
1687
  #
1531
1688
  #
1532
1689
  #
@@ -1588,3 +1745,4 @@ module Aws::STS
1588
1745
 
1589
1746
  end
1590
1747
  end
1748
+
data/lib/aws-sdk-sts.rb CHANGED
@@ -13,16 +13,7 @@ unless Module.const_defined?(:Aws)
13
13
  require 'aws-sigv4'
14
14
  end
15
15
 
16
- require_relative 'aws-sdk-sts/types'
17
- require_relative 'aws-sdk-sts/client_api'
18
- require_relative 'aws-sdk-sts/plugins/endpoints.rb'
19
- require_relative 'aws-sdk-sts/client'
20
- require_relative 'aws-sdk-sts/errors'
21
- require_relative 'aws-sdk-sts/resource'
22
- require_relative 'aws-sdk-sts/endpoint_parameters'
23
- require_relative 'aws-sdk-sts/endpoint_provider'
24
- require_relative 'aws-sdk-sts/endpoints'
25
- require_relative 'aws-sdk-sts/customizations'
16
+ Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
26
17
 
27
18
  # This module provides support for AWS Security Token Service. This module is available in the
28
19
  # `aws-sdk-core` gem.
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-sts/customizations'
53
44
  #
54
45
  # @!group service
55
46
  module Aws::STS
47
+ autoload :Types, 'aws-sdk-sts/types'
48
+ autoload :ClientApi, 'aws-sdk-sts/client_api'
49
+ module Plugins
50
+ autoload :Endpoints, 'aws-sdk-sts/plugins/endpoints.rb'
51
+ end
52
+ autoload :Client, 'aws-sdk-sts/client'
53
+ autoload :Errors, 'aws-sdk-sts/errors'
54
+ autoload :Resource, 'aws-sdk-sts/resource'
55
+ autoload :EndpointParameters, 'aws-sdk-sts/endpoint_parameters'
56
+ autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
+ autoload :Endpoints, 'aws-sdk-sts/endpoints'
56
58
 
57
- GEM_VERSION = '3.185.1'
59
+ GEM_VERSION = '3.214.0'
58
60
 
59
61
  end
62
+
63
+ require_relative 'aws-sdk-sts/customizations'
@@ -5,12 +5,12 @@ module Seahorse
5
5
  class AsyncBase < Seahorse::Client::Base
6
6
 
7
7
  # default H2 plugins
8
+ # @api private
8
9
  @plugins = PluginList.new([
9
10
  Plugins::Endpoint,
10
11
  Plugins::H2,
11
12
  Plugins::ResponseTarget
12
13
  ])
13
-
14
14
  def initialize(plugins, options)
15
15
  super
16
16
  @connection = H2::Connection.new(options)
@@ -12,24 +12,43 @@ module Seahorse
12
12
  @sync_queue = options[:sync_queue]
13
13
  end
14
14
 
15
+ # @return [RequestContext]
15
16
  def context
16
17
  @response.context
17
18
  end
18
19
 
20
+ # @return [StandardError, nil]
19
21
  def error
20
22
  @response.error
21
23
  end
22
24
 
25
+ # @overload on(status_code, &block)
26
+ # @param [Integer] status_code The block will be
27
+ # triggered only for responses with the given status code.
28
+ #
29
+ # @overload on(status_code_range, &block)
30
+ # @param [Range<Integer>] status_code_range The block will be
31
+ # triggered only for responses with a status code that falls
32
+ # witin the given range.
33
+ #
34
+ # @return [self]
23
35
  def on(range, &block)
24
36
  @response.on(range, &block)
25
37
  self
26
38
  end
27
39
 
40
+ # @api private
28
41
  def on_complete(&block)
29
42
  @response.on_complete(&block)
30
43
  self
31
44
  end
32
45
 
46
+ # @return [Boolean] Returns `true` if the response is complete with
47
+ # no error.
48
+ def successful?
49
+ @response.error.nil?
50
+ end
51
+
33
52
  def wait
34
53
  if error && context.config.raise_response_errors
35
54
  raise error
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thread'
4
-
5
3
  module Seahorse
6
4
  module Client
7
5
  class Base
@@ -9,6 +7,7 @@ module Seahorse
9
7
  include HandlerBuilder
10
8
 
11
9
  # default plugins
10
+ # @api private
12
11
  @plugins = PluginList.new([
13
12
  Plugins::Endpoint,
14
13
  Plugins::NetHttp,
@@ -59,6 +58,7 @@ module Seahorse
59
58
  def build_config(plugins, options)
60
59
  config = Configuration.new
61
60
  config.add_option(:api)
61
+ config.add_option(:plugins)
62
62
  plugins.each do |plugin|
63
63
  plugin.add_options(config) if plugin.respond_to?(:add_options)
64
64
  end
@@ -95,9 +95,9 @@ module Seahorse
95
95
  class << self
96
96
 
97
97
  def new(options = {})
98
- plugins = build_plugins
99
98
  options = options.dup
100
- before_initialize(plugins, options)
99
+ plugins = build_plugins(self.plugins + options.fetch(:plugins, []))
100
+ plugins = before_initialize(plugins, options)
101
101
  client = allocate
102
102
  client.send(:initialize, plugins, options)
103
103
  client
@@ -208,17 +208,28 @@ module Seahorse
208
208
  include(operations_module)
209
209
  end
210
210
 
211
- def build_plugins
211
+ def build_plugins(plugins)
212
212
  plugins.map { |plugin| plugin.is_a?(Class) ? plugin.new : plugin }
213
213
  end
214
214
 
215
215
  def before_initialize(plugins, options)
216
- plugins.each do |plugin|
217
- plugin.before_initialize(self, options) if plugin.respond_to?(:before_initialize)
216
+ queue = Queue.new
217
+ plugins.each { |plugin| queue.push(plugin) }
218
+ until queue.empty?
219
+ plugin = queue.pop
220
+ next unless plugin.respond_to?(:before_initialize)
221
+
222
+ plugins_before = options.fetch(:plugins, [])
223
+ plugin.before_initialize(self, options)
224
+ plugins_after = build_plugins(options.fetch(:plugins, []) - plugins_before)
225
+ # Plugins with before_initialize can add other plugins
226
+ plugins_after.each { |p| queue.push(p); plugins << p }
218
227
  end
228
+ plugins
219
229
  end
220
230
 
221
231
  def inherited(subclass)
232
+ super
222
233
  subclass.instance_variable_set('@plugins', PluginList.new(@plugins))
223
234
  end
224
235
 
@@ -27,6 +27,12 @@ module Seahorse
27
27
  class Handler < Client::Handler
28
28
 
29
29
  def call(context)
30
+ span_wrapper(context) { _call(context) }
31
+ end
32
+
33
+ private
34
+
35
+ def _call(context)
30
36
  stream = nil
31
37
  begin
32
38
  conn = context.client.connection
@@ -80,8 +86,6 @@ module Seahorse
80
86
  )
81
87
  end
82
88
 
83
- private
84
-
85
89
  def _register_callbacks(resp, stream, stream_mutex, close_condition, sync_queue)
86
90
  stream.on(:headers) do |headers|
87
91
  resp.signal_headers(headers)
@@ -126,6 +130,7 @@ module Seahorse
126
130
  # https://http2.github.io/http2-spec/#rfc.section.8.1.2.3
127
131
  def _h2_headers(req)
128
132
  headers = {}
133
+ headers[':authority'] = req.endpoint.host
129
134
  headers[':method'] = req.http_method.upcase
130
135
  headers[':scheme'] = req.endpoint.scheme
131
136
  headers[':path'] = req.endpoint.path.empty? ? '/' : req.endpoint.path
@@ -145,8 +150,14 @@ module Seahorse
145
150
  end
146
151
  end
147
152
 
153
+ def span_wrapper(context, &block)
154
+ context.tracer.in_span(
155
+ 'Handler.H2',
156
+ attributes: Aws::Telemetry.http_request_attrs(context),
157
+ &block
158
+ )
159
+ end
148
160
  end
149
-
150
161
  end
151
162
  end
152
163
  end
@@ -15,7 +15,7 @@ module Seahorse
15
15
  attr_accessor :handler
16
16
 
17
17
  # @param [RequestContext] context
18
- # @return [Response]
18
+ # @return [Seahorse::Response]
19
19
  def call(context)
20
20
  @handler.call(context)
21
21
  end
@@ -34,7 +34,9 @@ module Seahorse
34
34
  ssl_ca_bundle: nil,
35
35
  ssl_ca_directory: nil,
36
36
  ssl_ca_store: nil,
37
- ssl_timeout: nil
37
+ ssl_timeout: nil,
38
+ ssl_cert: nil,
39
+ ssl_key: nil
38
40
  }
39
41
 
40
42
  # @api private
@@ -119,11 +121,7 @@ module Seahorse
119
121
  # pool, not counting those currently in use.
120
122
  def size
121
123
  @pool_mutex.synchronize do
122
- size = 0
123
- @pool.each_pair do |endpoint,sessions|
124
- size += sessions.size
125
- end
126
- size
124
+ @pool.values.flatten.size
127
125
  end
128
126
  end
129
127
 
@@ -142,9 +140,7 @@ module Seahorse
142
140
  # @return [nil]
143
141
  def empty!
144
142
  @pool_mutex.synchronize do
145
- @pool.each_pair do |endpoint,sessions|
146
- sessions.each(&:finish)
147
- end
143
+ @pool.values.flatten.map(&:finish)
148
144
  @pool.clear
149
145
  end
150
146
  nil
@@ -252,7 +248,9 @@ module Seahorse
252
248
  :ssl_ca_bundle => options[:ssl_ca_bundle],
253
249
  :ssl_ca_directory => options[:ssl_ca_directory],
254
250
  :ssl_ca_store => options[:ssl_ca_store],
255
- :ssl_timeout => options[:ssl_timeout]
251
+ :ssl_timeout => options[:ssl_timeout],
252
+ :ssl_cert => options[:ssl_cert],
253
+ :ssl_key => options[:ssl_key]
256
254
  }
257
255
  end
258
256
 
@@ -297,6 +295,8 @@ module Seahorse
297
295
  http.ca_file = ssl_ca_bundle if ssl_ca_bundle
298
296
  http.ca_path = ssl_ca_directory if ssl_ca_directory
299
297
  http.cert_store = ssl_ca_store if ssl_ca_store
298
+ http.cert = ssl_cert if ssl_cert
299
+ http.key = ssl_key if ssl_key
300
300
  else
301
301
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
302
302
  end
@@ -312,7 +312,7 @@ module Seahorse
312
312
  # @note **Must** be called behind a `@pool_mutex` synchronize block.
313
313
  def _clean
314
314
  now = Aws::Util.monotonic_milliseconds
315
- @pool.each_pair do |endpoint,sessions|
315
+ @pool.values.each do |sessions|
316
316
  sessions.delete_if do |session|
317
317
  if session.last_used.nil? or now - session.last_used > http_idle_timeout * 1000
318
318
  session.finish