aws-sdk-core 2.3.14 → 2.3.15

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
  SHA1:
3
- metadata.gz: f9081318f6f1ebc9b3eecd93fbdb001d958d7c47
4
- data.tar.gz: 5aefecd1b930f87cf1c612e24bf9142d863747a9
3
+ metadata.gz: 43dc35a496cbf3e3d601980cbde955296488f2b3
4
+ data.tar.gz: 51e2a349be2b69b202ac39d2e2a94aa215e4c8ca
5
5
  SHA512:
6
- metadata.gz: 7a5f684061bbd67d700a6aad1cd546611a926045c6ea4376fac77abcd9498a41503e40982c251835e0b33acde142fb3690f5976a5f6200e78e9dd06beda626c3
7
- data.tar.gz: 3537bbf8013ea75f0d8003b000a86c87bdc06b5cdad31e54eaae9bed05276190faf44f0f94033a4d2a8664e1c27d9e2c132d73c4e0dd6d686f53cb0e168e1c81
6
+ metadata.gz: bed3df9e59936541aaca3d49443eeb85473210e3543ca9d294fc55504c4955f66ae8e059c45fbfcb3068ee4bd4d1a02ff93e13cf30c355bfa724580739982a9f
7
+ data.tar.gz: 83ee49511d75934b6a95b0639ef7dec860bf531c32f1669858b71c873c1d2561e59fde6f4f396e4dce8ca7bd2d4d807b739f1cb1a76bd8af8ef5e22de2096d18
@@ -294,6 +294,22 @@
294
294
  {"shape":"InvalidClientTokenException"}
295
295
  ]
296
296
  },
297
+ "RetryStageExecution":{
298
+ "name":"RetryStageExecution",
299
+ "http":{
300
+ "method":"POST",
301
+ "requestUri":"/"
302
+ },
303
+ "input":{"shape":"RetryStageExecutionInput"},
304
+ "output":{"shape":"RetryStageExecutionOutput"},
305
+ "errors":[
306
+ {"shape":"ValidationException"},
307
+ {"shape":"PipelineNotFoundException"},
308
+ {"shape":"StageNotFoundException"},
309
+ {"shape":"StageNotRetryableException"},
310
+ {"shape":"NotLatestPipelineExecutionException"}
311
+ ]
312
+ },
297
313
  "StartPipelineExecution":{
298
314
  "name":"StartPipelineExecution",
299
315
  "http":{
@@ -387,7 +403,8 @@
387
403
  "Build",
388
404
  "Deploy",
389
405
  "Test",
390
- "Invoke"
406
+ "Invoke",
407
+ "Approval"
391
408
  ]
392
409
  },
393
410
  "ActionConfiguration":{
@@ -445,7 +462,7 @@
445
462
  },
446
463
  "ActionConfigurationValue":{
447
464
  "type":"string",
448
- "max":250,
465
+ "max":500,
449
466
  "min":1
450
467
  },
451
468
  "ActionContext":{
@@ -1096,6 +1113,12 @@
1096
1113
  },
1097
1114
  "NextToken":{"type":"string"},
1098
1115
  "Nonce":{"type":"string"},
1116
+ "NotLatestPipelineExecutionException":{
1117
+ "type":"structure",
1118
+ "members":{
1119
+ },
1120
+ "exception":true
1121
+ },
1099
1122
  "OutputArtifact":{
1100
1123
  "type":"structure",
1101
1124
  "required":["name"],
@@ -1291,6 +1314,27 @@
1291
1314
  "max":1,
1292
1315
  "min":0
1293
1316
  },
1317
+ "RetryStageExecutionInput":{
1318
+ "type":"structure",
1319
+ "required":[
1320
+ "pipelineName",
1321
+ "stageName",
1322
+ "pipelineExecutionId",
1323
+ "retryMode"
1324
+ ],
1325
+ "members":{
1326
+ "pipelineName":{"shape":"PipelineName"},
1327
+ "stageName":{"shape":"StageName"},
1328
+ "pipelineExecutionId":{"shape":"PipelineExecutionId"},
1329
+ "retryMode":{"shape":"StageRetryMode"}
1330
+ }
1331
+ },
1332
+ "RetryStageExecutionOutput":{
1333
+ "type":"structure",
1334
+ "members":{
1335
+ "pipelineExecutionId":{"shape":"PipelineExecutionId"}
1336
+ }
1337
+ },
1294
1338
  "Revision":{
1295
1339
  "type":"string",
1296
1340
  "max":1500,
@@ -1303,7 +1347,8 @@
1303
1347
  },
