aws-sdk-core 3.165.0 → 3.201.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +462 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +4 -4
  5. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
  6. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  7. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  8. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  9. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  10. data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
  11. data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
  12. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  13. data/lib/aws-sdk-core/cbor.rb +106 -0
  14. data/lib/aws-sdk-core/client_stubs.rb +18 -14
  15. data/lib/aws-sdk-core/credential_provider.rb +4 -1
  16. data/lib/aws-sdk-core/credential_provider_chain.rb +8 -5
  17. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  18. data/lib/aws-sdk-core/ecs_credentials.rb +178 -53
  19. data/lib/aws-sdk-core/endpoints/condition.rb +5 -0
  20. data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +5 -1
  21. data/lib/aws-sdk-core/endpoints/error_rule.rb +5 -0
  22. data/lib/aws-sdk-core/endpoints/function.rb +5 -0
  23. data/lib/aws-sdk-core/endpoints/matchers.rb +18 -10
  24. data/lib/aws-sdk-core/endpoints/reference.rb +5 -0
  25. data/lib/aws-sdk-core/endpoints/rule.rb +5 -0
  26. data/lib/aws-sdk-core/endpoints/rule_set.rb +5 -0
  27. data/lib/aws-sdk-core/endpoints/rules_provider.rb +5 -0
  28. data/lib/aws-sdk-core/endpoints/templater.rb +6 -0
  29. data/lib/aws-sdk-core/endpoints/tree_rule.rb +5 -0
  30. data/lib/aws-sdk-core/endpoints/url.rb +1 -0
  31. data/lib/aws-sdk-core/endpoints.rb +69 -19
  32. data/lib/aws-sdk-core/error_handler.rb +41 -0
  33. data/lib/aws-sdk-core/errors.rb +12 -3
  34. data/lib/aws-sdk-core/event_emitter.rb +0 -16
  35. data/lib/aws-sdk-core/ini_parser.rb +7 -0
  36. data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
  37. data/lib/aws-sdk-core/json/builder.rb +8 -1
  38. data/lib/aws-sdk-core/json/error_handler.rb +29 -14
  39. data/lib/aws-sdk-core/json/handler.rb +12 -6
  40. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  41. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  42. data/lib/aws-sdk-core/json/parser.rb +33 -3
  43. data/lib/aws-sdk-core/json.rb +43 -14
  44. data/lib/aws-sdk-core/log/formatter.rb +6 -0
  45. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  46. data/lib/aws-sdk-core/pageable_response.rb +3 -1
  47. data/lib/aws-sdk-core/param_validator.rb +9 -4
  48. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  49. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +7 -4
  50. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
  51. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  52. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +2 -0
  53. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  54. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
  55. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  56. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  57. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  58. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  59. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  60. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  61. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  62. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  63. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  64. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +140 -35
  65. data/lib/aws-sdk-core/plugins/request_compression.rb +226 -0
  66. data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +2 -1
  67. data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
  68. data/lib/aws-sdk-core/plugins/sign.rb +43 -19
  69. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  70. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  71. data/lib/aws-sdk-core/plugins/stub_responses.rb +1 -0
  72. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  73. data/lib/aws-sdk-core/plugins/user_agent.rb +152 -14
  74. data/lib/aws-sdk-core/process_credentials.rb +45 -27
  75. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  76. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  77. data/lib/aws-sdk-core/query/handler.rb +4 -4
  78. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  79. data/lib/aws-sdk-core/query.rb +2 -1
  80. data/lib/aws-sdk-core/refreshing_credentials.rb +12 -12
  81. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  82. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  83. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  84. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  85. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  86. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
  87. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  88. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  89. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  90. data/lib/aws-sdk-core/rest.rb +1 -0
  91. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  92. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
  93. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
  94. data/lib/aws-sdk-core/rpc_v2/handler.rb +74 -0
  95. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  96. data/lib/aws-sdk-core/rpc_v2.rb +6 -0
  97. data/lib/aws-sdk-core/shared_config.rb +77 -18
  98. data/lib/aws-sdk-core/sso_credentials.rb +80 -45
  99. data/lib/aws-sdk-core/sso_token_provider.rb +3 -2
  100. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +41 -0
  101. data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
  102. data/lib/aws-sdk-core/util.rb +39 -0
  103. data/lib/aws-sdk-core/waiters/poller.rb +4 -2
  104. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  105. data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
  106. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  107. data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +2 -0
  108. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  109. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  110. data/lib/aws-sdk-core.rb +8 -2
  111. data/lib/aws-sdk-sso/client.rb +103 -46
  112. data/lib/aws-sdk-sso/client_api.rb +6 -0
  113. data/lib/aws-sdk-sso/endpoint_provider.rb +41 -96
  114. data/lib/aws-sdk-sso/endpoints.rb +1 -0
  115. data/lib/aws-sdk-sso/plugins/endpoints.rb +4 -2
  116. data/lib/aws-sdk-sso/types.rb +0 -35
  117. data/lib/aws-sdk-sso.rb +1 -1
  118. data/lib/aws-sdk-ssooidc/client.rb +488 -74
  119. data/lib/aws-sdk-ssooidc/client_api.rb +82 -1
  120. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +41 -95
  121. data/lib/aws-sdk-ssooidc/endpoints.rb +15 -0
  122. data/lib/aws-sdk-ssooidc/errors.rb +52 -0
  123. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +6 -2
  124. data/lib/aws-sdk-ssooidc/types.rb +372 -83
  125. data/lib/aws-sdk-ssooidc.rb +1 -1
  126. data/lib/aws-sdk-sts/client.rb +361 -288
  127. data/lib/aws-sdk-sts/client_api.rb +24 -11
  128. data/lib/aws-sdk-sts/endpoint_provider.rb +96 -213
  129. data/lib/aws-sdk-sts/endpoints.rb +1 -0
  130. data/lib/aws-sdk-sts/plugins/endpoints.rb +4 -2
  131. data/lib/aws-sdk-sts/presigner.rb +1 -1
  132. data/lib/aws-sdk-sts/types.rb +128 -197
  133. data/lib/aws-sdk-sts.rb +1 -1
  134. data/lib/seahorse/client/async_base.rb +1 -1
  135. data/lib/seahorse/client/async_response.rb +19 -0
  136. data/lib/seahorse/client/base.rb +18 -7
  137. data/lib/seahorse/client/configuration.rb +0 -4
  138. data/lib/seahorse/client/h2/connection.rb +12 -11
  139. data/lib/seahorse/client/h2/handler.rb +1 -0
  140. data/lib/seahorse/client/handler.rb +1 -1
  141. data/lib/seahorse/client/net_http/connection_pool.rb +3 -9
  142. data/lib/seahorse/client/net_http/patches.rb +1 -4
  143. data/lib/seahorse/client/plugin.rb +9 -0
  144. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  145. data/lib/seahorse/client/plugins/h2.rb +3 -3
  146. data/lib/seahorse/client/plugins/net_http.rb +48 -16
  147. data/lib/seahorse/client/plugins/request_callback.rb +31 -0
  148. data/lib/seahorse/client/response.rb +6 -0
  149. data/lib/seahorse/model/operation.rb +3 -0
  150. data/lib/seahorse/model/shapes.rb +2 -2
  151. data/sig/aws-sdk-core/client_stubs.rbs +10 -0
  152. data/sig/aws-sdk-core/errors.rbs +22 -0
  153. data/sig/aws-sdk-core/resources/collection.rbs +21 -0
  154. data/sig/aws-sdk-core/structure.rbs +4 -0
  155. data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
  156. data/sig/aws-sdk-core.rbs +7 -0
  157. data/sig/seahorse/client/base.rbs +25 -0
  158. data/sig/seahorse/client/handler_builder.rbs +16 -0
  159. data/sig/seahorse/client/response.rbs +61 -0
  160. metadata +44 -17
  161. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  162. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  163. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  164. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -10,32 +10,6 @@
10
10
  module Aws::STS
11
11
  module Types
12
12
 
13
- # @note When making an API call, you may pass AssumeRoleRequest
14
- # data as a hash:
15
- #
16
- # {
17
- # role_arn: "arnType", # required
18
- # role_session_name: "roleSessionNameType", # required
19
- # policy_arns: [
20
- # {
21
- # arn: "arnType",
22
- # },
23
- # ],
24
- # policy: "sessionPolicyDocumentType",
25
- # duration_seconds: 1,
26
- # tags: [
27
- # {
28
- # key: "tagKeyType", # required
29
- # value: "tagValueType", # required
30
- # },
31
- # ],
32
- # transitive_tag_keys: ["tagKeyType"],
33
- # external_id: "externalIdType",
34
- # serial_number: "serialNumberType",
35
- # token_code: "tokenCodeType",
36
- # source_identity: "sourceIdentityType",
37
- # }
38
- #
39
13
  # @!attribute [rw] role_arn
40
14
  # The Amazon Resource Name (ARN) of the role to assume.
41
15
  # @return [String]
@@ -70,12 +44,13 @@ module Aws::STS
70
44
  # Web Services Service Namespaces][1] in the Amazon Web Services
71
45
  # General Reference.
72
46
  #
73
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
74
- # policies and session tags into a packed binary format that has a
75
- # separate limit. Your request can fail for this limit even if your
76
- # plaintext meets the other requirements. The `PackedPolicySize`
77
- # response element indicates by percentage how close the policies and
78
- # tags for your request are to the upper size limit.
47
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
48
+ # session policy, managed policy ARNs, and session tags into a packed
49
+ # binary format that has a separate limit. Your request can fail for
50
+ # this limit even if your plaintext meets the other requirements. The
51
+ # `PackedPolicySize` response element indicates by percentage how
52
+ # close the policies and tags for your request are to the upper size
53
+ # limit.
79
54
  #
