aws-sdk-core 2.2.18 → 2.2.19

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: 6d38e4a93984eccc5ddcee3e788ecfe0b3a19106
4
- data.tar.gz: 5f225801cc66ebe06c867fc7014e94de24dd7425
3
+ metadata.gz: 7ed86d122f252ba7da7637fcc705ce69b264b9ca
4
+ data.tar.gz: d992e963082a5dfc245176ce8712bf95895eb4fb
5
5
  SHA512:
6
- metadata.gz: 89a2c4706a926a5dcaed36007117ca950ce9c867397bacd496ed9d936e223ee675a934bf4ac1c28d19d4efd75b0bd01d9a51a8b9b50770e5071e0042f6dc0973
7
- data.tar.gz: 5d732badd5be7e23b7d1db1861758c3ae855f78bb0061f6c906f946d2044ed4698fe16210a36147e1f6a3c7b651c77137a1999dfdb6390fd955922bb40dae9a3
6
+ metadata.gz: 6ff75a635b0eb5e789f04129b80a9ea31ecdd6da8c58ed95aae0ae6cecffe6506fbe0fd15637c549c66d4d2512ca3083f4bbc8ff9f9721bc358c9a5c94b4be70
7
+ data.tar.gz: 4d87af55beaceb71ab7adb7b0157a6df44e845a2863c261ad0fdcdf13d732f17bea66c9b4410b082dc8fd178707315665eeb909f39eda9ad59ac1968621ff8f8
@@ -15,11 +15,6 @@
15
15
  "output_token": "nextToken",
16
16
  "result_key": "devices"
17
17
  },
18
- "ListDevices": {
19
- "input_token": "nextToken",
20
- "output_token": "nextToken",
21
- "result_key": "devices"
22
- },
23
18
  "ListJobs": {
24
19
  "input_token": "nextToken",
25
20
  "output_token": "nextToken",
@@ -316,7 +316,8 @@
316
316
  "errors":[
317
317
  {"shape":"NoSuchChange"},
318
318
  {"shape":"InvalidInput"}
319
- ]
319
+ ],
320
+ "deprecated":true
320
321
  },
321
322
  "GetCheckerIpRanges":{
322
323
  "name":"GetCheckerIpRanges",
@@ -474,7 +475,8 @@
474
475
  "errors":[
475
476
  {"shape":"NoSuchHostedZone"},
476
477
  {"shape":"InvalidInput"}
477
- ]
478
+ ],
479
+ "deprecated":true
478
480
  },
479
481
  "ListChangeBatchesByRRSet":{
480
482
  "name":"ListChangeBatchesByRRSet",
@@ -487,7 +489,8 @@
487
489
  "errors":[
488
490
  {"shape":"NoSuchHostedZone"},
489
491
  {"shape":"InvalidInput"}
490
- ]
492
+ ],
493
+ "deprecated":true
491
494
  },
492
495
  "ListGeoLocations":{
493
496
  "name":"ListGeoLocations",
@@ -822,7 +825,8 @@
822
825
  "Comment":{"shape":"ResourceDescription"},
823
826
  "Submitter":{"shape":"AWSAccountID"},
824
827
  "Changes":{"shape":"Changes"}
825
- }
828
+ },
829
+ "deprecated":true
826
830
  },
827
831
  "ChangeBatchRecords":{
828
832
  "type":"list",
@@ -830,6 +834,7 @@
830
834
  "shape":"ChangeBatchRecord",
831
835
  "locationName":"ChangeBatchRecord"
832
836
  },
837
+ "deprecated":true,
833
838
  "min":1
834
839
  },
835
840
  "ChangeInfo":{
@@ -1123,6 +1128,7 @@
1123
1128
  },
1124
1129
  "Date":{
1125
1130
  "type":"string",
1131
+ "deprecated":true,
1126
1132
  "max":256
1127
1133
  },
1128
1134
  "DelegationSet":{
@@ -1298,6 +1304,7 @@
1298
1304
  "ChangeInfo":{"shape":"ChangeInfo"}
1299
1305
  }
1300
1306
  },
1307
+ "EnableSNI":{"type":"boolean"},
1301
1308
  "ErrorMessage":{"type":"string"},
1302
1309
  "ErrorMessages":{
1303
1310
  "type":"list",
@@ -1380,14 +1387,16 @@
1380
1387
  "location":"uri",
1381
1388
  "locationName":"Id"
1382
1389
  }
