aws-sdk 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/lib/aws/api_config/{IAM-2010-07-15.yml → IAM-2010-05-08.yml} +56 -4
  2. data/lib/aws/api_config/SNS-2010-03-31.yml +90 -81
  3. data/lib/aws/core.rb +26 -11
  4. data/lib/aws/core/client.rb +12 -4
  5. data/lib/aws/core/collection.rb +5 -12
  6. data/lib/aws/core/collection/limitable.rb +10 -3
  7. data/lib/aws/core/collection/simple.rb +1 -0
  8. data/lib/aws/core/configuration.rb +2 -0
  9. data/lib/aws/core/configured_json_client_methods.rb +5 -2
  10. data/lib/aws/core/http/httparty_handler.rb +1 -1
  11. data/lib/aws/core/http/net_http_handler.rb +2 -1
  12. data/lib/aws/core/http/request.rb +27 -0
  13. data/lib/aws/core/json_client.rb +41 -0
  14. data/lib/aws/core/lazy_error_classes.rb +2 -0
  15. data/lib/aws/core/option_grammar.rb +1 -1
  16. data/lib/aws/core/resource.rb +12 -14
  17. data/lib/aws/core/session_signer.rb +0 -5
  18. data/lib/aws/core/xml_grammar.rb +12 -2
  19. data/lib/aws/dynamo_db.rb +4 -1
  20. data/lib/aws/dynamo_db/client.rb +4 -17
  21. data/lib/aws/dynamo_db/item_collection.rb +15 -0
  22. data/lib/aws/ec2/security_group.rb +2 -1
  23. data/lib/aws/ec2/security_group/ip_permission.rb +2 -3
  24. data/lib/aws/elb/listener.rb +2 -2
  25. data/lib/aws/iam.rb +17 -0
  26. data/lib/aws/iam/client.rb +9 -6
  27. data/lib/aws/iam/mfa_device.rb +4 -2
  28. data/lib/aws/iam/mfa_device_collection.rb +14 -3
  29. data/lib/aws/iam/user.rb +10 -0
  30. data/lib/aws/iam/virtual_mfa_device.rb +139 -0
  31. data/lib/aws/iam/virtual_mfa_device_collection.rb +73 -0
  32. data/lib/aws/record/abstract_base.rb +1 -0
  33. data/lib/aws/record/hash_model/attributes.rb +8 -8
  34. data/lib/aws/record/hash_model/finder_methods.rb +10 -15
  35. data/lib/aws/record/model.rb +1 -3
  36. data/lib/aws/record/model/finder_methods.rb +3 -3
  37. data/lib/aws/s3.rb +1 -0
  38. data/lib/aws/s3/bucket.rb +83 -16
  39. data/lib/aws/s3/bucket_lifecycle_configuration.rb +360 -0
  40. data/lib/aws/s3/client.rb +50 -0
  41. data/lib/aws/s3/client/xml.rb +10 -0
  42. data/lib/aws/s3/object_version.rb +5 -0
  43. data/lib/aws/s3/object_version_collection.rb +15 -1
  44. data/lib/aws/s3/request.rb +1 -1
  45. data/lib/aws/s3/s3_object.rb +56 -1
  46. data/lib/aws/sns.rb +1 -0
  47. data/lib/aws/sns/has_delivery_policy.rb +68 -0
  48. data/lib/aws/sns/subscription.rb +62 -14
  49. data/lib/aws/sns/subscription_collection.rb +1 -1
  50. data/lib/aws/sns/topic.rb +22 -4
  51. data/lib/aws/sts.rb +3 -2
  52. data/lib/net/http/connection_pool.rb +1 -1
  53. metadata +27 -25
  54. data/lib/aws/core/collection/batchable.rb +0 -133
@@ -25,7 +25,7 @@ module AWS
25
25
  # @example Getting temporary credentials and using them to make an EC2 request
26
26
  # sts = AWS::STS.new(:access_key_id => "LONG_TERM_KEY",
27
27
  # :secret_access_key => "LONG_TERM_SECRET")
28
- # session = AWS::STS.new.new_session(:duration => 60*60)
28
+ # session = sts.new_session(:duration => 60*60)
29
29
  # ec2 = AWS::EC2.new(session.credentials)
30
30
  # ec2.instances.to_a
31
31
  #
@@ -98,7 +98,7 @@ module AWS
98
98
  # @option opts [Integer] :duration The duration, in seconds, that
99
99
  # the session should last. Acceptable durations for federation
100
100
  # sessions range from 3600s (one hour) to 129600s (36 hours),
101
- # with 43200s (12 hours) as the default.
101
+ # with one hour as the default.
102
102
  #
