aws-sdk-core 3.97.0 → 3.97.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8040701313c65f31f4fb21f28cd445117a92efe0e8a20c68c9e45dd809eb51c0
4
- data.tar.gz: 60761f067db272bd8d3ac08e37c59df4f9ab9590ccda3841231edb0f9838e427
3
+ metadata.gz: 03d0ced8fba32434ebe6a92f15a95655039252e24e590e3a7a342aff62830f31
4
+ data.tar.gz: 7eba95a4c50383fd101df33e8436551a846fda0d661abeb2bbb28450e38ddbd5
5
5
  SHA512:
6
- metadata.gz: 750115a58ba1d6cc4bdcda1d879ed7f2a70bf61759680dc4302665ac35819c897a151b0317aa05392cddfff97fb93c7ca34fb3524d98b3ee32893953f72e5733
7
- data.tar.gz: 177614051a23194fbb686326a248f014483de6218e3f57934d092bc819bbbf77d12e52e5a460038cf57691f033b0226db959cd26563ee5f3933f526d04d89a3a
6
+ metadata.gz: ebcc1cd3dca1bac74bf3a2b6d036863df4139e0111113ac5554a33add88c9baf74cbe0ee049e675aae7d49508958b1ae71f5581f2adba4b44c1318fbb626a953
7
+ data.tar.gz: abbabd1516240b7a25e89fcdae47381af64e939a54090c9ef4453fba16fe5d961a763d513b0caa6ea548d4367d65484a6e8890d17a2904e0fe4cc4d34d754c59
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.97.0
1
+ 3.97.1
@@ -78,9 +78,9 @@ module Aws
78
78
 
79
79
  # locate event from eventstream
80
80
  name, ref = @rules.shape.member_by_location_name(event_type)
81
- unless ref.event
82
- raise Aws::Errors::EventStreamParserError.new(
83
- "Failed to locate event shape for the event")
81
+ unless ref && ref.event
82
+ return Struct.new(:event_type, :raw_event_type, :raw_event)
83
+ .new(:unknown_event, event_type, raw_event)
84
84
  end
85
85
 
86
86
  event = ref.shape.struct_class.new
@@ -174,7 +174,7 @@ a clock skew correction and retry requests with skewed client clocks.
174
174
  end
175
175
 
176
176
  def self.resolve_max_attempts(cfg)
177
- value = ENV['AWS_MAX_ATTEMPTS'] ||
177
+ value = (ENV['AWS_MAX_ATTEMPTS'] && ENV['AWS_MAX_ATTEMPTS'].to_i) ||
178
178
  Aws.shared_config.max_attempts(profile: cfg.profile) ||
179
179
  3
180
180
  # Raise if provided value is not a positive integer
@@ -190,7 +190,6 @@ a clock skew correction and retry requests with skewed client clocks.
190
190
  value = ENV['AWS_ADAPTIVE_RETRY_WAIT_TO_FILL'] ||
191
191
  Aws.shared_config.adaptive_retry_wait_to_fill(profile: cfg.profile) ||
192
192
  'true'
193
-
194
193
  # Raise if provided value is not true or false
195
194
  if value != 'true' && value != 'false'
196
195
  raise ArgumentError,
@@ -198,7 +197,6 @@ a clock skew correction and retry requests with skewed client clocks.
198
197
  'adaptive_retry_wait_to_fill profile option or for '\
199
198
  'ENV[\'AWS_ADAPTIVE_RETRY_WAIT_TO_FILL\']'
200
199
  end
201
-
202
200
  value == 'true'
203
201
  end
204
202
 
@@ -206,7 +204,6 @@ a clock skew correction and retry requests with skewed client clocks.
206
204
  value = ENV['AWS_CORRECT_CLOCK_SKEW'] ||
207
205
  Aws.shared_config.correct_clock_skew(profile: cfg.profile) ||
208
206
  'true'
209
-
210
207
  # Raise if provided value is not true or false
211
208
  if value != 'true' && value != 'false'
212
209
  raise ArgumentError,
@@ -214,7 +211,6 @@ a clock skew correction and retry requests with skewed client clocks.
214
211
  'correct_clock_skew profile option or for '\
215
212
  'ENV[\'AWS_CORRECT_CLOCK_SKEW\']'
216
213
  end
217
-
218
214
  value == 'true'
219
215
  end
220
216
 
@@ -43,7 +43,7 @@ module Aws
43
43
  def build_body(api, operation, data)
44
44
  rules = operation.output
45
45
  if head_operation(operation)
46
- ""
46
+ ''
47
47
  elsif streaming?(rules)
48
48
  data[rules[:payload]]
49
49
  elsif rules[:payload]
@@ -73,7 +73,7 @@ module Aws
73
73
  end
74
74
 
75
75
  def head_operation(operation)
76
- operation.http_method == "HEAD"
76
+ operation.http_method == 'HEAD'
77
77
  end
78
78
 
79
79
  def eventstream?(rules)
@@ -116,8 +116,22 @@ module Aws
116
116
  opts
117
117
  end
118
118
 
119
- def encode_event(opts, rules, event_data, builder)
120
- event_ref = rules.shape.member(event_data.delete(:event_type))
119
+ def encode_unknown_event(opts, event_type, event_data)
120
+ # right now h2 events are only rest_json
121
+ opts[:payload] = StringIO.new(JSON.dump(event_data))
122
+ opts[:headers][':event-type'] = Aws::EventStream::HeaderValue.new(
123
+ value: event_type.to_s,
124
+ type: 'string'
125
+ )
126
+ opts[:headers][':message-type'] = Aws::EventStream::HeaderValue.new(
127
+ value: 'event',
128
+ type: 'string'
129
+ )
130
+ opts
131
+ end
132
+
133
+ def encode_modeled_event(opts, rules, event_type, event_data, builder)
134
+ event_ref = rules.shape.member(event_type)
121
135
  explicit_payload = false
122
136
  implicit_payload_members = {}
123
137
  event_ref.shape.members.each do |name, ref|
@@ -166,6 +180,16 @@ module Aws
166
180
  opts
167
181
  end
168
182
 
183
+ def encode_event(opts, rules, event_data, builder)
184
+ event_type = event_data.delete(:event_type)
185
+
186
+ if rules.shape.member?(event_type)
187
+ encode_modeled_event(opts, rules, event_type, event_data, builder)
188
+ else
189
+ encode_unknown_event(opts, event_type, event_data)
190
+ end
191
+ end
192
+
169
193
  end
170
194
  end
171
195
  end
@@ -43,6 +43,6 @@ require_relative 'aws-sdk-sts/customizations'
43
43
  # @service
44
44
  module Aws::STS
45
45
 
46
- GEM_VERSION = '3.97.0'
46
+ GEM_VERSION = '3.97.1'
47
47
 
48
48
  end
@@ -2185,7 +2185,7 @@ module Aws::STS
2185
2185
  params: params,
2186
2186
  config: config)
2187
2187
  context[:gem_name] = 'aws-sdk-core'
2188
- context[:gem_version] = '3.97.0'
2188
+ context[:gem_version] = '3.97.1'
2189
2189
  Seahorse::Client::Request.new(handlers, context)
2190
2190
  end
2191
2191
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.97.0
4
+ version: 3.97.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-28 00:00:00.000000000 Z
11
+ date: 2020-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath