aws-sdk 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/lib/aws.rb +10 -9
  2. data/lib/aws/api_config/IAM-2010-07-15.yml +632 -0
  3. data/lib/aws/base_client.rb +1 -1
  4. data/lib/aws/cacheable.rb +34 -46
  5. data/lib/aws/client_logging.rb +19 -14
  6. data/lib/aws/collections.rb +230 -0
  7. data/lib/aws/common.rb +4 -0
  8. data/lib/aws/configuration.rb +7 -0
  9. data/lib/aws/ec2.rb +2 -2
  10. data/lib/aws/ec2/attachment.rb +64 -71
  11. data/lib/aws/ec2/attachment_collection.rb +11 -9
  12. data/lib/aws/ec2/availability_zone.rb +40 -31
  13. data/lib/aws/ec2/availability_zone_collection.rb +2 -3
  14. data/lib/aws/ec2/elastic_ip.rb +25 -22
  15. data/lib/aws/ec2/elastic_ip_collection.rb +5 -2
  16. data/lib/aws/ec2/image.rb +113 -129
  17. data/lib/aws/ec2/image_collection.rb +5 -6
  18. data/lib/aws/ec2/instance.rb +290 -233
  19. data/lib/aws/ec2/instance_collection.rb +72 -67
  20. data/lib/aws/ec2/key_pair.rb +16 -18
  21. data/lib/aws/ec2/region.rb +25 -17
  22. data/lib/aws/ec2/reserved_instances.rb +7 -1
  23. data/lib/aws/ec2/reserved_instances_collection.rb +3 -3
  24. data/lib/aws/ec2/reserved_instances_offering.rb +7 -1
  25. data/lib/aws/ec2/reserved_instances_offering_collection.rb +3 -3
  26. data/lib/aws/ec2/resource.rb +41 -222
  27. data/lib/aws/ec2/security_group.rb +22 -18
  28. data/lib/aws/ec2/security_group_collection.rb +2 -5
  29. data/lib/aws/ec2/snapshot.rb +44 -35
  30. data/lib/aws/ec2/snapshot_collection.rb +43 -1
  31. data/lib/aws/ec2/tag.rb +14 -18
  32. data/lib/aws/ec2/volume.rb +59 -72
  33. data/lib/aws/ec2/volume_collection.rb +16 -12
  34. data/lib/aws/errors.rb +14 -5
  35. data/lib/aws/http/httparty_handler.rb +2 -2
  36. data/lib/aws/iam.rb +306 -0
  37. data/lib/aws/iam/access_key.rb +183 -0
  38. data/lib/aws/iam/access_key_collection.rb +131 -0
  39. data/lib/aws/iam/account_alias_collection.rb +81 -0
  40. data/lib/aws/iam/client.rb +44 -0
  41. data/lib/aws/iam/client/xml.rb +38 -0
  42. data/lib/aws/iam/collection.rb +87 -0
  43. data/lib/aws/iam/errors.rb +29 -0
  44. data/lib/aws/iam/group.rb +117 -0
  45. data/lib/aws/iam/group_collection.rb +135 -0
  46. data/lib/aws/iam/group_policy_collection.rb +49 -0
  47. data/lib/aws/iam/group_user_collection.rb +94 -0
  48. data/lib/aws/iam/login_profile.rb +97 -0
  49. data/lib/aws/iam/mfa_device.rb +52 -0
  50. data/lib/aws/iam/mfa_device_collection.rb +119 -0
  51. data/lib/aws/iam/policy.rb +48 -0
  52. data/lib/aws/iam/policy_collection.rb +191 -0
  53. data/lib/aws/iam/request.rb +27 -0
  54. data/lib/aws/iam/resource.rb +74 -0
  55. data/lib/aws/iam/server_certificate.rb +143 -0
  56. data/lib/aws/iam/server_certificate_collection.rb +174 -0
  57. data/lib/aws/iam/signing_certificate.rb +171 -0
  58. data/lib/aws/iam/signing_certificate_collection.rb +134 -0
  59. data/lib/aws/iam/user.rb +196 -0
  60. data/lib/aws/iam/user_collection.rb +136 -0
  61. data/lib/aws/iam/user_group_collection.rb +101 -0
  62. data/lib/aws/iam/user_policy.rb +90 -0
  63. data/lib/aws/iam/user_policy_collection.rb +48 -0
  64. data/lib/aws/resource.rb +381 -0
  65. data/lib/aws/resource_cache.rb +1 -2
  66. data/lib/aws/response.rb +5 -1
  67. data/lib/aws/response_cache.rb +1 -1
  68. data/lib/aws/s3/client.rb +3 -1
  69. data/lib/aws/s3/presigned_post.rb +1 -1
  70. data/lib/aws/simple_db.rb +1 -1
  71. metadata +113 -50
@@ -37,7 +37,7 @@ module AWS
37
37
 
38
38
  def select(*types, &block)