103
103
  # @option opts [String, AWS::STS::Policy] :policy A policy
104
104
  # specifying the permissions to associate with the session. The
@@ -110,6 +110,7 @@ module AWS
110
110
  # who issued the session.
111
111
  #
112
112
  # @return [FederatedSession]
113
+ #
113
114
  def new_federated_session(name, opts = {})
114
115
  opts = opts.merge(:name => name)
115
116
  case
@@ -27,7 +27,7 @@ class Net::HTTP::ConnectionPool
27
27
  Errno::EINVAL
28
28
  ]
29
29
 
30
- # @params [Hash] options
30
+ # @param [Hash] options
31
31
  #
32
32
  # @option options [Numeric] :idle_timeout (60) The number of seconds a
33
33
  # connection is allowed to sit idle before it is closed and removed
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 2
10
- version: 1.3.2
9
+ - 3
10
+ version: 1.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Amazon Web Services
@@ -15,13 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-18 00:00:00 -08:00
19
- default_executable:
18
+ date: 2012-02-02 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- name: uuidtools
23
21
  prerelease: false
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ type: :runtime
23
+ requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
25
  requirements:
27
26
  - - ~>
@@ -31,12 +30,12 @@ dependencies:
31
30
  - 2
32
31
  - 1
33
32
  version: "2.1"
34
- type: :runtime
35
- requirement: *id001
33
+ name: uuidtools
34
+ version_requirements: *id001
36
35
  - !ruby/object:Gem::Dependency
37
- name: httparty
38
36
  prerelease: false
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ type: :runtime
38
+ requirement: &id002 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ~>
@@ -46,12 +45,12 @@ dependencies:
46
45
  - 0
47
46
  - 7
48
47
  version: "0.7"
49
- type: :runtime
50
- requirement: *id002
48
+ name: httparty
49
+ version_requirements: *id002
51
50
  - !ruby/object:Gem::Dependency
52
- name: nokogiri
53
51
  prerelease: false
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
52
+ type: :runtime
53
+ requirement: &id003 !ruby/object:Gem::Requirement
55
54
  none: false
56
55
  requirements:
57
56
  - - ">="
@@ -62,12 +61,12 @@ dependencies:
62
61
  - 4
63
62
  - 4
64
63
  version: 1.4.4
65
- type: :runtime
66
- requirement: *id003
64
+ name: nokogiri
65
+ version_requirements: *id003
67
66
  - !ruby/object:Gem::Dependency
68
- name: json
69
67
  prerelease: false
70
- version_requirements: &id004 !ruby/object:Gem::Requirement
68
+ type: :runtime
69
+ requirement: &id004 !ruby/object:Gem::Requirement
71
70
  none: false
72
71
  requirements:
73
72
  - - ~>
@@ -77,8 +76,8 @@ dependencies:
77
76
  - 1
78
77
  - 4
79
78
  version: "1.4"
80
- type: :runtime
81
- requirement: *id004
79
+ name: json
80
+ version_requirements: *id004
82
81
  description: AWS SDK for Ruby
83
82
  email:
84
83
  executables: []
@@ -99,7 +98,6 @@ files:
99
98
  - lib/aws/core/cacheable.rb
100
99
  - lib/aws/core/client.rb
101
100
  - lib/aws/core/client_logging.rb
102
- - lib/aws/core/collection/batchable.rb
103
101
  - lib/aws/core/collection/limitable.rb
104
102
  - lib/aws/core/collection/simple.rb
105
103
  - lib/aws/core/collection.rb
@@ -119,6 +117,7 @@ files:
119
117
  - lib/aws/core/ignore_result_element.rb
120
118
  - lib/aws/core/indifferent_hash.rb
121
119
  - lib/aws/core/inflection.rb
120
+ - lib/aws/core/json_client.rb
122
121
  - lib/aws/core/lazy_error_classes.rb
123
122
  - lib/aws/core/meta_utils.rb
124
123
  - lib/aws/core/model.rb
@@ -243,6 +242,8 @@ files:
243
242
  - lib/aws/iam/user_group_collection.rb
244
243
  - lib/aws/iam/user_policy.rb
245
244
  - lib/aws/iam/user_policy_collection.rb
245
+ - lib/aws/iam/virtual_mfa_device.rb
246
+ - lib/aws/iam/virtual_mfa_device_collection.rb
246
247
  - lib/aws/iam.rb
247
248
  - lib/aws/rails.rb
248
249
  - lib/aws/record/abstract_base.rb
@@ -279,6 +280,7 @@ files:
279
280
  - lib/aws/s3/acl_object.rb
280
281
  - lib/aws/s3/bucket.rb
281
282
  - lib/aws/s3/bucket_collection.rb