1304
1348
  "RoleArn":{
1305
1349
  "type":"string",
1306
- "pattern":"arn:[^:]+:iam::[0-9]{12}:role/.*"
1350
+ "max":1024,
1351
+ "pattern":"arn:aws(-[\\w]+)*:iam::[0-9]{12}:role/.*"
1307
1352
  },
1308
1353
  "S3ArtifactLocation":{
1309
1354
  "type":"structure",
@@ -1346,6 +1391,25 @@
1346
1391
  "actions":{"shape":"StageActionDeclarationList"}
1347
1392
  }
1348
1393
  },
1394
+ "StageExecution":{
1395
+ "type":"structure",
1396
+ "required":[
1397
+ "pipelineExecutionId",
1398
+ "status"
1399
+ ],
1400
+ "members":{
1401
+ "pipelineExecutionId":{"shape":"PipelineExecutionId"},
1402
+ "status":{"shape":"StageExecutionStatus"}
1403
+ }
1404
+ },
1405
+ "StageExecutionStatus":{
1406
+ "type":"string",
1407
+ "enum":[
1408
+ "InProgress",
1409
+ "Failed",
1410
+ "Succeeded"
1411
+ ]
1412
+ },
1349
1413
  "StageName":{
1350
1414
  "type":"string",
1351
1415
  "max":100,
@@ -1358,12 +1422,23 @@
1358
1422
  },
1359
1423
  "exception":true
1360
1424
  },
1425
+ "StageNotRetryableException":{
1426
+ "type":"structure",
1427
+ "members":{
1428
+ },
1429
+ "exception":true
1430
+ },
1431
+ "StageRetryMode":{
1432
+ "type":"string",
1433
+ "enum":["FAILED_ACTIONS"]
1434
+ },
1361
1435
  "StageState":{
1362
1436
  "type":"structure",
1363
1437
  "members":{
1364
1438
  "stageName":{"shape":"StageName"},
1365
1439
  "inboundTransitionState":{"shape":"TransitionState"},
1366
- "actionStates":{"shape":"ActionStateList"}
1440
+ "actionStates":{"shape":"ActionStateList"},
1441
+ "latestExecution":{"shape":"StageExecution"}
1367
1442
  }
1368
1443
  },
1369
1444
  "StageStateList":{
@@ -2291,6 +2291,20 @@
2291
2291
  }
2292
2292
  }
2293
2293
  },
2294
+ "waiters": {
2295
+ "Available": {
2296
+ "waiterName": "VpcAvailable",
2297
+ "params": [
2298
+ { "target": "VpcIds[]", "source": "identifier", "name": "Id" }
2299
+ ]
2300
+ },
2301
+ "Exists": {
2302
+ "waiterName": "VpcExists",
2303
+ "params": [
2304
+ { "target": "VpcIds[]", "source": "identifier", "name": "Id" }
2305
+ ]
2306
+ }
2307
+ },
2294
2308
  "has": {
2295
2309
  "DhcpOptions": {
2296
2310
  "resource": {
@@ -511,6 +511,23 @@
511
511
  }
512
512
  ]
513
513
  },
514
+ "VpcExists": {
515
+ "operation": "DescribeVpcs",
516
+ "delay": 1,
517
+ "maxAttempts": 5,
518
+ "acceptors": [
519
+ {
520
+ "matcher": "status",
521
+ "expected": 200,
522
+ "state": "success"
523
+ },
524
+ {
525
+ "matcher": "error",
526
+ "expected": "InvalidVpcID.NotFound",
527
+ "state": "retry"
528
+ }
529
+ ]
530
+ },
514
531
  "VpnConnectionAvailable": {
515
532
  "delay": 15,
516
533
  "operation": "DescribeVpnConnections",
@@ -163,6 +163,17 @@
163
163
  ]
164
164
  }
165
165
  },
