aws-sdk-core 3.219.0 → 3.240.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +222 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +2 -1
  5. data/lib/aws-sdk-core/assume_role_credentials.rb +9 -8
  6. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +3 -2
  7. data/lib/aws-sdk-core/client_stubs.rb +28 -48
  8. data/lib/aws-sdk-core/credential_provider.rb +4 -0
  9. data/lib/aws-sdk-core/credential_provider_chain.rb +91 -22
  10. data/lib/aws-sdk-core/credentials.rb +6 -0
  11. data/lib/aws-sdk-core/ecs_credentials.rb +14 -13
  12. data/lib/aws-sdk-core/endpoints/matchers.rb +2 -1
  13. data/lib/aws-sdk-core/endpoints.rb +37 -13
  14. data/lib/aws-sdk-core/error_handler.rb +5 -0
  15. data/lib/aws-sdk-core/errors.rb +5 -2
  16. data/lib/aws-sdk-core/event_emitter.rb +1 -1
  17. data/lib/aws-sdk-core/instance_profile_credentials.rb +147 -157
  18. data/lib/aws-sdk-core/json/error_handler.rb +14 -4
  19. data/lib/aws-sdk-core/login_credentials.rb +229 -0
  20. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +28 -14
  21. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
  22. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +75 -59
  23. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  24. data/lib/aws-sdk-core/plugins/sign.rb +29 -20
  25. data/lib/aws-sdk-core/plugins/stub_responses.rb +30 -8
  26. data/lib/aws-sdk-core/plugins/user_agent.rb +26 -2
  27. data/lib/aws-sdk-core/process_credentials.rb +1 -1
  28. data/lib/aws-sdk-core/refreshing_credentials.rb +8 -11
  29. data/lib/aws-sdk-core/rest/request/headers.rb +1 -1
  30. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +26 -16
  31. data/lib/aws-sdk-core/rpc_v2/parser.rb +8 -0
  32. data/lib/aws-sdk-core/shared_config.rb +102 -21
  33. data/lib/aws-sdk-core/shared_credentials.rb +1 -0
  34. data/lib/aws-sdk-core/sso_credentials.rb +3 -1
  35. data/lib/aws-sdk-core/static_token_provider.rb +1 -2
  36. data/lib/aws-sdk-core/token.rb +3 -3
  37. data/lib/aws-sdk-core/token_provider.rb +4 -0
  38. data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
  39. data/lib/aws-sdk-core/util.rb +2 -1
  40. data/lib/aws-sdk-core/xml/error_handler.rb +3 -1
  41. data/lib/aws-sdk-core.rb +4 -0
  42. data/lib/aws-sdk-signin/client.rb +604 -0
  43. data/lib/aws-sdk-signin/client_api.rb +119 -0
  44. data/lib/aws-sdk-signin/customizations.rb +1 -0
  45. data/lib/aws-sdk-signin/endpoint_parameters.rb +69 -0
  46. data/lib/aws-sdk-signin/endpoint_provider.rb +59 -0
  47. data/lib/aws-sdk-signin/endpoints.rb +20 -0
  48. data/lib/aws-sdk-signin/errors.rb +122 -0
  49. data/lib/aws-sdk-signin/plugins/endpoints.rb +77 -0
  50. data/lib/aws-sdk-signin/resource.rb +26 -0
  51. data/lib/aws-sdk-signin/types.rb +299 -0
  52. data/lib/aws-sdk-signin.rb +63 -0
  53. data/lib/aws-sdk-sso/client.rb +25 -19
  54. data/lib/aws-sdk-sso/endpoint_parameters.rb +4 -4
  55. data/lib/aws-sdk-sso/endpoint_provider.rb +2 -2
  56. data/lib/aws-sdk-sso.rb +1 -1
  57. data/lib/aws-sdk-ssooidc/client.rb +57 -27
  58. data/lib/aws-sdk-ssooidc/client_api.rb +11 -0
  59. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +4 -4
  60. data/lib/aws-sdk-ssooidc/errors.rb +10 -0
  61. data/lib/aws-sdk-ssooidc/types.rb +45 -6
  62. data/lib/aws-sdk-ssooidc.rb +1 -1
  63. data/lib/aws-sdk-sts/client.rb +160 -30
  64. data/lib/aws-sdk-sts/client_api.rb +82 -8
  65. data/lib/aws-sdk-sts/customizations.rb +0 -1
  66. data/lib/aws-sdk-sts/endpoint_parameters.rb +5 -5
  67. data/lib/aws-sdk-sts/endpoint_provider.rb +18 -18
  68. data/lib/aws-sdk-sts/errors.rb +79 -0
  69. data/lib/aws-sdk-sts/presigner.rb +2 -6
  70. data/lib/aws-sdk-sts/types.rb +175 -6
  71. data/lib/aws-sdk-sts.rb +1 -1
  72. data/lib/seahorse/client/async_base.rb +4 -5
  73. data/lib/seahorse/client/base.rb +0 -14
  74. data/lib/seahorse/client/h2/connection.rb +18 -28
  75. data/lib/seahorse/client/h2/handler.rb +6 -1
  76. data/lib/seahorse/client/http/response.rb +1 -1
  77. data/lib/seahorse/client/net_http/connection_pool.rb +2 -1
  78. data/lib/seahorse/client/networking_error.rb +1 -1
  79. data/lib/seahorse/client/plugins/h2.rb +4 -4
  80. data/lib/seahorse/client/request_context.rb +2 -2
  81. data/lib/seahorse/util.rb +2 -1
  82. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  83. data/sig/seahorse/client/async_base.rbs +18 -0
  84. metadata +46 -8