1383
- }
1390
+ },
1391
+ "deprecated":true
1384
1392
  },
1385
1393
  "GetChangeDetailsResponse":{
1386
1394
  "type":"structure",
1387
1395
  "required":["ChangeBatchRecord"],
1388
1396
  "members":{
1389
1397
  "ChangeBatchRecord":{"shape":"ChangeBatchRecord"}
1390
- }
1398
+ },
1399
+ "deprecated":true
1391
1400
  },
1392
1401
  "GetChangeRequest":{
1393
1402
  "type":"structure",
@@ -1656,7 +1665,8 @@
1656
1665
  "MeasureLatency":{"shape":"MeasureLatency"},
1657
1666
  "Inverted":{"shape":"Inverted"},
1658
1667
  "HealthThreshold":{"shape":"HealthThreshold"},
1659
- "ChildHealthChecks":{"shape":"ChildHealthCheckList"}
1668
+ "ChildHealthChecks":{"shape":"ChildHealthCheckList"},
1669
+ "EnableSNI":{"shape":"EnableSNI"}
1660
1670
  }
1661
1671
  },
1662
1672
  "HealthCheckCount":{"type":"long"},
@@ -1890,7 +1900,8 @@
1890
1900
  "location":"querystring",
1891
1901
  "locationName":"marker"
1892
1902
  }
1893
- }
1903
+ },
1904
+ "deprecated":true
1894
1905
  },
1895
1906
  "ListChangeBatchesByHostedZoneResponse":{
1896
1907
  "type":"structure",
@@ -1905,7 +1916,8 @@
1905
1916
  "IsTruncated":{"shape":"PageTruncated"},
1906
1917
  "ChangeBatchRecords":{"shape":"ChangeBatchRecords"},
1907
1918
  "NextMarker":{"shape":"PageMarker"}
1908
- }
1919
+ },
1920
+ "deprecated":true
1909
1921
  },
1910
1922
  "ListChangeBatchesByRRSetRequest":{
1911
1923
  "type":"structure",
@@ -1957,7 +1969,8 @@
1957
1969
  "location":"querystring",
1958
1970
  "locationName":"marker"
1959
1971
  }
1960
- }
1972
+ },
1973
+ "deprecated":true
1961
1974
  },
1962
1975
  "ListChangeBatchesByRRSetResponse":{
1963
1976
  "type":"structure",
@@ -1972,7 +1985,8 @@
1972
1985
  "IsTruncated":{"shape":"PageTruncated"},
1973
1986
  "ChangeBatchRecords":{"shape":"ChangeBatchRecords"},
1974
1987
  "NextMarker":{"shape":"PageMarker"}
1975
- }
1988
+ },
1989
+ "deprecated":true
1976
1990
  },
1977
1991
  "ListGeoLocationsRequest":{
1978
1992
  "type":"structure",
@@ -2627,6 +2641,7 @@
2627
2641
  "ap-southeast-1",
2628
2642
  "ap-southeast-2",
2629
2643
  "ap-northeast-1",
2644
+ "ap-northeast-2",
2630
2645
  "sa-east-1",
2631
2646
  "cn-north-1"
2632
2647
  ],
@@ -2936,7 +2951,8 @@
2936
2951
  "FailureThreshold":{"shape":"FailureThreshold"},
2937
2952
  "Inverted":{"shape":"Inverted"},
2938
2953
  "HealthThreshold":{"shape":"HealthThreshold"},
2939
- "ChildHealthChecks":{"shape":"ChildHealthCheckList"}
2954
+ "ChildHealthChecks":{"shape":"ChildHealthCheckList"},
2955
+ "EnableSNI":{"shape":"EnableSNI"}
2940
2956
  }
2941
2957
  },
2942
2958
  "UpdateHealthCheckResponse":{
@@ -3049,6 +3065,7 @@
3049
3065
  "ap-southeast-1",
3050
3066
  "ap-southeast-2",
3051
3067
  "ap-northeast-1",
3068
+ "ap-northeast-2",
3052
3069
  "sa-east-1",
3053
3070
  "cn-north-1"
3054
3071
  ],
@@ -846,6 +846,15 @@
846
846
  { "target": "Key", "source": "identifier", "name": "Key" }
847
847
  ]
848
848
  }