80
55
  # </note>
81
56
  #
@@ -116,12 +91,13 @@ module Aws::STS
116
91
  # include the tab (\\u0009), linefeed (\\u000A), and carriage return
117
92
  # (\\u000D) characters.
118
93
  #
119
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
120
- # policies and session tags into a packed binary format that has a
121
- # separate limit. Your request can fail for this limit even if your
122
- # plaintext meets the other requirements. The `PackedPolicySize`
123
- # response element indicates by percentage how close the policies and
124
- # tags for your request are to the upper size limit.
94
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
95
+ # session policy, managed policy ARNs, and session tags into a packed
96
+ # binary format that has a separate limit. Your request can fail for
97
+ # this limit even if your plaintext meets the other requirements. The
98
+ # `PackedPolicySize` response element indicates by percentage how
99
+ # close the policies and tags for your request are to the upper size
100
+ # limit.
125
101
  #
126
102
  # </note>
127
103
  #
@@ -181,12 +157,13 @@ module Aws::STS
181
157
  # values can’t exceed 256 characters. For these and additional limits,
182
158
  # see [IAM and STS Character Limits][2] in the *IAM User Guide*.
183
159
  #
184
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
185
- # policies and session tags into a packed binary format that has a
186
- # separate limit. Your request can fail for this limit even if your
187
- # plaintext meets the other requirements. The `PackedPolicySize`
188
- # response element indicates by percentage how close the policies and
189
- # tags for your request are to the upper size limit.
160
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
161
+ # session policy, managed policy ARNs, and session tags into a packed
162
+ # binary format that has a separate limit. Your request can fail for
163
+ # this limit even if your plaintext meets the other requirements. The
164
+ # `PackedPolicySize` response element indicates by percentage how
165
+ # close the policies and tags for your request are to the upper size
166
+ # limit.
190
167
  #