@@ -12,54 +12,54 @@ module Aws::STS
12
12
  def resolve_endpoint(parameters)
13
13
  if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_global_endpoint, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(parameters.endpoint)) && Aws::Endpoints::Matchers.set?(parameters.region) && (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region)) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
14
14
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ap-northeast-1")
15
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
15
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
16
16
  end
17
17
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ap-south-1")
18
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
18
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
19
19
  end
20
20
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ap-southeast-1")
21
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
21
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
22
22
  end
23
23
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ap-southeast-2")
24
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
24
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
25
25
  end
26
26
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "aws-global")
27
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
27
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
28
28
  end
29
29
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "ca-central-1")
30
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
30
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
31
31
  end
32
32
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-central-1")
33
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
33
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
34
34
  end
35
35
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-north-1")
36
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
36
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
37
37
  end
38
38
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-west-1")
39
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
39
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
40
40
  end
41
41
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-west-2")
42
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
42
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
43
43
  end
44
44
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "eu-west-3")
45
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
45
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
46
46
  end
47
47
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "sa-east-1")
48
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
48
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
49
49
  end
50
50
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-east-1")
51
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
51
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
52
52
  end
53
53
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-east-2")
54
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
54
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
55
55
  end
56
56
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-west-1")
57
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
57
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
58
58
  end
59
59
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-west-2")
60
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
60
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
61
61
  end
62
- return Aws::Endpoints::Endpoint.new(url: "https://sts.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"#{parameters.region}"}]})
62
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "#{parameters.region}"}]})
63
63
  end
64
64
  if Aws::Endpoints::Matchers.set?(parameters.endpoint)
65
65
  if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
@@ -94,7 +94,7 @@ module Aws::STS
94
94
  raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
95
95
  end
96
96
  if Aws::Endpoints::Matchers.string_equals?(parameters.region, "aws-global")
97
- return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
97
+ return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes" => [{"name" => "sigv4", "signingName" => "sts", "signingRegion" => "us-east-1"}]})
98
98
  end
