aws-sdk-core 3.171.0 → 3.186.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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +155 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +4 -4
  5. data/lib/aws-sdk-core/credential_provider.rb +3 -0
  6. data/lib/aws-sdk-core/endpoints/matchers.rb +13 -9
  7. data/lib/aws-sdk-core/endpoints.rb +5 -1
  8. data/lib/aws-sdk-core/errors.rb +1 -1
  9. data/lib/aws-sdk-core/ini_parser.rb +7 -0
  10. data/lib/aws-sdk-core/instance_profile_credentials.rb +52 -30
  11. data/lib/aws-sdk-core/json/error_handler.rb +15 -5
  12. data/lib/aws-sdk-core/json/parser.rb +1 -1
  13. data/lib/aws-sdk-core/log/formatter.rb +6 -0
  14. data/lib/aws-sdk-core/pageable_response.rb +3 -1
  15. data/lib/aws-sdk-core/param_validator.rb +2 -2
  16. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +1 -1
  17. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +109 -33
  18. data/lib/aws-sdk-core/plugins/request_compression.rb +217 -0
  19. data/lib/aws-sdk-core/plugins/sign.rb +1 -0
  20. data/lib/aws-sdk-core/plugins/user_agent.rb +117 -14
  21. data/lib/aws-sdk-core/refreshing_credentials.rb +0 -6
  22. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +43 -29
  23. data/lib/aws-sdk-core/shared_config.rb +47 -18
  24. data/lib/aws-sdk-core/sso_credentials.rb +1 -1
  25. data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
  26. data/lib/aws-sdk-core/waiters/poller.rb +3 -1
  27. data/lib/aws-sdk-sso/client.rb +21 -1
  28. data/lib/aws-sdk-sso/endpoint_provider.rb +30 -24
  29. data/lib/aws-sdk-sso/endpoints.rb +1 -0
  30. data/lib/aws-sdk-sso.rb +1 -1
  31. data/lib/aws-sdk-ssooidc/client.rb +21 -1
  32. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -24
  33. data/lib/aws-sdk-ssooidc/endpoints.rb +1 -0
  34. data/lib/aws-sdk-ssooidc.rb +1 -1
  35. data/lib/aws-sdk-sts/client.rb +138 -112
  36. data/lib/aws-sdk-sts/client_api.rb +12 -1
  37. data/lib/aws-sdk-sts/endpoint_provider.rb +81 -78
  38. data/lib/aws-sdk-sts/endpoints.rb +1 -0
  39. data/lib/aws-sdk-sts/types.rb +35 -11
  40. data/lib/aws-sdk-sts.rb +1 -1
  41. data/lib/seahorse/client/configuration.rb +0 -4
  42. data/lib/seahorse/client/plugins/request_callback.rb +31 -0
  43. data/lib/seahorse/client/response.rb +6 -0
  44. data/lib/seahorse/model/operation.rb +3 -0
  45. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4b9ed82ab5a4b3e5871bca537f3a650a468131bc35120873f02edb0a35017b1
4
- data.tar.gz: d5a49d43dfdec90623e9ee88be22b5c2e45a7413b91bac4e881b1002e3c6cce0
3
+ metadata.gz: 4b996ac6ca7e1d4d61926d24af262a70a2d2da40b09a8999165721b58c8995a1
4
+ data.tar.gz: a931f4b08ac8b2fd6342abbd4b799b649ee057c9e1bb9dc8cb9581ef30030f30
5
5
  SHA512:
6
- metadata.gz: f0f8e07aada15f369b444d10325601352057ddfff2b6020b27cb8c8c8cdcd42001f8f5ecff8855abdbea8a932ff92b1a8ffd771a2a846f9a595f08f94ee9c28b
7
- data.tar.gz: 53f75fd8a1e204a21a231ae4010c85f39a11420ffd430c51430e85c3203d214e51c7fda54c92258409a644f118589ce0bb5dab7e7ec45cbcd927d03afd930c25
6
+ metadata.gz: b9655a1c8c71af67476d77e3248f8fd95e994aee2ac1a1c8960d9f12c4c7823ef624029661683b346653cd671c048ee00f01938fcfcade24b2a60ea344c886ec
7
+ data.tar.gz: 97cec2c4e76b50f1224f92111d47240ab8f9d318489ec30607a206b4c83623033972d4ed72a466d90eef2957eb9ae1cf2c416cc276f9a8d4bb2c057fe7f1e968
data/CHANGELOG.md CHANGED
@@ -1,6 +1,161 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.186.0 (2023-11-02)
5
+ ------------------
6
+
7
+ * Feature - Support disabling IMDSv1 in `InstanceProfileCredentials` using `ENV['AWS_EC2_METADATA_V1_DISABLED']`, `ec2_metadata_v1_disabled` shared config, or the `disable_imds_v1` credentials option.
8
+
9
+ 3.185.2 (2023-10-31)
10
+ ------------------
11
+
12
+ * Issue - Fix query string support to lists of booleans, floats, integers and timestamps per rest-json protocol.
13
+
14
+ 3.185.1 (2023-10-05)
15
+ ------------------
16
+
17
+ * Issue - Ignore `__type` when deserializing Unions.
18
+
19
+ 3.185.0 (2023-10-02)
20
+ ------------------
21
+
22
+ * Feature - Updated Aws::STS::Client with the latest API changes.
23
+
24
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
25
+
26
+ 3.184.0 (2023-09-27)
27
+ ------------------
28
+
29
+ * Feature - Change the `ServiceError` data member from read only to read/write.
30
+
31
+ 3.183.1 (2023-09-25)
32
+ ------------------
33
+
34
+ * Issue - Remove value inspection from param validation errors.
35
+
36
+ 3.183.0 (2023-09-20)
37
+ ------------------
38
+
39
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
40
+
41
+ 3.182.0 (2023-09-19)
42
+ ------------------
43
+
44
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
45
+
46
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
47
+
48
+ 3.181.1 (2023-09-14)
49
+ ------------------
50
+
51
+ * Issue - Fix host label validation in endpoint matchers.
52
+
53
+ 3.181.0 (2023-08-22)
54
+ ------------------
55
+
56
+ * Feature - Add support for `on_chunk_received` callback.
57
+
58
+ 3.180.3 (2023-08-09)
59
+ ------------------
60
+
61
+ * Issue - Add support for sso-session names with whitespace configured by the CLI `aws sso configure` command (#2895).
62
+
63
+ 3.180.2 (2023-08-07)
64
+ ------------------
65
+
66
+ * Issue - Fix parsing of ini files with mixes of blank properties and nested configurations.
67
+
68
+ 3.180.1 (2023-07-31)
69
+ ------------------
70
+
71
+ * Issue - Remove checksums from default stubs (#2888).
72
+
73
+ 3.180.0 (2023-07-25)
74
+ ------------------
75
+
76
+ * Feature - Updated Aws::STS::Client with the latest API changes.
77
+
78
+ 3.179.0 (2023-07-24)
79
+ ------------------
80
+
81
+ * Feature - Add `checksum_validated` method to response.
82
+
83
+ 3.178.0 (2023-07-11)
84
+ ------------------
85
+
86
+ * Feature - Updated Aws::STS::Client with the latest API changes.
87
+
88
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
89
+
90
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
91
+
92
+ * Feature - Add support for configuring the endpoint URL in the shared configuration file or via an environment variable for a specific AWS service or all AWS services.
93
+
94
+ 3.177.0 (2023-07-06)
95
+ ------------------
96
+
97
+ * Feature - Updated Aws::STS::Client with the latest API changes.
98
+
99
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
100
+
101
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
102
+
103
+ * Feature - Add support for Request Compression.
104
+
105
+ 3.176.1 (2023-06-29)
106
+ ------------------
107
+
108
+ * Issue - Fix signing for S3/S3 Control and `aws-crt` gem for certain object keys (#2849).
109
+
110
+ * Issue - Ensure `SSOCredentials` `#expiration` is a `Time` (#2874)
111
+
112
+ 3.176.0 (2023-06-28)
113
+ ------------------
114
+
115
+ * Feature - Add :expiration accessor to `CredentialProvider` and do not refresh credentials when checking expiration (#2872).
116
+
117
+ 3.175.0 (2023-06-15)
118
+ ------------------
119
+
120
+ * Feature - Updated Aws::STS::Client with the latest API changes.
121
+
122
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
123
+
124
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
125
+
126
+ 3.174.0 (2023-05-31)
127
+ ------------------
128
+
129
+ * Feature - Updated Aws::STS::Client with the latest API changes.
130
+
131
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
132
+
133
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
134
+
135
+ * Feature - Improve User-Agent metrics tracking.
136
+
137
+ 3.173.1 (2023-05-24)
138
+ ------------------
139
+
140
+ * Issue - Updated `checksum_algorithm` plugin to use IO.copy_stream for JRuby.
141
+
142
+ 3.173.0 (2023-05-18)
143
+ ------------------
144
+
145
+ * Feature - Updated Aws::STS::Client with the latest API changes.
146
+
147
+ 3.172.0 (2023-05-08)
148
+ ------------------
149
+
150
+ * Feature - Updated Aws::STS::Client with the latest API changes.
151
+
152
+ * Feature - Add :region option to `Aws::Log::Formatter`.
153
+
154
+ 3.171.1 (2023-05-04)
155
+ ------------------
156
+
157
+ * Issue - Fix error code parsing in AWS query compatible JSON services.
158
+
4
159
  3.171.0 (2023-03-22)
5
160
  ------------------
6
161
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.171.0
1
+ 3.186.0
@@ -20,7 +20,7 @@ module Aws
20
20
  # * Globally via the "AWS_DEFAULTS_MODE" environment variable.
21
21
  #
22
22
  #
23
- # @code_generation START - documentation
23
+ # #defaults START - documentation
24
24
  # The following `:default_mode` values are supported:
25
25
  #
26
26
  # * `'standard'` -
@@ -105,10 +105,10 @@ module Aws
105
105
  # [2]: https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-retry_mode.html
106
106
  # [3]: https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-sts_regional_endpoints.html
107
107
  #
108
- # @code_generation END - documentation
108
+ # #defaults END - documentation
109
109
  module DefaultsModeConfiguration
110
110
  # @api private
111
- # @code_generation START - configuration
111
+ # #defaults START - configuration
112
112
  SDK_DEFAULT_CONFIGURATION =
113
113
  {
114
114
  "version" => 1,
@@ -148,6 +148,6 @@ module Aws
148
148
  }
149
149
  }
150
150
  }
151
- # @code_generation END - configuration
151
+ # #defaults END - configuration
152
152
  end
153
153
  end
@@ -6,6 +6,9 @@ module Aws
6
6
  # @return [Credentials]
7
7
  attr_reader :credentials
8
8
 
9
+ # @return [Time]
10
+ attr_reader :expiration
11
+
9
12
  # @return [Boolean]
10
13
  def set?
11
14
  !!credentials && credentials.set?
@@ -79,11 +79,11 @@ module Aws
79
79
  return false if value.empty?
80
80
 
81
81
  if allow_sub_domains
82
- labels = value.split('.')
82
+ labels = value.split('.', -1)
83
83
  return labels.all? { |l| valid_host_label?(l) }
84
84
  end
85
85
 
86
- value =~ /\A(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\z/
86
+ !!(value =~ /\A(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\z/)
87
87
  end
88
88
 
89
89
  # AWS
@@ -114,13 +114,17 @@ module Aws
114
114
 
115
115
  # aws.isVirtualHostableS3Bucket(value: string, allowSubDomains: bool) bool
116
116
  def self.aws_virtual_hostable_s3_bucket?(value, allow_sub_domains = false)
117
- !!(value.size < 64 &&
118
- # regular naming rules
119
- value =~ /^[a-z0-9][a-z0-9\-#{'.' if allow_sub_domains}]+[a-z0-9]$/ &&
120
- # not IP address
121
- value !~ /(\d+\.){3}\d+/ &&
122
- # no dash and hyphen together
123
- value !~ /[.-]{2}/)
117
+ return false if value.empty?
118
+
119
+ if allow_sub_domains
120
+ labels = value.split('.', -1)
121
+ return labels.all? { |l| aws_virtual_hostable_s3_bucket?(l) }
122
+ end
123
+
124
+ # must be between 3 and 63 characters long, no uppercase
125
+ value =~ /\A(?!-)[a-z0-9-]{3,63}(?<!-)\z/ &&
126
+ # not an IP address
127
+ value !~ /(\d+\.){3}\d+/
124
128
  end
125
129
  end
126
130
  end
@@ -39,7 +39,11 @@ module Aws
39
39
  auth_scheme = { 'name' => 'sigv4' }
40
40
  merge_signing_defaults(auth_scheme, context.config)
41
41
  when 's3', 's3v4'
42
- auth_scheme = { 'name' => 'sigv4', 'disableDoubleEncoding' => true }
42
+ auth_scheme = {
43
+ 'name' => 'sigv4',
44
+ 'disableDoubleEncoding' => true,
45
+ 'disableNormalizePath' => true
46
+ }
43
47
  merge_signing_defaults(auth_scheme, context.config)
44
48
  when 'bearer'
45
49
  { 'name' => 'bearer' }
@@ -30,7 +30,7 @@ module Aws
30
30
  attr_reader :context
31
31
 
32
32
  # @return [Aws::Structure]
33
- attr_reader :data
33
+ attr_accessor :data
34
34
 
35
35
  class << self
36
36
 
@@ -8,6 +8,8 @@ module Aws
8
8
  def ini_parse(raw)
9
9
  current_profile = nil
10
10
  current_prefix = nil
11
+ item = nil
12
+ previous_item = nil
11
13
  raw.lines.inject({}) do |acc, line|
12
14
  line = line.split(/^|\s;/).first # remove comments
13
15
  profile = line.match(/^\[([^\[\]]+)\]\s*(#.+)?$/) unless line.nil?
@@ -17,11 +19,16 @@ module Aws
17
19
  current_profile = named_profile[1] if named_profile
18
20
  elsif current_profile
19
21
  unless line.nil?
22
+ previous_item = item
20
23
  item = line.match(/^(.+?)\s*=\s*(.+?)\s*$/)
21
24
  prefix = line.match(/^(.+?)\s*=\s*$/)
22
25
  end
23
26
  if item && item[1].match(/^\s+/)
24
27
  # Need to add lines to a nested configuration.
28
+ if current_prefix.nil? && previous_item[2].strip.empty?
29
+ current_prefix = previous_item[1]
30
+ acc[current_profile][current_prefix] = {}
31
+ end
25
32
  inner_item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/)
26
33
  acc[current_profile] ||= {}
27
34
  acc[current_profile][current_prefix] ||= {}
@@ -53,6 +53,8 @@ module Aws
53
53
  # @option options [String] :endpoint_mode ('IPv4') The endpoint mode for
54
54
  # the instance metadata service. This is either 'IPv4' ('169.254.169.254')
55
55
  # or 'IPv6' ('[fd00:ec2::254]').
56
+ # @option options [Boolean] :disable_imds_v1 (false) Disable the use of the
57
+ # legacy EC2 Metadata Service v1.
56
58
  # @option options [String] :ip_address ('169.254.169.254') Deprecated. Use
57
59
  # :endpoint instead. The IP address for the endpoint.
58
60
  # @option options [Integer] :port (80)
@@ -77,6 +79,9 @@ module Aws
77
79
  endpoint_mode = resolve_endpoint_mode(options)
78
80
  @endpoint = resolve_endpoint(options, endpoint_mode)
79
81
  @port = options[:port] || 80
82
+ @disable_imds_v1 = resolve_disable_v1(options)
83
+ # Flag for if v2 flow fails, skip future attempts
84
+ @imds_v1_fallback = false
80
85
  @http_open_timeout = options[:http_open_timeout] || 1
81
86
  @http_read_timeout = options[:http_read_timeout] || 1
82
87
  @http_debug_output = options[:http_debug_output]
@@ -123,6 +128,16 @@ module Aws
123
128
  end
124
129
  end
125
130
 
131
+ def resolve_disable_v1(options)
132
+ value = options[:disable_imds_v1]
133
+ value ||= ENV['AWS_EC2_METADATA_V1_DISABLED']
134
+ value ||= Aws.shared_config.ec2_metadata_v1_disabled(
135
+ profile: options[:profile]
136
+ )
137
+ value = value.to_s.downcase if value
138
+ Aws::Util.str_2_bool(value) || false
139
+ end
140
+
126
141
  def backoff(backoff)
127
142
  case backoff
128
143
  when Proc then backoff
@@ -141,7 +156,7 @@ module Aws
141
156
  # service is responding but is returning invalid JSON documents
142
157
  # in response to the GET profile credentials call.
143
158
  begin
144
- retry_errors([Aws::Json::ParseError, StandardError], max_retries: 3) do
159
+ retry_errors([Aws::Json::ParseError], max_retries: 3) do
145
160
  c = Aws::Json.load(get_credentials.to_s)
146
161
  if empty_credentials?(@credentials)
147
162
  @credentials = Credentials.new(
@@ -173,7 +188,6 @@ module Aws
173
188
  end
174
189
  end
175
190
  end
176
-
177
191
  end
178
192
  rescue Aws::Json::ParseError
179
193
  raise Aws::Errors::MetadataParserError
@@ -191,34 +205,14 @@ module Aws
191
205
  open_connection do |conn|
192
206
  # attempt to fetch token to start secure flow first
193
207
  # and rescue to failover
194
- begin
195
- retry_errors(NETWORK_ERRORS, max_retries: @retries) do
196
- unless token_set?
197
- created_time = Time.now
198
- token_value, ttl = http_put(
199
- conn, METADATA_TOKEN_PATH, @token_ttl
200
- )
201
- @token = Token.new(token_value, ttl, created_time) if token_value && ttl
202
- end
203
- end
204
- rescue *NETWORK_ERRORS
205
- # token attempt failed, reset token
206
- # fallback to non-token mode
207
- @token = nil
208
- end
209
-
208
+ fetch_token(conn) unless @imds_v1_fallback
210
209
  token = @token.value if token_set?
211
210
 
212
- begin
213
- metadata = http_get(conn, METADATA_PATH_BASE, token)
214
- profile_name = metadata.lines.first.strip
215
- http_get(conn, METADATA_PATH_BASE + profile_name, token)
216
- rescue TokenExpiredError
217
- # Token has expired, reset it
218
- # The next retry should fetch it
219
- @token = nil
220
- raise Non200Response
221
- end
211
+ # disable insecure flow if we couldn't get token
212
+ # and imds v1 is disabled
213
+ raise TokenRetrivalError if token.nil? && @disable_imds_v1
214
+
215
+ _get_credentials(conn, token)
222
216
  end
223
217
  end
224
218
  rescue
@@ -227,6 +221,36 @@ module Aws
227
221
  end
228
222
  end
229
223
 
224
+ def fetch_token(conn)
225
+ retry_errors(NETWORK_ERRORS, max_retries: @retries) do
226
+ unless token_set?
227
+ created_time = Time.now
228
+ token_value, ttl = http_put(
229
+ conn, METADATA_TOKEN_PATH, @token_ttl
230
+ )
231
+ @token = Token.new(token_value, ttl, created_time) if token_value && ttl
232
+ end
233
+ end
234
+ rescue *NETWORK_ERRORS
235
+ # token attempt failed, reset token
236
+ # fallback to non-token mode
237
+ @token = nil
238
+ @imds_v1_fallback = true
239
+ end
240
+
241
+ # token is optional - if nil, uses v1 (insecure) flow
242
+ def _get_credentials(conn, token)
243
+ metadata = http_get(conn, METADATA_PATH_BASE, token)
244
+ profile_name = metadata.lines.first.strip
245
+ http_get(conn, METADATA_PATH_BASE + profile_name, token)
246
+ rescue TokenExpiredError
247
+ # Token has expired, reset it
248
+ # The next retry should fetch it
249
+ @token = nil
250
+ @imds_v1_fallback = false
251
+ raise Non200Response
252
+ end
253
+
230
254
  def token_set?
231
255
  @token && !@token.expired?
232
256
  end
@@ -276,8 +300,6 @@ module Aws
276
300
  ]
277
301
  when 400
278
302
  raise TokenRetrivalError
279
- when 401
280
- raise TokenExpiredError
281
303
  else
282
304
  raise Non200Response
283
305
  end
@@ -26,11 +26,13 @@ module Aws
26
26
  end
27
27
 
28
28
  def error_code(json, context)
29
- code = if aws_query_error?(context)
30
- context.http_response.headers['x-amzn-query-error'].split(';')[0]
31
- else
32
- json['__type']
33
- end
29
+ code =
30
+ if aws_query_error?(context)
31
+ error = context.http_response.headers['x-amzn-query-error'].split(';')[0]
32
+ remove_prefix(error, context)
33
+ else
34
+ json['__type']
35
+ end
34
36
  code ||= json['code']
35
37
  code ||= context.http_response.headers['x-amzn-errortype']
36
38
  if code
@@ -45,6 +47,14 @@ module Aws
45
47
  context.http_response.headers['x-amzn-query-error']
46
48
  end
47
49
 
50
+ def remove_prefix(error_code, context)
51
+ if prefix = context.config.api.metadata['errorPrefix']
52
+ error_code.sub(/^#{prefix}/, '')
53
+ else
54
+ error_code
55
+ end
56
+ end
57
+
48
58
  def error_message(code, json)
49
59
  if code == 'RequestEntityTooLarge'
50
60
  'Request body must be less than 1 MB'
@@ -28,7 +28,7 @@ module Aws
28
28
  member_name, member_ref = shape.member_by_location_name(key)
29
29
  if member_ref
30
30
  target[member_name] = parse_ref(member_ref, value)
31
- elsif shape.union
31
+ elsif shape.union && key != '__type'
32
32
  target[:unknown] = { 'name' => key, 'value' => value }
33
33
  end
34
34
  end
@@ -26,6 +26,8 @@ module Aws
26
26
  #
27
27
  # You can put any of these placeholders into you pattern.
28
28
  #
29
+ # * `:region` - The region configured for the client.
30
+ #
29
31
  # * `:client_class` - The name of the client class.
30
32
  #
31
33
  # * `:operation` - The name of the client request method.
@@ -116,6 +118,10 @@ module Aws
116
118
 
117
119
  private
118
120
 
121
+ def _region(response)
122
+ response.context.config.region
123
+ end
124
+
119
125
  def _client_class(response)
120
126
  response.context.client.class.name
121
127
  end
@@ -201,7 +201,9 @@ module Aws
201
201
  def next_response(params)
202
202
  params = next_page_params(params)
203
203
  request = context.client.build_request(context.operation_name, params)
204
- request.send_request
204
+ Aws::Plugins::UserAgent.feature('paginator') do
205
+ request.send_request
206
+ end
205
207
  end
206
208
 
207
209
  def next_page_params(params)
@@ -6,7 +6,7 @@ module Aws
6
6
 
7
7
  include Seahorse::Model::Shapes
8
8
 
9
- EXPECTED_GOT = "expected %s to be %s, got value %s (class: %s) instead."
9
+ EXPECTED_GOT = 'expected %s to be %s, got class %s instead.'
10
10
 
11
11
  # @param [Seahorse::Model::Shapes::ShapeRef] rules
12
12
  # @param [Hash] params
@@ -230,7 +230,7 @@ module Aws
230
230
  end
231
231
 
232
232
  def expected_got(context, expected, got)
233
- EXPECTED_GOT % [context, expected, got.inspect, got.class.name]
233
+ EXPECTED_GOT % [context, expected, got.class.name]
234
234
  end
235
235
 
236
236
  end
@@ -314,7 +314,7 @@ module Aws
314
314
  @io.rewind
315
315
  end
316
316
 
317
- def read(length, buf)
317
+ def read(length, buf = nil)
318
318
  # account for possible leftover bytes at the end, if we have trailer bytes, send them
319
319
  if @trailer_io
320
320
  return @trailer_io.read(length, buf)