191
168
  # </note>
192
169
  #
@@ -310,6 +287,19 @@ module Aws::STS
310
287
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
311
288
  # @return [String]
312
289
  #
290
+ # @!attribute [rw] provided_contexts
291
+ # A list of previously acquired trusted context assertions in the
292
+ # format of a JSON array. The trusted context assertion is signed and
293
+ # encrypted by Amazon Web Services STS.
294
+ #
295
+ # The following is an example of a `ProvidedContext` value that
296
+ # includes a single trusted context assertion and the ARN of the
297
+ # context provider from which the trusted context assertion was
298
+ # generated.
299
+ #
300
+ # `[\{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"\}]`
301
+ # @return [Array<Types::ProvidedContext>]
302
+ #
313
303
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest AWS API Documentation
314
304
  #
315
305
  class AssumeRoleRequest < Struct.new(
@@ -323,7 +313,8 @@ module Aws::STS
323
313
  :external_id,
324
314
  :serial_number,
325
315
  :token_code,
326
- :source_identity)
316
+ :source_identity,
317
+ :provided_contexts)
327
318
  SENSITIVE = []
328
319
  include Aws::Structure
329
320
  end
@@ -394,22 +385,6 @@ module Aws::STS
394
385
  include Aws::Structure
395
386
  end
396
387
 
397
- # @note When making an API call, you may pass AssumeRoleWithSAMLRequest
398
- # data as a hash:
399
- #
400
- # {
401
- # role_arn: "arnType", # required
402
- # principal_arn: "arnType", # required
403
- # saml_assertion: "SAMLAssertionType", # required
404
- # policy_arns: [
405
- # {
406
- # arn: "arnType",
407
- # },
408
- # ],
409
- # policy: "sessionPolicyDocumentType",
410
- # duration_seconds: 1,
411
- # }
412
- #
413
388
  # @!attribute [rw] role_arn
414
389
  # The Amazon Resource Name (ARN) of the role that the caller is
415
390
  # assuming.
@@ -443,12 +418,13 @@ module Aws::STS
443
418
  # Web Services Service Namespaces][1] in the Amazon Web Services
444
419
  # General Reference.
445
420
  #
446
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
447
- # policies and session tags into a packed binary format that has a
448
- # separate limit. Your request can fail for this limit even if your
449
- # plaintext meets the other requirements. The `PackedPolicySize`
450
- # response element indicates by percentage how close the policies and
451
- # tags for your request are to the upper size limit.
421
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
422
+ # session policy, managed policy ARNs, and session tags into a packed
423
+ # binary format that has a separate limit. Your request can fail for
424
+ # this limit even if your plaintext meets the other requirements. The
425
+ # `PackedPolicySize` response element indicates by percentage how
426
+ # close the policies and tags for your request are to the upper size
427
+ # limit.
452
428
  #
453
429
  # </note>
454
430
  #
@@ -489,12 +465,13 @@ module Aws::STS
489
465
  # include the tab (\\u0009), linefeed (\\u000A), and carriage return
490
466
  # (\\u000D) characters.
491
467
  #
492
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
493
- # policies and session tags into a packed binary format that has a
494
- # separate limit. Your request can fail for this limit even if your
495
- # plaintext meets the other requirements. The `PackedPolicySize`
496
- # response element indicates by percentage how close the policies and
497
- # tags for your request are to the upper size limit.
468
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
469
+ # session policy, managed policy ARNs, and session tags into a packed
470
+ # binary format that has a separate limit. Your request can fail for
471
+ # this limit even if your plaintext meets the other requirements. The
472
+ # `PackedPolicySize` response element indicates by percentage how
473
+ # close the policies and tags for your request are to the upper size
474
+ # limit.
498
475
  #
499
476
  # </note>
500
477
  #
@@ -545,7 +522,7 @@ module Aws::STS
545
522
  :policy_arns,
546
523
  :policy,
547
524
  :duration_seconds)
548
- SENSITIVE = []
525
+ SENSITIVE = [:saml_assertion]
549
526
  include Aws::Structure
550
527
  end
551
528
 
@@ -613,7 +590,7 @@ module Aws::STS
613
590
  # in IAM.
614
591
  #
615
592
  # The combination of `NameQualifier` and `Subject` can be used to
616
- # uniquely identify a federated user.
593
+ # uniquely identify a user.
617
594
  #
618
595
  # The following pseudocode shows how the hash value is calculated:
619
596
  #
@@ -665,23 +642,6 @@ module Aws::STS
665
642
  include Aws::Structure
666
643
  end
667
644
 
668
- # @note When making an API call, you may pass AssumeRoleWithWebIdentityRequest
669
- # data as a hash:
670
- #
671
- # {
672
- # role_arn: "arnType", # required
673
- # role_session_name: "roleSessionNameType", # required
674
- # web_identity_token: "clientTokenType", # required
675
- # provider_id: "urlType",
676
- # policy_arns: [
677
- # {
678
- # arn: "arnType",
679
- # },
680
- # ],
681
- # policy: "sessionPolicyDocumentType",
682
- # duration_seconds: 1,
683
- # }
684
- #
685
645
  # @!attribute [rw] role_arn
686
646
  # The Amazon Resource Name (ARN) of the role that the caller is
687
647
  # assuming.
@@ -706,7 +666,8 @@ module Aws::STS
706
666
  # provided by the identity provider. Your application must get this
707
667
  # token by authenticating the user who is using your application with
708
668
  # a web identity provider before the application makes an
709
- # `AssumeRoleWithWebIdentity` call.
669
+ # `AssumeRoleWithWebIdentity` call. Only tokens with RSA algorithms
670
+ # (RS256) are supported.
710
671
  # @return [String]
711
672
  #
712
673
  # @!attribute [rw] provider_id
@@ -733,12 +694,13 @@ module Aws::STS
733
694
  # Web Services Service Namespaces][1] in the Amazon Web Services
734
695
  # General Reference.
735
696
  #
736
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
737
- # policies and session tags into a packed binary format that has a
738
- # separate limit. Your request can fail for this limit even if your
739
- # plaintext meets the other requirements. The `PackedPolicySize`
740
- # response element indicates by percentage how close the policies and
741
- # tags for your request are to the upper size limit.
697
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
698
+ # session policy, managed policy ARNs, and session tags into a packed
699
+ # binary format that has a separate limit. Your request can fail for
700
+ # this limit even if your plaintext meets the other requirements. The
701
+ # `PackedPolicySize` response element indicates by percentage how
702
+ # close the policies and tags for your request are to the upper size
703
+ # limit.
742
704
  #
743
705
  # </note>
744
706
  #
@@ -779,12 +741,13 @@ module Aws::STS
779
741
  # include the tab (\\u0009), linefeed (\\u000A), and carriage return
780
742
  # (\\u000D) characters.
781
743
  #
782
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
783
- # policies and session tags into a packed binary format that has a
784
- # separate limit. Your request can fail for this limit even if your
785
- # plaintext meets the other requirements. The `PackedPolicySize`
786
- # response element indicates by percentage how close the policies and
787
- # tags for your request are to the upper size limit.
744
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
745
+ # session policy, managed policy ARNs, and session tags into a packed
746
+ # binary format that has a separate limit. Your request can fail for
747
+ # this limit even if your plaintext meets the other requirements. The
748
+ # `PackedPolicySize` response element indicates by percentage how
749
+ # close the policies and tags for your request are to the upper size
750
+ # limit.
788
751
  #
789
752
  # </note>
790
753
  #
@@ -832,7 +795,7 @@ module Aws::STS
832
795
  :policy_arns,
833
796
  :policy,
834
797
  :duration_seconds)
835
- SENSITIVE = []
798
+ SENSITIVE = [:web_identity_token]
836
799
  include Aws::Structure