39
39
  cached_responses.select do |resp|
40
- types.map { |t| t.to_s }.include?(resp.request_type.to_s) and
40
+ types.map{|t| t.to_s }.include?(resp.request_type.to_s) and
41
41
  (block.nil? || block.call(resp))
42
42
  end
43
43
  end
@@ -335,10 +335,12 @@ module AWS
335
335
  # The response contains only the standard fields.
336
336
  object_method(:set_object_acl, :put, 'acl') do
337
337
  configure_request do |req, options|
338
- require_acl!(options[:acl])
338
+ require_acl!(options[:acl]) unless options[:acl].kind_of?(Symbol)
339
339
  super(req, options)
340
340
  if options[:acl].kind_of?(Hash)
341
341
  req.body = AccessControlList.new(options[:acl]).to_xml
342
+ elsif options[:acl].kind_of?(Symbol)
343
+ req.headers["x-amz-acl"] = options[:acl].to_s.tr("_","-")
342
344
  elsif options[:acl].respond_to?(:to_str)
343
345
  req.body = options[:acl]
344
346
  else
@@ -317,7 +317,7 @@ module AWS
317
317
  "expiration" => format_expiration,
318
318
  "conditions" => generate_conditions
319
319
  }.to_json
320
- Base64.encode64(json)
320
+ Base64.encode64(json).tr("\n","")
321
321
  end
322
322
 
323
323
  # @return [Hash] A collection of form fields (including a
@@ -13,7 +13,7 @@
13
13
 
14
14
  require 'aws/common'
15
15
  require 'aws/service_interface'
16
- require 'aws/s3/errors'
16
+ require 'aws/simple_db/errors'
17
17
  require 'aws/simple_db/client'
18
18
  require 'aws/simple_db/domain_collection'
19
19
 
metadata CHANGED
@@ -1,67 +1,93 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.4
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
5
  prerelease:
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 0
10
+ version: 1.1.0
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Amazon Web Services
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-08-03 00:00:00.000000000 -07:00
17
+
18
+ date: 2011-08-16 00:00:00 -07:00
13
19
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
16
22
  name: uuidtools
17
- requirement: &2163569700 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
18
25
  none: false
19
- requirements:
26
+ requirements:
20
27
  - - ~>
21
- - !ruby/object:Gem::Version
22
- version: '2.1'
28
+ - !ruby/object:Gem::Version
29
+ hash: 1
30
+ segments:
31
+ - 2
32
+ - 1
33
+ version: "2.1"
23
34
  type: :runtime
24
- prerelease: false
25
- version_requirements: *2163569700
26
- - !ruby/object:Gem::Dependency
35
+ requirement: *id001
36
+ - !ruby/object:Gem::Dependency
27
37
  name: httparty
28
- requirement: &2163568860 !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
29
40
  none: false
30
- requirements:
41
+ requirements:
31
42
  - - ~>
32
- - !ruby/object:Gem::Version
33
- version: '0.7'
43
+ - !ruby/object:Gem::Version
44
+ hash: 5
45
+ segments:
46
+ - 0
47
+ - 7
48
+ version: "0.7"
34
49
  type: :runtime
35
- prerelease: false
36
- version_requirements: *2163568860
37
- - !ruby/object:Gem::Dependency
50
+ requirement: *id002
51
+ - !ruby/object:Gem::Dependency
38
52
  name: nokogiri
39
- requirement: &2163568040 !ruby/object:Gem::Requirement
53
+ prerelease: false
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
40
55
  none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 15
60
+ segments:
61
+ - 1
62
+ - 4
63
+ - 4
44
64
  version: 1.4.4
45
65
  type: :runtime
46
- prerelease: false
47
- version_requirements: *2163568040
48
- - !ruby/object:Gem::Dependency
66
+ requirement: *id003
67
+ - !ruby/object:Gem::Dependency
49
68
  name: json
50
- requirement: &2163567300 !ruby/object:Gem::Requirement
69
+ prerelease: false
70
+ version_requirements: &id004 !ruby/object:Gem::Requirement
51
71
  none: false
52
- requirements:
72
+ requirements:
53
73
  - - ~>
54
- - !ruby/object:Gem::Version
55
- version: '1.4'
74
+ - !ruby/object:Gem::Version
75
+ hash: 7
76
+ segments:
77
+ - 1
78
+ - 4
79
+ version: "1.4"
56
80
  type: :runtime
57
- prerelease: false
58
- version_requirements: *2163567300
81
+ requirement: *id004
59
82
  description: AWS SDK for Ruby
60
83
  email:
61
84
  executables: []
85
+
62
86
  extensions: []
87
+
63
88
  extra_rdoc_files: []
64
- files:
89
+
90
+ files:
65
91
  - ca-bundle.crt
66
92
  - rails/init.rb
67
93
  - lib/aws/api_config.rb