99
99
  return Aws::Endpoints::Endpoint.new(url: "https://sts.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
100
100
  end
@@ -28,13 +28,22 @@ module Aws::STS
28
28
  #
29
29
  # ## Error Classes
30
30
  # * {ExpiredTokenException}
31
+ # * {ExpiredTradeInTokenException}
31
32
  # * {IDPCommunicationErrorException}
33
+ # * This error class is not used. `IDPCommunicationError` is used during parsing instead.
32
34
  # * {IDPRejectedClaimException}
35
+ # * This error class is not used. `IDPRejectedClaim` is used during parsing instead.
33
36
  # * {InvalidAuthorizationMessageException}
34
37
  # * {InvalidIdentityTokenException}
38
+ # * This error class is not used. `InvalidIdentityToken` is used during parsing instead.
39
+ # * {JWTPayloadSizeExceededException}
35
40
  # * {MalformedPolicyDocumentException}
41
+ # * This error class is not used. `MalformedPolicyDocument` is used during parsing instead.
42
+ # * {OutboundWebIdentityFederationDisabledException}
36
43
  # * {PackedPolicyTooLargeException}
44
+ # * This error class is not used. `PackedPolicyTooLarge` is used during parsing instead.
37
45
  # * {RegionDisabledException}
46
+ # * {SessionDurationEscalationException}
38
47
  #
39
48
  # Additionally, error classes are dynamically generated for service errors based on the error code
40
49
  # if they are not defined above.
@@ -57,6 +66,23 @@ module Aws::STS
57
66
  end
58
67
  end
59
68
 
69
+ class ExpiredTradeInTokenException < ServiceError
70
+
71
+ # @param [Seahorse::Client::RequestContext] context
72
+ # @param [String] message
73
+ # @param [Aws::STS::Types::ExpiredTradeInTokenException] data
74
+ def initialize(context, message, data = Aws::EmptyStructure.new)
75
+ super(context, message, data)
76
+ end
77
+
78
+ # @return [String]
79
+ def message
80
+ @message || @data[:message]
81
+ end
82
+ end
83
+
84
+ # @deprecated This error class is not used during parsing.
85
+ # Please use `IDPCommunicationError` instead.
60
86
  class IDPCommunicationErrorException < ServiceError
61
87
 
62
88
  # @param [Seahorse::Client::RequestContext] context
@@ -72,6 +98,8 @@ module Aws::STS
72
98
  end
73
99
  end
74
100
 
101
+ # @deprecated This error class is not used during parsing.
102
+ # Please use `IDPRejectedClaim` instead.
75
103
  class IDPRejectedClaimException < ServiceError
76
104
 
77
105
  # @param [Seahorse::Client::RequestContext] context
@@ -102,6 +130,8 @@ module Aws::STS
102
130
  end
103
131
  end
104
132
 
133
+ # @deprecated This error class is not used during parsing.
134
+ # Please use `InvalidIdentityToken` instead.
105
135
  class InvalidIdentityTokenException < ServiceError
106
136
 
107
137
  # @param [Seahorse::Client::RequestContext] context
@@ -117,6 +147,23 @@ module Aws::STS
117
147
  end
118
148
  end
119
149
 
150
+ class JWTPayloadSizeExceededException < ServiceError
151
+
152
+ # @param [Seahorse::Client::RequestContext] context
153
+ # @param [String] message
154
+ # @param [Aws::STS::Types::JWTPayloadSizeExceededException] data
155
+ def initialize(context, message, data = Aws::EmptyStructure.new)
156
+ super(context, message, data)
157
+ end
158
+
159
+ # @return [String]
160
+ def message
161
+ @message || @data[:message]
162
+ end
163
+ end
164
+
165
+ # @deprecated This error class is not used during parsing.
166
+ # Please use `MalformedPolicyDocument` instead.
120
167
  class MalformedPolicyDocumentException < ServiceError
121
168
 
122
169
  # @param [Seahorse::Client::RequestContext] context
@@ -132,6 +179,23 @@ module Aws::STS
132
179
  end
133
180
  end
134
181
 
182
+ class OutboundWebIdentityFederationDisabledException < ServiceError
183
+
184
+ # @param [Seahorse::Client::RequestContext] context
185
+ # @param [String] message
186
+ # @param [Aws::STS::Types::OutboundWebIdentityFederationDisabledException] data
187
+ def initialize(context, message, data = Aws::EmptyStructure.new)
188
+ super(context, message, data)
189
+ end
190
+
191
+ # @return [String]
192
+ def message
193
+ @message || @data[:message]
194
+ end
195
+ end
196
+
197
+ # @deprecated This error class is not used during parsing.
198
+ # Please use `PackedPolicyTooLarge` instead.
135
199
  class PackedPolicyTooLargeException < ServiceError
136
200
 
137
201
  # @param [Seahorse::Client::RequestContext] context
@@ -162,5 +226,20 @@ module Aws::STS
162
226
  end
163
227
  end
164
228
 
229
+ class SessionDurationEscalationException < ServiceError
230
+
231
+ # @param [Seahorse::Client::RequestContext] context
232
+ # @param [String] message
233
+ # @param [Aws::STS::Types::SessionDurationEscalationException] data
234
+ def initialize(context, message, data = Aws::EmptyStructure.new)
235
+ super(context, message, data)
236
+ end
237
+
238
+ # @return [String]
239
+ def message
240
+ @message || @data[:message]
241
+ end
242
+ end
243
+
165
244
  end
166
245
  end
@@ -53,13 +53,9 @@ module Aws
53
53
  use_fips: context.config.use_fips_endpoint,
54
54
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy'
55
55
  )