837
800
  end
838
801
 
@@ -993,17 +956,10 @@ module Aws::STS
993
956
  :secret_access_key,
994
957
  :session_token,
995
958
  :expiration)
996
- SENSITIVE = []
959
+ SENSITIVE = [:secret_access_key]
997
960
  include Aws::Structure
998
961
  end
999
962
 
1000
- # @note When making an API call, you may pass DecodeAuthorizationMessageRequest
1001
- # data as a hash:
1002
- #
1003
- # {
1004
- # encoded_message: "encodedMessageType", # required
1005
- # }
1006
- #
1007
963
  # @!attribute [rw] encoded_message
1008
964
  # The encoded message that was returned with the response.
1009
965
  # @return [String]
@@ -1074,13 +1030,6 @@ module Aws::STS
1074
1030
  include Aws::Structure
1075
1031
  end
1076
1032
 
1077
- # @note When making an API call, you may pass GetAccessKeyInfoRequest
1078
- # data as a hash:
1079
- #
1080
- # {
1081
- # access_key_id: "accessKeyIdType", # required
1082
- # }
1083
- #
1084
1033
  # @!attribute [rw] access_key_id
1085
1034
  # The identifier of an access key.
1086
1035
  #
@@ -1149,26 +1098,6 @@ module Aws::STS
1149
1098
  include Aws::Structure
1150
1099
  end
1151
1100
 
1152
- # @note When making an API call, you may pass GetFederationTokenRequest
1153
- # data as a hash:
1154
- #
1155
- # {
1156
- # name: "userNameType", # required
1157
- # policy: "sessionPolicyDocumentType",
1158
- # policy_arns: [
1159
- # {
1160
- # arn: "arnType",
1161
- # },
1162
- # ],
1163
- # duration_seconds: 1,
1164
- # tags: [
1165
- # {
1166
- # key: "tagKeyType", # required
1167
- # value: "tagValueType", # required
1168
- # },
1169
- # ],
1170
- # }
1171
- #
1172
1101
  # @!attribute [rw] name
1173
1102
  # The name of the federated user. The name is used as an identifier
1174
1103
  # for the temporary security credentials (such as `Bob`). For example,
@@ -1187,8 +1116,8 @@ module Aws::STS
1187
1116
  #
1188
1117
  # You must pass an inline or managed [session policy][1] to this
1189
1118
  # operation. You can pass a single JSON policy document to use as an
1190
- # inline session policy. You can also specify up to 10 managed
1191
- # policies to use as managed session policies.
1119
+ # inline session policy. You can also specify up to 10 managed policy
1120
+ # Amazon Resource Names (ARNs) to use as managed session policies.
1192
1121
  #
1193
1122
  # This parameter is optional. However, if you do not pass any session
1194
1123
  # policies, then the resulting federated user session has no
@@ -1216,12 +1145,13 @@ module Aws::STS
1216
1145
  # include the tab (\\u0009), linefeed (\\u000A), and carriage return
1217
1146
  # (\\u000D) characters.
1218
1147
  #
1219
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1220
- # policies and session tags into a packed binary format that has a
1221
- # separate limit. Your request can fail for this limit even if your
1222
- # plaintext meets the other requirements. The `PackedPolicySize`
1223
- # response element indicates by percentage how close the policies and
1224
- # tags for your request are to the upper size limit.
1148
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
1149
+ # session policy, managed policy ARNs, and session tags into a packed
1150
+ # binary format that has a separate limit. Your request can fail for
1151
+ # this limit even if your plaintext meets the other requirements. The
1152
+ # `PackedPolicySize` response element indicates by percentage how
1153
+ # close the policies and tags for your request are to the upper size
1154
+ # limit.
1225
1155
  #
1226
1156
  # </note>
1227
1157
  #
@@ -1238,13 +1168,13 @@ module Aws::STS
1238
1168
  #
1239
1169
  # You must pass an inline or managed [session policy][1] to this