283
+ - lib/aws/s3/bucket_lifecycle_configuration.rb
282
284
  - lib/aws/s3/bucket_version_collection.rb
283
285
  - lib/aws/s3/client/xml.rb
284
286
  - lib/aws/s3/client.rb
@@ -339,6 +341,7 @@ files:
339
341
  - lib/aws/sns/client.rb
340
342
  - lib/aws/sns/config.rb
341
343
  - lib/aws/sns/errors.rb
344
+ - lib/aws/sns/has_delivery_policy.rb
342
345
  - lib/aws/sns/policy.rb
343
346
  - lib/aws/sns/request.rb
344
347
  - lib/aws/sns/subscription.rb
@@ -375,7 +378,7 @@ files:
375
378
  - lib/aws/api_config/DynamoDB-2011-12-05.yml
376
379
  - lib/aws/api_config/EC2-2011-02-28.yml
377
380
  - lib/aws/api_config/ELB-2011-08-15.yml
378
- - lib/aws/api_config/IAM-2010-07-15.yml
381
+ - lib/aws/api_config/IAM-2010-05-08.yml
379
382
  - lib/aws/api_config/SimpleDB-2009-04-15.yml
380
383
  - lib/aws/api_config/SimpleEmailService-2010-12-01.yml
381
384
  - lib/aws/api_config/SNS-2010-03-31.yml
@@ -386,7 +389,6 @@ files:
386
389
  - README.rdoc
387
390
  - NOTICE.txt
388
391
  - LICENSE.txt
389
- has_rdoc: true
390
392
  homepage: http://aws.amazon.com/sdkforruby
391
393
  licenses:
392
394
  - Apache 2.0
@@ -416,7 +418,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
416
418
  requirements: []
417
419
 
418
420
  rubyforge_project:
419
- rubygems_version: 1.4.1
421
+ rubygems_version: 1.8.15
420
422
  signing_key:
421
423
  specification_version: 3
422
424
  summary: AWS SDK for Ruby
@@ -1,133 +0,0 @@
1
- # Copyright 2011-2012 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
- module Collection
17
-
18
- module Batchable
19
-
20
- include Collection
21
-
22
- def each_batch options = {}, &block
23
-
24
- raise NotImplementedError
25
-
26
- each_opts = options.dup
27
-
28
- limit = each_opts.delete(:limit)
29
-
30
- next_token, skip = each_opts.delete(:next_token)
31
-
32
- total = 0 # count of items yeileded across all batches
33
-
34
- begin
35
-
36
- batch = []
37
-
38
- next_token = _each_item(next_token, each_opts.dup) do |item|
39
- total += 1
40
- batch << item
41
-
42
- if limit and total == limit
43
- yield(batch)
44
- end
45
-
46
- end
47
-
48
- end until next_token.nil? or (limit and limit = total)
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
- options = options.dup
59
-
60
- limit = options.delete(:limit)
61
- batch_size = options.delete(:batch_size)
62
- options.delete(:next_token) if [nil, ''].include?(options[:next_token])
63
-
64
- total = 0 # count of items yeileded across all batches
65
-
66
- _each_response(options, limit, batch_size) do |response|
67
-
68
- batch = []
69
- each_item(response) do |item|
70
- batch << item
71
- if limit and (total += 1) == limit
72
- yield(batch)
73
- return
74
- end
75
- end
76
-
77
- yield(batch)
78
-
79
- batch.size
80
-
81
- end
82
-
83
- end
84
-
85
- # @note +limit+ is ignored because Batchable colections do not
86
- # accept a +:limit+ option at the service level.
87
- # @note +batch_size+ is ignored because Batchable collections do not
88
- # accept a +:batch_size+ option at the service level.
89
- protected
90
- def _each_response options, limit, batch_size, &block
91
-
92
- next_token = nil
93
-
94
- begin
95
-
96
- page_opts = {}
97
- page_opts[next_token_key] = next_token if next_token
98
-
99
- response = client.send(request_method, options.merge(page_opts))
100
-
101
- yield(response)
102
-
103
- next_token = _next_token_for(response)
104
-
105
- end until next_token.nil?
106
-
107
- nil
108
-
109
- end
110
-
111
- # Override this method in collections that have an alternate method
112
- # for finding the next token.
113
- protected
114
- def _next_token_for response
115
- method = _next_token_key
116
- response.respond_to?(method) ? response.send(method) : nil
117
- end
118
-
119
- protected
120
- def _next_token_key
121
- :next_token
122
- end
123
-
124
- protected
125
- def _each_item next_token, options = {}, &block
126
- raise NotImplementedError
127
- end
128
-
129
- end
130
-
131
- end
132
- end
133
- end