aws-sdk 1.39.0 → 1.40.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.
- checksums.yaml +4 -4
- data/lib/aws/api_config/SQS-2012-11-05.yml +71 -0
- data/lib/aws/cloud_watch/alarm.rb +3 -0
- data/lib/aws/core.rb +2 -1
- data/lib/aws/core/client.rb +1 -0
- data/lib/aws/core/credential_providers.rb +54 -1
- data/lib/aws/core/ini_parser.rb +42 -0
- data/lib/aws/core/response.rb +4 -0
- data/lib/aws/ec2/image_collection.rb +1 -2
- data/lib/aws/emr/job_flow_collection.rb +4 -6
- data/lib/aws/s3/presign_v4.rb +2 -6
- data/lib/aws/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ff845ab34b9f0b173f208041f10c01b8f785d9b
|
4
|
+
data.tar.gz: 1be0ec46d195079cdd6719035235dd8c5d7742db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb869d3622bb68072522b7b7a51701d24c4d07c990bde2f267333ea091345fea9dabab662574d48e563bcf93cdfba05790b500f212320127b5d8850732bd6058
|
7
|
+
data.tar.gz: 0d6d5420c57603d8e49663c97f279ff0ceb63101d4d6a5b65cb063c366521ac9eff174cb0cfe66821e8b5cfcad8b87d3a04a285443140ab5f177e858ba864cc0
|
@@ -229,6 +229,10 @@
|
|
229
229
|
- :list:
|
230
230
|
- :string
|
231
231
|
- :rename: AttributeNames
|
232
|
+
MessageAttributeName:
|
233
|
+
- :list:
|
234
|
+
- :string
|
235
|
+
- :rename: MessageAttributeNames
|
232
236
|
MaxNumberOfMessages:
|
233
237
|
- :integer
|
234
238
|
VisibilityTimeout:
|
@@ -249,6 +253,23 @@
|
|
249
253
|
:map:
|
250
254
|
- Name
|
251
255
|
- Value
|
256
|
+
MessageAttribute:
|
257
|
+
:rename: :message_attributes
|
258
|
+
:map:
|
259
|
+
- Name
|
260
|
+
- Value
|
261
|
+
:children:
|
262
|
+
Value:
|
263
|
+
:children:
|
264
|
+
BinaryValue:
|
265
|
+
:type: :blob
|
266
|
+
StringListValue:
|
267
|
+
:list: true
|
268
|
+
:rename: :string_list_values
|
269
|
+
BinaryListValue:
|
270
|
+
:list: true
|
271
|
+
:rename: :binary_list_values
|
272
|
+
:type: :blob
|
252
273
|
- :name: RemovePermission
|
253
274
|
:method: :remove_permission
|
254
275
|
:inputs:
|
@@ -273,6 +294,31 @@
|
|
273
294
|
- :required
|
274
295
|
DelaySeconds:
|
275
296
|
- :integer
|
297
|
+
MessageAttribute:
|
298
|
+
- :map:
|
299
|
+
:key:
|
300
|
+
- :string
|
301
|
+
:value:
|
302
|
+
- :structure:
|
303
|
+
StringValue:
|
304
|
+
- :string
|
305
|
+
BinaryValue:
|
306
|
+
- :blob
|
307
|
+
StringListValue:
|
308
|
+
- :list:
|
309
|
+
- :string
|
310
|
+
- :rename: StringListValues
|
311
|
+
BinaryListValue:
|
312
|
+
- :list:
|
313
|
+
- :blob
|
314
|
+
- :rename: BinaryListValues
|
315
|
+
DataType:
|
316
|
+
- :string
|
317
|
+
- :required
|
318
|
+
:key_param: Name
|
319
|
+
:value_param: Value
|
320
|
+
:flattened: true
|
321
|
+
- :rename: MessageAttributes
|
276
322
|
:outputs:
|
277
323
|
:children:
|
278
324
|
SendMessageResult:
|
@@ -294,6 +340,31 @@
|
|
294
340
|
- :required
|
295
341
|
DelaySeconds:
|
296
342
|
- :integer
|
343
|
+
MessageAttribute:
|
344
|
+
- :map:
|
345
|
+
:key:
|
346
|
+
- :string
|
347
|
+
:value:
|
348
|
+
- :structure:
|
349
|
+
StringValue:
|
350
|
+
- :string
|
351
|
+
BinaryValue:
|
352
|
+
- :blob
|
353
|
+
StringListValue:
|
354
|
+
- :list:
|
355
|
+
- :string
|
356
|
+
- :rename: StringListValues
|
357
|
+
BinaryListValue:
|
358
|
+
- :list:
|
359
|
+
- :blob
|
360
|
+
- :rename: BinaryListValues
|
361
|
+
DataType:
|
362
|
+
- :string
|
363
|
+
- :required
|
364
|
+
:key_param: Name
|
365
|
+
:value_param: Value
|
366
|
+
:flattened: true
|
367
|
+
- :rename: MessageAttributes
|
297
368
|
- :required
|
298
369
|
- :rename: Entries
|
299
370
|
:outputs:
|
@@ -161,6 +161,9 @@ module AWS
|
|
161
161
|
# * 'LessThanThreshold'
|
162
162
|
# * 'LessThanOrEqualToThreshold'
|
163
163
|
#
|
164
|
+
# @option options [String,required] :namespace The namespace for the
|
165
|
+
# alarm's associated metric.
|
166
|
+
#
|
164
167
|
# @option options [Integer,required] :evaluation_periods The number
|
165
168
|
# of periods over which data is compared to the specified threshold.
|
166
169
|
#
|
data/lib/aws/core.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2011-
|
1
|
+
# Copyright 2011-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
4
4
|
# may not use this file except in compliance with the License. A copy of
|
@@ -168,6 +168,7 @@ module AWS
|
|
168
168
|
autoload :Endpoints, "#{SRC}/core/endpoints"
|
169
169
|
autoload :IndifferentHash, "#{SRC}/core/indifferent_hash"
|
170
170
|
autoload :Inflection, "#{SRC}/core/inflection"
|
171
|
+
autoload :IniParser, "#{SRC}/core/ini_parser"
|
171
172
|
autoload :JSONParser, "#{SRC}/core/json_parser"
|
172
173
|
|
173
174
|
autoload :JSONClient, "#{SRC}/core/json_client"
|
data/lib/aws/core/client.rb
CHANGED
@@ -118,6 +118,7 @@ module AWS
|
|
118
118
|
@providers << ENVProvider.new('AWS')
|
119
119
|
@providers << ENVProvider.new('AWS', :access_key_id => 'ACCESS_KEY', :secret_access_key => 'SECRET_KEY', :session_token => 'SESSION_TOKEN')
|
120
120
|
@providers << ENVProvider.new('AMAZON')
|
121
|
+
@providers << SharedCredentialFileProvider.new if Dir.home rescue ArgumentError
|
121
122
|
@providers << EC2Provider.new
|
122
123
|
end
|
123
124
|
|
@@ -236,7 +237,7 @@ module AWS
|
|
236
237
|
|
237
238
|
attr_reader :credential_file
|
238
239
|
|
239
|
-
# @param [
|
240
|
+
# @param [String] credential_file The file path of a credential file
|
240
241
|
def initialize(credential_file)
|
241
242
|
@credential_file = credential_file
|
242
243
|
end
|
@@ -259,6 +260,58 @@ module AWS
|
|
259
260
|
end
|
260
261
|
end
|
261
262
|
|
263
|
+
class SharedCredentialFileProvider
|
264
|
+
|
265
|
+
include Provider
|
266
|
+
|
267
|
+
# @api private
|
268
|
+
KEY_MAP = {
|
269
|
+
"aws_access_key_id" => :access_key_id,
|
270
|
+
"aws_secret_access_key" => :secret_access_key,
|
271
|
+
"aws_session_token" => :session_token,
|
272
|
+
}
|
273
|
+
|
274
|
+
# @option [String] :path
|
275
|
+
# @option [String] :profile
|
276
|
+
def initialize(options = {})
|
277
|
+
@path = options[:path] || File.join(Dir.home, '.aws', 'credentials')
|
278
|
+
@profile_name = options[:profile_name]
|
279
|
+
@profile_name ||= ENV['AWS_PROFILE']
|
280
|
+
@profile_name ||= 'default'
|
281
|
+
end
|
282
|
+
|
283
|
+
# @return [String]
|
284
|
+
attr_reader :path
|
285
|
+
|
286
|
+
# @return [String]
|
287
|
+
attr_reader :profile_name
|
288
|
+
|
289
|
+
# (see Provider#get_credentials)
|
290
|
+
def get_credentials
|
291
|
+
if File.exist?(path) && File.readable?(path)
|
292
|
+
load_from_path
|
293
|
+
else
|
294
|
+
{}
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
private
|
299
|
+
|
300
|
+
def load_from_path
|
301
|
+
profile = load_profile
|
302
|
+
KEY_MAP.inject({}) do |credentials, (source, target)|
|
303
|
+
credentials[target] = profile[source] if profile.key?(source)
|
304
|
+
credentials
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
def load_profile
|
309
|
+
ini = IniParser.parse(File.read(path))
|
310
|
+
ini[profile_name] || {}
|
311
|
+
end
|
312
|
+
|
313
|
+
end
|
314
|
+
|
262
315
|
# This credential provider tries to get credentials from the EC2
|
263
316
|
# metadata service.
|
264
317
|
class EC2Provider
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Copyright 2011-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
4
|
+
# may not use this file except in compliance with the License. A copy of
|
5
|
+
# the License is located at
|
6
|
+
#
|
7
|
+
# http://aws.amazon.com/apache2.0/
|
8
|
+
#
|
9
|
+
# or in the "license" file accompanying this file. This file is
|
10
|
+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11
|
+
# ANY KIND, either express or implied. See the License for the specific
|
12
|
+
# language governing permissions and limitations under the License.
|
13
|
+
|
14
|
+
module AWS
|
15
|
+
module Core
|
16
|
+
|
17
|
+
# @api private
|
18
|
+
module IniParser
|
19
|
+
|
20
|
+
def self.parse(ini)
|
21
|
+
current_section = {}
|
22
|
+
map = {}
|
23
|
+
ini.split(/\r?\n/).each do |line|
|
24
|
+
line = line.split(/^|\s;/).first # remove comments
|
25
|
+
section = line.match(/^\s*\[([^\[\]]+)\]\s*$/) unless line.nil?
|
26
|
+
if section
|
27
|
+
current_section = section[1]
|
28
|
+
elsif current_section
|
29
|
+
item = line.match(/^\s*(.+?)\s*=\s*(.+)\s*$/) unless line.nil?
|
30
|
+
if item
|
31
|
+
map[current_section] = map[current_section] || {}
|
32
|
+
map[current_section][item[1]] = item[2]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
map
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
data/lib/aws/core/response.rb
CHANGED
@@ -70,6 +70,9 @@ module AWS
|
|
70
70
|
# returned this response.
|
71
71
|
attr_accessor :request_type
|
72
72
|
|
73
|
+
# @return [String] The API version of the request/client.
|
74
|
+
attr_accessor :api_version
|
75
|
+
|
73
76
|
# @return [Hash] Returns the hash of options passed to the client
|
74
77
|
# request method that generated this response.
|
75
78
|
attr_accessor :request_options
|
@@ -141,6 +144,7 @@ module AWS
|
|
141
144
|
# @api private
|
142
145
|
def cache_key
|
143
146
|
[
|
147
|
+
api_version,
|
144
148
|
http_request.access_key_id,
|
145
149
|
http_request.host,
|
146
150
|
request_type,
|
@@ -72,8 +72,7 @@ module AWS
|
|
72
72
|
|
73
73
|
# @yield [image] Each image in the collection.
|
74
74
|
# @return [nil]
|
75
|
-
def each &block
|
76
|
-
opts = {}
|
75
|
+
def each(opts = {}, &block)
|
77
76
|
opts[:owners] = @owners.map { |id| id.to_s } unless @owners.empty?
|
78
77
|
opts[:executable_users] = @executable_users.map { |id| id.to_s } unless
|
79
78
|
@executable_users.empty?
|
@@ -132,11 +132,10 @@ module AWS
|
|
132
132
|
# # enumerate jobs that are more than an hour old
|
133
133
|
# emr.job_flows.created_before(Time.now - 3600).each{|job| ... }
|
134
134
|
#
|
135
|
-
# @param [Time,DateTime,Date] time
|
135
|
+
# @param [Time,DateTime,Date,Integer] time
|
136
136
|
# @return [JobFlowCollection]
|
137
137
|
def created_before time
|
138
|
-
|
139
|
-
filter(:created_before, time)
|
138
|
+
filter(:created_before, time.to_i)
|
140
139
|
end
|
141
140
|
|
142
141
|
# Returns a new collection that will only enumerate job flows that
|
@@ -145,11 +144,10 @@ module AWS
|
|
145
144
|
# # enumerate jobs that are at most 1 hour old
|
146
145
|
# emr.job_flows.created_after(Time.now - 3600).each{|job| ... }
|
147
146
|
#
|
148
|
-
# @param [Time,DateTime,Date] time
|
147
|
+
# @param [Time,DateTime,Date,Integer] time
|
149
148
|
# @return [JobFlowCollection]
|
150
149
|
def created_after time
|
151
|
-
|
152
|
-
filter(:created_after, time)
|
150
|
+
filter(:created_after, time.to_i)
|
153
151
|
end
|
154
152
|
|
155
153
|
# @param [String,Symbol] name
|
data/lib/aws/s3/presign_v4.rb
CHANGED
@@ -54,16 +54,12 @@ module AWS
|
|
54
54
|
request.headers['host'] = request.host
|
55
55
|
signed_headers = 'Host'
|
56
56
|
|
57
|
-
# must be sent along with the PUT request headers
|
58
57
|
if options[:acl]
|
59
|
-
request.
|
60
|
-
signed_headers << ';X-Amz-Acl'
|
58
|
+
request.add_param("X-Amz-Acl", options[:acl].to_s.gsub(/_/, '-'))
|
61
59
|
end
|
62
60
|
|
63
|
-
# must be sent along with the PUT request headers
|
64
61
|
if options[:content_md5]
|
65
|
-
request.
|
66
|
-
signed_headers << ';Content-MD5'
|
62
|
+
request.add_param("Content-MD5", options[:content_md5])
|
67
63
|
end
|
68
64
|
|
69
65
|
request_params = Core::Signers::S3::QUERY_PARAMS.map do |p|
|
data/lib/aws/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.40.0
|
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: 2014-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- lib/aws/core/http/response.rb
|
133
133
|
- lib/aws/core/indifferent_hash.rb
|
134
134
|
- lib/aws/core/inflection.rb
|
135
|
+
- lib/aws/core/ini_parser.rb
|
135
136
|
- lib/aws/core/json_client.rb
|
136
137
|
- lib/aws/core/json_parser.rb
|
137
138
|
- lib/aws/core/json_request_builder.rb
|