@@ -73,6 +99,7 @@ files:
73
99
  - lib/aws/base_client.rb
74
100
  - lib/aws/cacheable.rb
75
101
  - lib/aws/client_logging.rb
102
+ - lib/aws/collections.rb
76
103
  - lib/aws/common.rb
77
104
  - lib/aws/configurable.rb
78
105
  - lib/aws/configuration.rb
@@ -131,6 +158,34 @@ files:
131
158
  - lib/aws/http/request.rb
132
159
  - lib/aws/http/request_param.rb
133
160
  - lib/aws/http/response.rb
161
+ - lib/aws/iam/access_key.rb
162
+ - lib/aws/iam/access_key_collection.rb
163
+ - lib/aws/iam/account_alias_collection.rb
164
+ - lib/aws/iam/client/xml.rb
165
+ - lib/aws/iam/client.rb
166
+ - lib/aws/iam/collection.rb
167
+ - lib/aws/iam/errors.rb
168
+ - lib/aws/iam/group.rb
169
+ - lib/aws/iam/group_collection.rb
170
+ - lib/aws/iam/group_policy_collection.rb
171
+ - lib/aws/iam/group_user_collection.rb
172
+ - lib/aws/iam/login_profile.rb
173
+ - lib/aws/iam/mfa_device.rb
174
+ - lib/aws/iam/mfa_device_collection.rb
175
+ - lib/aws/iam/policy.rb
176
+ - lib/aws/iam/policy_collection.rb
177
+ - lib/aws/iam/request.rb
178
+ - lib/aws/iam/resource.rb
179
+ - lib/aws/iam/server_certificate.rb
180
+ - lib/aws/iam/server_certificate_collection.rb
181
+ - lib/aws/iam/signing_certificate.rb
182
+ - lib/aws/iam/signing_certificate_collection.rb
183
+ - lib/aws/iam/user.rb
184
+ - lib/aws/iam/user_collection.rb
185
+ - lib/aws/iam/user_group_collection.rb
186
+ - lib/aws/iam/user_policy.rb
187
+ - lib/aws/iam/user_policy_collection.rb
188
+ - lib/aws/iam.rb
134
189
  - lib/aws/ignore_result_element.rb
135
190
  - lib/aws/indifferent_hash.rb
136
191
  - lib/aws/inflection.rb
@@ -173,6 +228,7 @@ files:
173
228
  - lib/aws/record/validators/numericality.rb
174
229
  - lib/aws/record/validators/presence.rb
175
230
  - lib/aws/record.rb
231
+ - lib/aws/resource.rb
176
232
  - lib/aws/resource_cache.rb
177
233
  - lib/aws/response.rb
178
234
  - lib/aws/response_cache.rb
@@ -270,6 +326,7 @@ files:
270
326
  - lib/aws-sdk.rb
271
327
  - lib/aws.rb
272
328
  - lib/aws/api_config/EC2-2011-02-28.yml
329
+ - lib/aws/api_config/IAM-2010-07-15.yml
273
330
  - lib/aws/api_config/SimpleDB-2009-04-15.yml
274
331
  - lib/aws/api_config/SimpleEmailService-2010-12-01.yml
275
332
  - lib/aws/api_config/SNS-2010-03-31.yml
@@ -282,31 +339,37 @@ files:
282
339
  - LICENSE.txt
283
340
  has_rdoc: true
284
341
  homepage: http://aws.amazon.com/sdkforruby
285
- licenses:
342
+ licenses:
286
343
  - Apache 2.0
287
344
  post_install_message:
288
345
  rdoc_options: []
289
- require_paths:
346
+
347
+ require_paths:
290
348
  - lib
291
- required_ruby_version: !ruby/object:Gem::Requirement
349
+ required_ruby_version: !ruby/object:Gem::Requirement
292
350
  none: false
293
- requirements:
294
- - - ! '>='
295
- - !ruby/object:Gem::Version
296
- version: '0'
297
- segments:
351
+ requirements:
352
+ - - ">="
353
+ - !ruby/object:Gem::Version
354
+ hash: 3
355
+ segments:
298
356
  - 0
299
- hash: -4467582824639949942
300
- required_rubygems_version: !ruby/object:Gem::Requirement
357
+ version: "0"
358
+ required_rubygems_version: !ruby/object:Gem::Requirement
301
359
  none: false
302
- requirements:
303
- - - ! '>='
304
- - !ruby/object:Gem::Version
305
- version: '0'
360
+ requirements:
361
+ - - ">="
362
+ - !ruby/object:Gem::Version
363
+ hash: 3
364
+ segments:
365
+ - 0
366
+ version: "0"
306
367
  requirements: []
368
+
307
369
  rubyforge_project:
308
- rubygems_version: 1.6.1
370
+ rubygems_version: 1.4.1
309
371
  signing_key:
310
372
  specification_version: 3
311
373
  summary: AWS SDK for Ruby
312
374
  test_files: []
375
+