56
- endpoint = context.config.endpoint_provider
57
- .resolve_endpoint(endpoint_params)
56
+ endpoint = context.config.endpoint_provider.resolve_endpoint(endpoint_params)
58
57
  auth_scheme = Aws::Endpoints.resolve_auth_scheme(context, endpoint)
59
-
60
- signer = Aws::Plugins::Sign.signer_for(
61
- auth_scheme, context.config
62
- )
58
+ signer = Aws::Plugins::Sign.signer_for(auth_scheme, context.config)
63
59
 
64
60
  signer.presign_url(
65
61
  http_method: 'GET',
@@ -35,7 +35,7 @@ module Aws::STS
35
35
  # The regex used to validate this parameter is a string of characters
36
36
  # consisting of upper- and lower-case alphanumeric characters with no
37
37
  # spaces. You can also include underscores or any of the following
38
- # characters: =,.@-
38
+ # characters: +=,.@-
39
39
  #
40
40
  #
41
41
  #
@@ -240,7 +240,7 @@ module Aws::STS
240
240
  # The regex used to validate this parameter is a string of characters
241
241
  # consisting of upper- and lower-case alphanumeric characters with no
242
242
  # spaces. You can also include underscores or any of the following
243
- # characters: =,.@:/-
243
+ # characters: +=,.@:\\/-
244
244
  #
245
245
  #
246
246
  #
@@ -259,7 +259,7 @@ module Aws::STS
259
259
  # The regex used to validate this parameter is a string of characters
260
260
  # consisting of upper- and lower-case alphanumeric characters with no
261
261
  # spaces. You can also include underscores or any of the following
262
- # characters: =,.@-
262
+ # characters: +=/:,.@-
263
263
  # @return [String]
264
264
  #
265
265
  # @!attribute [rw] token_code
@@ -961,8 +961,8 @@ module Aws::STS
961
961
  #
962
962
  # @!attribute [rw] task_policy_arn
963
963
  # The identity based policy that scopes the session to the privileged
964
- # tasks that can be performed. You can use one of following Amazon Web
965
- # Services managed policies to scope root session actions.
964
+ # tasks that can be performed. You must use one of following Amazon
965
+ # Web Services managed policies to scope root session actions:
966
966
  #
967
967
  # * [IAMAuditRootUserCredentials][1]
968
968
  #
@@ -1144,6 +1144,21 @@ module Aws::STS
1144
1144
  include Aws::Structure
1145
1145
  end
1146
1146
 
1147
+ # The trade-in token provided in the request has expired and can no
1148
+ # longer be exchanged for credentials. Request a new token and retry the
1149
+ # operation.
1150
+ #
1151
+ # @!attribute [rw] message
1152
+ # @return [String]
1153
+ #
1154
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/ExpiredTradeInTokenException AWS API Documentation
1155
+ #
1156
+ class ExpiredTradeInTokenException < Struct.new(
1157
+ :message)
1158
+ SENSITIVE = []
1159
+ include Aws::Structure
1160
+ end
1161
+
1147
1162
  # Identifiers for the federated user that is associated with the
1148
1163
  # credentials.
1149
1164
  #
@@ -1239,6 +1254,47 @@ module Aws::STS
1239
1254
  include Aws::Structure
1240
1255
  end
1241
1256
 
1257
+ # @!attribute [rw] trade_in_token
1258
+ # The token to exchange for temporary Amazon Web Services credentials.
1259
+ # This token must be valid and unexpired at the time of the request.
1260
+ # @return [String]
1261
+ #
1262
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetDelegatedAccessTokenRequest AWS API Documentation
1263
+ #
1264
+ class GetDelegatedAccessTokenRequest < Struct.new(
1265
+ :trade_in_token)
1266
+ SENSITIVE = [:trade_in_token]
1267
+ include Aws::Structure
1268
+ end
1269
+
1270
+ # @!attribute [rw] credentials
1271
+ # Amazon Web Services credentials for API authentication.
1272
+ # @return [Types::Credentials]
1273
+ #
1274
+ # @!attribute [rw] packed_policy_size
1275
+ # The percentage of the maximum policy size that is used by the
1276
+ # session policy. The policy size is calculated as the sum of all the
1277
+ # session policies and permission boundaries attached to the session.
1278
+ # If the packed size exceeds 100%, the request fails.
1279
+ # @return [Integer]
1280
+ #
1281
+ # @!attribute [rw] assumed_principal
1282
+ # The Amazon Resource Name (ARN) of the principal that was assumed
1283
+ # when obtaining the delegated access token. This ARN identifies the
1284
+ # IAM entity whose permissions are granted by the temporary
1285
+ # credentials.
1286
+ # @return [String]
1287
+ #
1288
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetDelegatedAccessTokenResponse AWS API Documentation
1289
+ #
1290
+ class GetDelegatedAccessTokenResponse < Struct.new(
1291
+ :credentials,
1292
+ :packed_policy_size,
1293
+ :assumed_principal)
1294
+ SENSITIVE = []
1295
+ include Aws::Structure
1296
+ end
1297
+
1242
1298
  # @!attribute [rw] name
1243
1299
  # The name of the federated user. The name is used as an identifier
1244
1300
  # for the temporary security credentials (such as `Bob`). For example,
@@ -1522,6 +1578,73 @@ module Aws::STS
1522
1578
  include Aws::Structure
1523
1579
  end
1524
1580
 
1581
+ # @!attribute [rw] audience
1582
+ # The intended recipient of the web identity token. This value
1583
+ # populates the `aud` claim in the JWT and should identify the service
1584
+ # or application that will validate and use the token. The external
1585
+ # service should verify this claim to ensure the token was intended
1586
+ # for their use.
1587
+ # @return [Array<String>]
1588
+ #
1589
+ # @!attribute [rw] duration_seconds
1590
+ # The duration, in seconds, for which the JSON Web Token (JWT) will
1591
+ # remain valid. The value can range from 60 seconds (1 minute) to 3600
1592
+ # seconds (1 hour). If not specified, the default duration is 300
1593
+ # seconds (5 minutes). The token is designed to be short-lived and
1594
+ # should be used for proof of identity, then exchanged for credentials
1595
+ # or short-lived tokens in the external service.
1596
+ # @return [Integer]
1597
+ #
1598
+ # @!attribute [rw] signing_algorithm
1599
+ # The cryptographic algorithm to use for signing the JSON Web Token
1600
+ # (JWT). Valid values are RS256 (RSA with SHA-256) and ES384 (ECDSA
1601
+ # using P-384 curve with SHA-384).
1602
+ # @return [String]
1603
+ #
1604
+ # @!attribute [rw] tags
1605
+ # An optional list of tags to include in the JSON Web Token (JWT).
1606
+ # These tags are added as custom claims to the JWT and can be used by
1607
+ # the downstream service for authorization decisions.
1608
+ # @return [Array<Types::Tag>]
1609
+ #
1610
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetWebIdentityTokenRequest AWS API Documentation
1611
+ #
1612
+ class GetWebIdentityTokenRequest < Struct.new(
1613
+ :audience,
1614
+ :duration_seconds,
1615
+ :signing_algorithm,
1616
+ :tags)
1617
+ SENSITIVE = []
1618
+ include Aws::Structure
1619
+ end
1620
+
1621
+ # @!attribute [rw] web_identity_token
1622
+ # A signed JSON Web Token (JWT) that represents the caller's Amazon
1623
+ # Web Services identity. The token contains standard JWT claims such
1624
+ # as subject, audience, expiration time, and additional identity
1625
+ # attributes added by STS as custom claims. You can also add your own
1626
+ # custom claims to the token by passing tags as request parameters to
1627
+ # the `GetWebIdentityToken` API. The token is signed using the
1628
+ # specified signing algorithm and can be verified using the
1629
+ # verification keys available at the issuer's JWKS endpoint.
1630
+ # @return [String]
1631
+ #
1632
+ # @!attribute [rw] expiration
1633
+ # The date and time when the web identity token expires, in UTC. The
1634
+ # expiration is determined by adding the `DurationSeconds` value to
1635
+ # the time the token was issued. After this time, the token should no
1636
+ # longer be considered valid.
1637
+ # @return [Time]
1638
+ #
1639
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetWebIdentityTokenResponse AWS API Documentation
1640
+ #
1641
+ class GetWebIdentityTokenResponse < Struct.new(
1642
+ :web_identity_token,
1643
+ :expiration)
1644
+ SENSITIVE = [:web_identity_token]
1645
+ include Aws::Structure
1646
+ end
1647
+
1525
1648
  # The request could not be fulfilled because the identity provider (IDP)
1526
1649
  # that was asked to verify the incoming identity token could not be
1527
1650
  # reached. This is often a transient error caused by network conditions.
@@ -1589,6 +1712,21 @@ module Aws::STS
1589
1712
  include Aws::Structure
1590
1713
  end
1591
1714
 
1715
+ # The requested token payload size exceeds the maximum allowed size.
1716
+ # Reduce the number of request tags included in the
1717
+ # `GetWebIdentityToken` API call to reduce the token payload size.
1718
+ #
1719
+ # @!attribute [rw] message
1720
+ # @return [String]
1721
+ #
1722
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/JWTPayloadSizeExceededException AWS API Documentation
1723
+ #
1724
+ class JWTPayloadSizeExceededException < Struct.new(
1725
+ :message)
1726
+ SENSITIVE = []
1727
+ include Aws::Structure
1728
+ end
1729
+
1592
1730
  # The request was rejected because the policy document was malformed.
1593
1731
  # The error message describes the specific error.
1594
1732
  #
@@ -1603,6 +1741,21 @@ module Aws::STS
1603
1741
  include Aws::Structure
1604
1742
  end
1605
1743
 
1744
+ # The outbound web identity federation feature is not enabled for this
1745
+ # account. To use this feature, you must first enable it through the
1746
+ # Amazon Web Services Management Console or API.
1747
+ #
1748
+ # @!attribute [rw] message
1749
+ # @return [String]
1750
+ #
1751
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/OutboundWebIdentityFederationDisabledException AWS API Documentation
1752
+ #
1753
+ class OutboundWebIdentityFederationDisabledException < Struct.new(
1754
+ :message)
1755
+ SENSITIVE = []
1756
+ include Aws::Structure
1757
+ end
1758
+
1606
1759
  # The request was rejected because the total packed size of the session
1607
1760
  # policies and session tags combined was too large. An Amazon Web
1608
1761
  # Services conversion compresses the session policy document, session
@@ -1686,7 +1839,7 @@ module Aws::STS
1686
1839
  #
1687
1840
  #
1688
1841
  #
1689
- # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html
1842
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate
1690
1843
  #
1691
1844
  # @!attribute [rw] message
1692
1845
  # @return [String]
@@ -1699,6 +1852,22 @@ module Aws::STS
1699
1852
  include Aws::Structure
1700
1853
  end
1701
1854
 
1855
+ # The requested token duration would extend the session beyond its
1856
+ # original expiration time. You cannot use this operation to extend the
1857
+ # lifetime of a session beyond what was granted when the session was
1858
+ # originally created.
1859
+ #
1860
+ # @!attribute [rw] message
1861
+ # @return [String]
1862
+ #
1863
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/SessionDurationEscalationException AWS API Documentation
1864
+ #
1865
+ class SessionDurationEscalationException < Struct.new(
1866
+ :message)
1867
+ SENSITIVE = []
1868
+ include Aws::Structure
1869
+ end
1870
+
1702
1871
  # You can pass custom key-value pair attributes when you assume a role
1703
1872
  # or federate a user. These are called session tags. You can then use
1704
1873
  # the session tags to control access to resources. For more information,
data/lib/aws-sdk-sts.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::STS
56
56
  autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sts/endpoints'
58
58
 
59
- GEM_VERSION = '3.219.0'
59
+ GEM_VERSION = '3.240.0'
60
60
 
61
61
  end
62
62
 
@@ -3,7 +3,6 @@
3
3
  module Seahorse
4
4
  module Client
5
5
  class AsyncBase < Seahorse::Client::Base
6
-
7
6
  # default H2 plugins
8
7
  # @api private
9
8
  @plugins = PluginList.new([
@@ -11,10 +10,10 @@ module Seahorse
11
10
  Plugins::H2,
12
11
  Plugins::ResponseTarget
13
12
  ])
13
+
14
14
  def initialize(plugins, options)
15
- super
16
- @connection = H2::Connection.new(options)
17
- @options = options
15
+ super(plugins, options)
16
+ @connection = H2::Connection.new(@config)
18
17
  end
19
18
 
20
19
  # @return [H2::Connection]
@@ -36,7 +35,7 @@ module Seahorse
36
35
  # @return [Seahorse::Client::H2::Connection]
37
36
  def new_connection
38
37
  if @connection.closed?
39
- @connection = H2::Connection.new(@options)
38
+ @connection = H2::Connection.new(@config)
40
39
  else
41
40
  @connection
42
41
  end
@@ -176,8 +176,6 @@ module Seahorse
176
176
  # @return [Model::Api]
177
177
  def set_api(api)
178
178
  @api = api
179
- define_operation_methods
180
- @api
181
179
  end
182
180
 
183
181
  # @option options [Model::Api, Hash] :api ({})
@@ -196,18 +194,6 @@ module Seahorse
196
194
 
197
195
  private
198
196
 
199
- def define_operation_methods
200
- operations_module = Module.new
201
- @api.operation_names.each do |method_name|
202
- operations_module.send(:define_method, method_name) do |*args, &block|
203
- params = args[0] || {}
204
- options = args[1] || {}
205
- build_request(method_name, params).send_request(options, &block)
206
- end
207
- end
208
- include(operations_module)
209
- end
210
-
211
197
  def build_plugins(plugins)
212
198
  plugins.map { |plugin| plugin.is_a?(Class) ? plugin.new : plugin }
213
199
  end