166
+ "DBEngine": {
167
+ "resource": {
168
+ "type": "DBEngine",
169
+ "identifiers": [
170
+ {
171
+ "target": "Name",
172
+ "source": "input"
173
+ }
174
+ ]
175
+ }
176
+ },
166
177
  "DBInstance": {
167
178
  "resource": {
168
179
  "type": "DBInstance",
@@ -1278,7 +1289,7 @@
1278
1289
  {
1279
1290
  "target": "Engine",
1280
1291
  "source": "identifier",
1281
- "name": "Engine"
1292
+ "name": "EngineName"
1282
1293
  },
1283
1294
  {
1284
1295
  "target": "EngineVersion",
@@ -1804,7 +1815,7 @@
1804
1815
  {
1805
1816
  "target": "Filters[0].Value",
1806
1817
  "source": "identifier",
1807
- "name": "InstanceId"
1818
+ "name": "Id"
1808
1819
  }
1809
1820
  ]
1810
1821
  },
@@ -100,6 +100,7 @@ module Aws
100
100
  end
101
101
 
102
102
  autoload :AssumeRoleCredentials, 'aws-sdk-core/assume_role_credentials'
103
+ autoload :Checksums, 'aws-sdk-core/checksums'
103
104
  autoload :Client, 'aws-sdk-core/client'
104
105
  autoload :ClientStubs, 'aws-sdk-core/client_stubs'
105
106
  autoload :ClientWaiters, 'aws-sdk-core/client_waiters'
@@ -174,6 +175,7 @@ module Aws
174
175
  autoload :Route53IdFix, 'aws-sdk-core/plugins/route_53_id_fix'
175
176
  autoload :S3Accelerate, 'aws-sdk-core/plugins/s3_accelerate'
176
177
  autoload :S3BucketDns, 'aws-sdk-core/plugins/s3_bucket_dns'
178
+ autoload :S3BucketNameRestrictions, 'aws-sdk-core/plugins/s3_bucket_name_restrictions'
177
179
  autoload :S3Expect100Continue, 'aws-sdk-core/plugins/s3_expect_100_continue'
178
180
  autoload :S3GetBucketLocationFix, 'aws-sdk-core/plugins/s3_get_bucket_location_fix'
179
181
  autoload :S3Http200Errors, 'aws-sdk-core/plugins/s3_http_200_errors'
@@ -157,6 +157,23 @@ module Aws
157
157
  end
158
158
  end
159
159
  end
160
+
161
+ api['shapes']['ExpiresString'] = { 'type' => 'string' }
162
+ %w(HeadObjectOutput GetObjectOutput).each do |shape|
163
+ members = api['shapes'][shape]['members']
164
+ # inject ExpiresString directly after Expires
165
+ api['shapes'][shape]['members'] = members.inject({}) do |h, (k,v)|
166
+ h[k] = v
167
+ if k == 'Expires'
168
+ h['ExpiresString'] = {
169
+ 'shape' => 'ExpiresString',
170
+ 'location' => 'header',
171
+ 'locationName' => 'Expires',
172
+ }
173
+ end
174
+ h
175
+ end
176
+ end
160
177
  end
161
178
 
162
179
  doc('s3') do |docs|
@@ -170,6 +187,7 @@ module Aws
170
187
  plugins('s3', add: %w(
171
188
  Aws::Plugins::S3Accelerate
172
189
  Aws::Plugins::S3BucketDns
190
+ Aws::Plugins::S3BucketNameRestrictions
173
191
  Aws::Plugins::S3Expect100Continue
174
192
  Aws::Plugins::S3Http200Errors
175
193
  Aws::Plugins::S3GetBucketLocationFix
@@ -0,0 +1,51 @@
1
+ require 'openssl'
2
+ require 'tempfile'
3
+
4
+ module Aws
5
+ # @api private
6
+ module Checksums
7
+
8
+ CHUNK_SIZE = 1 * 1024 * 1024 # one MB
9
+
10
+ class << self
11
+
12
+ # @param [File, Tempfile, IO#read, String] value
13
+ # @return [String<SHA256 Hexdigest>]
14
+ def sha256_hexdigest(value)
15
+ if File === value || Tempfile === value
16
+ OpenSSL::Digest::SHA256.file(value).hexdigest
17
+ elsif value.respond_to?(:read)
18
+ sha256 = OpenSSL::Digest::SHA256.new
19
+ update_in_chunks(sha256, value)
20
+ sha256.hexdigest
21
+ else
22
+ OpenSSL::Digest::SHA256.hexdigest(value)
23
+ end
24
+ end
25
+
26
+ # @param [File, Tempfile, IO#read, String] value
27
+ # @return [String<MD5>]
28
+ def md5(value)
29
+ if File === value || Tempfile === value
30
+ Base64.encode64(OpenSSL::Digest::MD5.file(value).digest).strip
31
+ elsif value.respond_to?(:read)
32
+ md5 = OpenSSL::Digest::MD5.new
33
+ update_in_chunks(md5, value)
34
+ Base64.encode64(md5.digest).strip
35
+ else
36
+ Base64.encode64(OpenSSL::Digest::MD5.digest(value)).strip
37
+ end
38
+ end
39
+
40
+ private
41
+
42
+ def update_in_chunks(digest, io)
43
+ while chunk = io.read(CHUNK_SIZE)
44
+ digest.update(chunk)
45
+ end
46
+ io.rewind
47
+ end
48
+
49
+ end
50
+ end
51
+ end
@@ -164,9 +164,9 @@ module Aws
164
164
  end
165
165
 
166
166
  # @api private
167
- def next_stub(operation_name)
168
- operation_name = operation_name.to_sym
169
- @stub_mutex.synchronize do
167
+ def next_stub(context)
168
+ operation_name = context.operation_name.to_sym
169
+ stub = @stub_mutex.synchronize do
170
170
  stubs = @stubs[operation_name] || []
171
171
  case stubs.length
172
172
  when 0 then default_stub(operation_name)
@@ -174,6 +174,7 @@ module Aws
174
174
  else stubs.shift
175
175
  end
176
176
  end
177
+ Proc === stub ? convert_stub(operation_name, stub.call(context)) : stub
177
178
  end
178
179
 
179
180
  private
@@ -190,16 +191,21 @@ module Aws
190
191
  def apply_stubs(operation_name, stubs)
191
192
  @stub_mutex.synchronize do
192
193
  @stubs[operation_name.to_sym] = stubs.map do |stub|
193
- case stub
194
- when Exception, Class then { error: stub }
195
- when String then service_error_stub(stub)
196
- when Hash then http_response_stub(operation_name, stub)
197
- else { data: stub }
198
- end
194
+ convert_stub(operation_name, stub)
199
195
  end
200
196
  end
201
197
  end
202
198
 
199
+ def convert_stub(operation_name, stub)
200
+ case stub
201
+ when Proc then stub
202
+ when Exception, Class then { error: stub }
203
+ when String then service_error_stub(stub)
204
+ when Hash then http_response_stub(operation_name, stub)
205
+ else { data: stub }
206
+ end
207
+ end
208
+
203
209
  def service_error_stub(error_code)
204
210
  { http: protocol_helper.stub_error(error_code) }
205
211
  end
@@ -0,0 +1,21 @@
1
+ module Aws
2
+ module Plugins
3
+ # @api private
4
+ class S3BucketNameRestrictions < Seahorse::Client::Plugin
5
+ class Handler < Seahorse::Client::Handler
6
+
7
+ def call(context)
8
+ if context.params.key?(:bucket) && context.params[:bucket].include?('/')
9
+ msg = ":bucket option must not contain a forward-slash (/)"
10
+ raise ArgumentError, msg
11
+ end
12
+ @handler.call(context)
13
+ end
14
+
15
+ end
16
+
17
+ handler(Handler)
18
+
19
+ end
20
+ end
21
+ end
@@ -23,25 +23,14 @@ module Aws
23
23
  # @api private
24
24
  class Handler < Seahorse::Client::Handler
25
25
 
26
- OneMB = 1024 * 1024
27
-
28
26
  def call(context)
29
27
  body = context.http_request.body
30
28
  if body.size > 0
31
- context.http_request.headers['Content-Md5'] ||= md5(body)
29
+ context.http_request.headers['Content-Md5'] ||= Checksums.md5(body)
32
30
  end
33
31
  @handler.call(context)
34
32
  end
35
33
 
36
- def md5(body)
37
- md5 = OpenSSL::Digest::MD5.new
38
- while chunk = body.read(OneMB)
39
- md5.update(chunk)
40
- end
41
- body.rewind
42
- Base64.encode64(md5.digest).strip
43
- end
44
-
45
34
  end
46
35
 
47
36
  option(:compute_checksums, true)
@@ -1,4 +1,5 @@
1
1
  require 'uri'
2
+ require 'openssl'
2
3
 
3
4
  module Aws
4
5
  module Plugins
@@ -38,7 +38,7 @@ module Aws
38
38
  class Handler < Seahorse::Client::Handler
39
39
 
40
40
  def call(context)
41
- stub = context.client.next_stub(context.operation_name)
41
+ stub = context.client.next_stub(context)
42
42
  resp = Seahorse::Client::Response.new(context: context)
43
43
  apply_stub(stub, resp)
44
44
  resp
@@ -1,3 +1,5 @@
1
+ require 'time'
2
+
1
3
  module Aws
2
4
  module Rest
3
5
  module Response
@@ -38,7 +40,11 @@ module Aws
38
40
  if value =~ /\d+(\.\d*)/
39
41
  Time.at(value.to_f)
40
42
  else
41
- Time.parse(value)
43
+ begin
44
+ Time.parse(value)
45
+ rescue
46
+ nil
47
+ end
42
48
  end
43
49
  else raise "unsupported shape #{ref.shape.class}"
44
50
  end
@@ -217,16 +217,7 @@ module Aws
217
217
  end
218
218
 
219
219
  def hexdigest(value)
220
- digest = OpenSSL::Digest::SHA256.new
221
- if value.respond_to?(:read)
222
- chunk = nil
223
- chunk_size = 1024 * 1024 # 1 megabyte
224
- digest.update(chunk) while chunk = value.read(chunk_size)
225
- value.rewind
226
- else
227
- digest.update(value)
228
- end
229
- digest.hexdigest
220
+ Aws::Checksums.sha256_hexdigest(value)
230
221
  end
231
222
 
232
223
  def hmac(key, value)
@@ -45,7 +45,14 @@ module Aws
45
45
  elsif rules[:payload]
46
46
  body_for(api, operation, rules[:payload_member], data[rules[:payload]])
47
47
  else
48
- body_for(api, operation, rules, data)
48
+ filtered = Seahorse::Model::Shapes::ShapeRef.new(
49
+ shape: Seahorse::Model::Shapes::StructureShape.new.tap do |s|
50
+ rules.shape.members.each do |member_name, member_ref|
51
+ s.add_member(member_name, member_ref) if member_ref.location.nil?
52
+ end
53
+ end
54
+ )
55
+ body_for(api, operation, filtered, data)
49
56
  end
50
57
  end
51
58
 
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.3.14'
2
+ VERSION = '2.3.15'
3
3
  end
@@ -1,3 +1,5 @@
1
+ require 'openssl'
2
+
1
3
  module Seahorse
2
4
  module Client
3
5
  module NetHttp
@@ -22,6 +24,11 @@ module Seahorse
22
24
  Errno::EHOSTUNREACH, Errno::ECONNREFUSED
23
25
  ]
24
26
 
27
+ # does not exist in Ruby 1.9.3
28
+ if OpenSSL::SSL.const_defined?(:SSLErrorWaitReadable)
29
+ NETWORK_ERRORS << OpenSSL::SSL::SSLErrorWaitReadable
30
+ end
31
+
25
32
  # @api private
26
33
  DNS_ERROR_MESSAGE = 'getaddrinfo: nodename nor servname provided, or not known'
27
34
 
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: 2.3.14
4
+ version: 2.3.15
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: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -256,6 +256,7 @@ files:
256
256
  - lib/aws-sdk-core/applicationdiscoveryservice.rb
257
257
  - lib/aws-sdk-core/assume_role_credentials.rb
258
258
  - lib/aws-sdk-core/autoscaling.rb
259
+ - lib/aws-sdk-core/checksums.rb
259
260
  - lib/aws-sdk-core/client.rb
260
261
  - lib/aws-sdk-core/client_stubs.rb
261
262
  - lib/aws-sdk-core/client_waiters.rb
@@ -366,6 +367,7 @@ files:
366
367
  - lib/aws-sdk-core/plugins/route_53_id_fix.rb
367
368
  - lib/aws-sdk-core/plugins/s3_accelerate.rb
368
369
  - lib/aws-sdk-core/plugins/s3_bucket_dns.rb
370
+ - lib/aws-sdk-core/plugins/s3_bucket_name_restrictions.rb
369
371
  - lib/aws-sdk-core/plugins/s3_expect_100_continue.rb
370
372
  - lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
371
373
  - lib/aws-sdk-core/plugins/s3_http_200_errors.rb