1240
1170
  # operation. You can pass a single JSON policy document to use as an
1241
- # inline session policy. You can also specify up to 10 managed
1242
- # policies to use as managed session policies. The plaintext that you
1243
- # use for both inline and managed session policies can't exceed 2,048
1244
- # characters. You can provide up to 10 managed policy ARNs. For more
1245
- # information about ARNs, see [Amazon Resource Names (ARNs) and Amazon
1246
- # Web Services Service Namespaces][2] in the Amazon Web Services
1247
- # General Reference.
1171
+ # inline session policy. You can also specify up to 10 managed policy
1172
+ # Amazon Resource Names (ARNs) to use as managed session policies. The
1173
+ # plaintext that you use for both inline and managed session policies
1174
+ # can't exceed 2,048 characters. You can provide up to 10 managed
1175
+ # policy ARNs. For more information about ARNs, see [Amazon Resource
1176
+ # Names (ARNs) and Amazon Web Services Service Namespaces][2] in the
1177
+ # Amazon Web Services General Reference.
1248
1178
  #
1249
1179
  # This parameter is optional. However, if you do not pass any session
1250
1180
  # policies, then the resulting federated user session has no
@@ -1265,12 +1195,13 @@ module Aws::STS
1265
1195
  # are granted in addition to the permissions that are granted by the
1266
1196
  # session policies.
1267
1197
  #
1268
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1269
- # policies and session tags into a packed binary format that has a
1270
- # separate limit. Your request can fail for this limit even if your
1271
- # plaintext meets the other requirements. The `PackedPolicySize`
1272
- # response element indicates by percentage how close the policies and
1273
- # tags for your request are to the upper size limit.
1198
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
1199
+ # session policy, managed policy ARNs, and session tags into a packed
1200
+ # binary format that has a separate limit. Your request can fail for
1201
+ # this limit even if your plaintext meets the other requirements. The
1202
+ # `PackedPolicySize` response element indicates by percentage how
1203
+ # close the policies and tags for your request are to the upper size
1204
+ # limit.
1274
1205
  #
1275
1206
  # </note>
1276
1207
  #
@@ -1284,11 +1215,10 @@ module Aws::STS
1284
1215
  # The duration, in seconds, that the session should last. Acceptable
1285
1216
  # durations for federation sessions range from 900 seconds (15
1286
1217
  # minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12
1287
- # hours) as the default. Sessions obtained using Amazon Web Services
1288
- # account root user credentials are restricted to a maximum of 3,600
1289
- # seconds (one hour). If the specified duration is longer than one
1290
- # hour, the session obtained by using root user credentials defaults
1291
- # to one hour.
1218
+ # hours) as the default. Sessions obtained using root user credentials
1219
+ # are restricted to a maximum of 3,600 seconds (one hour). If the
1220
+ # specified duration is longer than one hour, the session obtained by
1221
+ # using root user credentials defaults to one hour.
1292
1222
  # @return [Integer]
1293
1223
  #
1294
1224
  # @!attribute [rw] tags
@@ -1301,12 +1231,13 @@ module Aws::STS
1301
1231
  # values can’t exceed 256 characters. For these and additional limits,
1302
1232
  # see [IAM and STS Character Limits][2] in the *IAM User Guide*.
1303
1233
  #
1304
- # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1305
- # policies and session tags into a packed binary format that has a
1306
- # separate limit. Your request can fail for this limit even if your
1307
- # plaintext meets the other requirements. The `PackedPolicySize`
1308
- # response element indicates by percentage how close the policies and
1309
- # tags for your request are to the upper size limit.
1234
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
1235
+ # session policy, managed policy ARNs, and session tags into a packed
1236
+ # binary format that has a separate limit. Your request can fail for
1237
+ # this limit even if your plaintext meets the other requirements. The
1238
+ # `PackedPolicySize` response element indicates by percentage how
1239
+ # close the policies and tags for your request are to the upper size
1240
+ # limit.
1310
1241
  #
1311
1242
  # </note>
1312
1243
  #
@@ -1379,15 +1310,6 @@ module Aws::STS
1379
1310
  include Aws::Structure
1380
1311
  end
1381
1312
 
1382
- # @note When making an API call, you may pass GetSessionTokenRequest
1383
- # data as a hash:
1384
- #
1385
- # {
1386
- # duration_seconds: 1,
1387
- # serial_number: "serialNumberType",
1388
- # token_code: "tokenCodeType",
1389
- # }
1390
- #
1391
1313
  # @!attribute [rw] duration_seconds
1392
1314
  # The duration, in seconds, that the credentials should remain valid.
1393
1315
  # Acceptable durations for IAM user sessions range from 900 seconds
@@ -1571,13 +1493,6 @@ module Aws::STS
1571
1493
  # A reference to the IAM managed policy that is passed as a session
1572
1494
  # policy for a role session or a federated user session.
1573
1495
  #
1574
- # @note When making an API call, you may pass PolicyDescriptorType
1575
- # data as a hash:
1576
- #
1577
- # {
1578
- # arn: "arnType",
1579
- # }
1580
- #
1581
1496
  # @!attribute [rw] arn
1582
1497
  # The Amazon Resource Name (ARN) of the IAM managed policy to use as a
1583
1498
  # session policy for the role. For more information about ARNs, see
@@ -1597,6 +1512,30 @@ module Aws::STS
1597
1512
  include Aws::Structure
1598
1513
  end
1599
1514
 
1515
+ # Contains information about the provided context. This includes the
1516
+ # signed and encrypted trusted context assertion and the context
1517
+ # provider ARN from which the trusted context assertion was generated.
1518
+ #
1519
+ # @!attribute [rw] provider_arn
1520
+ # The context provider ARN from which the trusted context assertion
1521
+ # was generated.
1522
+ # @return [String]
1523
+ #
1524
+ # @!attribute [rw] context_assertion
1525
+ # The signed and encrypted trusted context assertion generated by the
1526
+ # context provider. The trusted context assertion is signed and
1527
+ # encrypted by Amazon Web Services STS.
1528
+ # @return [String]
1529
+ #
1530
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/ProvidedContext AWS API Documentation
1531
+ #
1532
+ class ProvidedContext < Struct.new(
1533
+ :provider_arn,
1534
+ :context_assertion)
1535
+ SENSITIVE = []
1536
+ include Aws::Structure
1537
+ end
1538
+
1600
1539
  # STS is not activated in the requested region for the account that is
1601
1540
  # being asked to generate credentials. The account administrator must
1602
1541
  # use the IAM console to activate STS in that region. For more
@@ -1628,14 +1567,6 @@ module Aws::STS
1628
1567
  #
1629
1568
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
1630
1569
  #
1631
- # @note When making an API call, you may pass Tag
1632
- # data as a hash:
1633
- #
1634
- # {
1635
- # key: "tagKeyType", # required
1636
- # value: "tagValueType", # required
1637
- # }
1638
- #
1639
1570
  # @!attribute [rw] key
1640
1571
  # The key for a session tag.
1641
1572
  #
data/lib/aws-sdk-sts.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sts/customizations'
54
54
  # @!group service
55
55
  module Aws::STS
56
56
 
57
- GEM_VERSION = '3.165.0'
57
+ GEM_VERSION = '3.201.0'
58
58
 
59
59
  end
@@ -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
 
@@ -204,10 +204,6 @@ module Seahorse
204
204
  def value_at(opt_name)
205
205
  value = @struct[opt_name]
206
206
  if value.is_a?(Defaults)
207
- # Legacy endpoints must continue to exist.
208
- if opt_name == :endpoint && @struct.members.include?(:regional_endpoint)
209
- @struct[:regional_endpoint] = true
210
- end
211
207
  resolve_defaults(opt_name, value)
212
208
  else
213
209
  value