849
+ },
850
+ "RestoreObject": {
851
+ "request": {
852
+ "operation": "RestoreObject",
853
+ "params": [
854
+ { "target": "Bucket", "source": "identifier", "name": "BucketName" },
855
+ { "target": "Key", "source": "identifier", "name": "Key" }
856
+ ]
857
+ }
849
858
  }
850
859
  },
851
860
  "batchActions": {
@@ -1013,6 +1022,15 @@
1013
1022
  { "target": "Key", "source": "identifier", "name": "Key" }
1014
1023
  ]
1015
1024
  }
1025
+ },
1026
+ "RestoreObject": {
1027
+ "request": {
1028
+ "operation": "RestoreObject",
1029
+ "params": [
1030
+ { "target": "Bucket", "source": "identifier", "name": "BucketName" },
1031
+ { "target": "Key", "source": "identifier", "name": "Key" }
1032
+ ]
1033
+ }
1016
1034
  }
1017
1035
  },
1018
1036
  "batchActions": {
@@ -4,12 +4,10 @@
4
4
  "CreateQueue": [
5
5
  {
6
6
  "input": {
7
- "Attributes": {
8
- },
9
7
  "QueueName": "MyQueue"
10
8
  },
11
9
  "output": {
12
- "QueueUrl": ""
10
+ "QueueUrl": "https://queue.amazonaws.com/012345678910/MyQueue"
13
11
  },
14
12
  "comments": {
15
13
  "input": {
@@ -177,6 +177,7 @@ module Aws
177
177
  autoload :S3SseCpk, 'aws-sdk-core/plugins/s3_sse_cpk'
178
178
  autoload :S3UrlEncodedKeys, 'aws-sdk-core/plugins/s3_url_encoded_keys'
179
179
  autoload :SQSQueueUrls, 'aws-sdk-core/plugins/sqs_queue_urls'
180
+ autoload :SQSMd5s, 'aws-sdk-core/plugins/sqs_md5s'
180
181
  autoload :StubResponses, 'aws-sdk-core/plugins/stub_responses'
181
182
  autoload :SWFReadTimeouts, 'aws-sdk-core/plugins/swf_read_timeouts'
182
183
  autoload :UserAgent, 'aws-sdk-core/plugins/user_agent'
@@ -166,6 +166,7 @@ module Aws
166
166
 
167
167
  plugins('sqs', add: %w(
168
168
  Aws::Plugins::SQSQueueUrls
169
+ Aws::Plugins::SQSMd5s
169
170
  ))
170
171
 
171
172
  plugins('swf', add: %w(
@@ -0,0 +1,148 @@
1
+ require 'openssl'
2
+
3
+ module Aws
4
+ module Plugins
5
+
6
+ # @seahorse.client.option [Boolean] :verify_checksums (true)
7
+ # When `true` MD5 checksums will be computed for messages sent to
8
+ # an SQS queue and matched against MD5 checksums returned by Amazon SQS.
9
+ # `Aws::Errors::Checksum` errors are raised for cases where checksums do
10
+ # not match.
11
+ class SQSMd5s < Seahorse::Client::Plugin
12
+ OPERATIONS_TO_VERIFY = [:send_message, :send_message_batch]
13
+
14
+ # @api private
15
+ class Handler < Seahorse::Client::Handler
16
+ def call(context)
17
+ @handler.call(context).on_success do |response|
18
+ case context.operation_name
19
+ when :send_message
20
+ validate_send_message(context, response)
21
+ when :send_message_batch
22
+ validate_send_message_batch(context, response)
23
+ end
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ TRANSPORT_TYPE_ENCODINGS = {
30
+ 'String' => 1,
31
+ 'Binary' => 2,
32
+ 'Number' => 1
33
+ }
34
+
35
+ NORMALIZED_ENCODING = Encoding::UTF_8
36
+
37
+ def validate_send_message(context, response)
38
+ body = context.params[:message_body]
39
+ attributes = context.params[:message_attributes]
40
+ validate_single_message(body, attributes, response)
41
+ end
42
+
43
+ def validate_send_message_batch(context, response)
44
+ context.params[:entries].each do |entry|
45
+ id = entry[:id]
46
+ body = entry[:message_body]
47
+ attributes = entry[:message_attributes]
48
+ message_response = response.successful.select { |r| r.id == id }[0]
49
+ unless message_response.nil?
50
+ validate_single_message(body, attributes, message_response)
51
+ end
52
+ end
53
+ end
54
+
55
+ def validate_single_message(body, attributes, response)
56
+ validate_body(body, response)
57
+ validate_attributes(attributes, response) unless attributes.nil?
58
+ end
59
+
60
+ def validate_body(body, response)
61
+ calculated_md5 = md5_of_message_body(body)
62
+ returned_md5 = response.md5_of_message_body
63
+ if calculated_md5 != returned_md5
64
+ error_message = mismatch_error_message(
65
+ 'message body',
66
+ calculated_md5,
67
+ returned_md5,
68
+ response)
69
+ raise Aws::Errors::ChecksumError, error_message
70
+ end
71
+ end
72
+
73
+ def validate_attributes(attributes, response)
74
+ calculated_md5 = md5_of_message_attributes(attributes)
75
+ returned_md5 = response.md5_of_message_attributes
76
+ if returned_md5 != calculated_md5
77
+ error_message = mismatch_error_message(
78
+ 'message atributes',
79
+ calculated_md5,
80
+ returned_md5,
81
+ response)
82
+ raise Aws::Errors::ChecksumError, error_message
83
+ end
84
+ end
85
+
86
+ def md5_of_message_body(message_body)
87
+ OpenSSL::Digest::MD5.hexdigest(message_body)
88
+ end
89
+
90
+ def md5_of_message_attributes(message_attributes)
91
+ encoded = { }
92
+ message_attributes.each do |name, attribute|
93
+ name = name.to_s
94
+ encoded[name] = String.new
95
+ encoded[name] << encode_length_and_bytes(name) <<
96
+ encode_length_and_bytes(attribute[:data_type]) <<
97
+ [TRANSPORT_TYPE_ENCODINGS[attribute[:data_type]]].pack('C'.freeze)
98
+
99
+ if attribute[:string_value] != nil
100
+ encoded[name] << encode_length_and_string(attribute[:string_value])
101
+ elsif attribute[:binary_value] != nil
102
+ encoded[name] << encode_length_and_bytes(attribute[:binary_value])
103
+ end
104
+ end
105
+
106
+ buffer = encoded.keys.sort.reduce(String.new) do |string, name|
107
+ string << encoded[name]
108
+ end
109
+ OpenSSL::Digest::MD5.hexdigest(buffer)
110
+ end
111
+
112
+ def encode_length_and_string(string)
113
+ string = String.new(string)
114
+ string.encode!(NORMALIZED_ENCODING)
115
+ encode_length_and_bytes(string)
116
+ end
117
+
118
+ def encode_length_and_bytes(bytes)
119
+ [bytes.bytesize, bytes].pack('L>a*'.freeze)
120
+ end
121
+
122
+ def mismatch_error_message(section, local_md5, returned_md5, response)
123
+ m = "MD5 returned by SQS does not match " <<
124
+ "the calculation on the original request. ("
125
+
126
+ if response.respond_to?(:id) && !response.id.nil?
127
+ m << "Message ID: #{response.id}, "
128
+ end
129
+
130
+ m << "MD5 calculated by the #{section}: " <<
131
+ "'#{local_md5}', MD5 checksum returned: '#{returned_md5}')"
132
+ end
133
+ end
134
+
135
+ option(:verify_checksums, true)
136
+
137
+ def add_handlers(handlers, config)
138
+ if config.verify_checksums
139
+ handlers.add(Handler, {
140
+ priority: 10 ,
141
+ step: :validate,
142
+ operations: SQSMd5s::OPERATIONS_TO_VERIFY
143
+ })
144
+ end
145
+ end
146
+ end
147
+ end
148
+ end
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.2.18'
2
+ VERSION = '2.2.19'
3
3
  end
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.2.18
4
+ version: 2.2.19
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-02-18 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -335,6 +335,7 @@ files:
335
335
  - lib/aws-sdk-core/plugins/s3_request_signer.rb
336
336
  - lib/aws-sdk-core/plugins/s3_sse_cpk.rb
337
337
  - lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb
338
+ - lib/aws-sdk-core/plugins/sqs_md5s.rb
338
339
  - lib/aws-sdk-core/plugins/sqs_queue_urls.rb
339
340
  - lib/aws-sdk-core/plugins/stub_responses.rb
340
341
  - lib/aws-sdk-core/plugins/swf_read_timeouts.rb