aws-sdk 1.5.6 → 1.5.7

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.
Files changed (55) hide show
  1. data/lib/aws.rb +2 -0
  2. data/lib/aws/api_config/CloudWatch-2010-08-01.yml +424 -0
  3. data/lib/aws/api_config/STS-2011-06-15.yml +4 -0
  4. data/lib/aws/auto_scaling/activity.rb +2 -2
  5. data/lib/aws/auto_scaling/activity_collection.rb +1 -1
  6. data/lib/aws/auto_scaling/group_collection.rb +1 -1
  7. data/lib/aws/auto_scaling/instance_collection.rb +1 -1
  8. data/lib/aws/auto_scaling/launch_configuration_collection.rb +1 -1
  9. data/lib/aws/auto_scaling/notification_configuration_collection.rb +1 -1
  10. data/lib/aws/auto_scaling/scaling_policy_collection.rb +1 -1
  11. data/lib/aws/auto_scaling/scheduled_action_collection.rb +1 -1
  12. data/lib/aws/auto_scaling/tag_collection.rb +1 -1
  13. data/lib/aws/cloud_watch.rb +75 -0
  14. data/lib/aws/cloud_watch/alarm.rb +272 -0
  15. data/lib/aws/cloud_watch/alarm_collection.rb +153 -0
  16. data/lib/aws/cloud_watch/alarm_history_item.rb +50 -0
  17. data/lib/aws/cloud_watch/alarm_history_item_collection.rb +84 -0
  18. data/lib/aws/cloud_watch/client.rb +333 -0
  19. data/lib/aws/cloud_watch/config.rb +18 -0
  20. data/lib/aws/cloud_watch/errors.rb +22 -0
  21. data/lib/aws/cloud_watch/metric.rb +135 -0
  22. data/lib/aws/cloud_watch/metric_alarm_collection.rb +160 -0
  23. data/lib/aws/cloud_watch/metric_collection.rb +131 -0
  24. data/lib/aws/cloud_watch/metric_statistics.rb +69 -0
  25. data/lib/aws/cloud_watch/request.rb +23 -0
  26. data/lib/aws/core.rb +1 -1
  27. data/lib/aws/core/client.rb +2 -2
  28. data/lib/aws/core/client/query_json.rb +2 -0
  29. data/lib/aws/core/collection.rb +58 -25
  30. data/lib/aws/core/collection/simple.rb +18 -26
  31. data/lib/aws/core/collection/with_limit_and_next_token.rb +71 -0
  32. data/lib/aws/core/collection/with_next_token.rb +97 -0
  33. data/lib/aws/core/credential_providers.rb +36 -0
  34. data/lib/aws/core/option_grammar.rb +19 -0
  35. data/lib/aws/core/page_result.rb +5 -3
  36. data/lib/aws/dynamo_db/client.rb +0 -16
  37. data/lib/aws/dynamo_db/item_collection.rb +1 -1
  38. data/lib/aws/dynamo_db/request.rb +5 -1
  39. data/lib/aws/dynamo_db/table_collection.rb +1 -1
  40. data/lib/aws/iam/collection.rb +1 -1
  41. data/lib/aws/s3/client.rb +1 -1
  42. data/lib/aws/s3/paginated_collection.rb +1 -1
  43. data/lib/aws/simple_db/domain_collection.rb +14 -41
  44. data/lib/aws/simple_db/item_collection.rb +2 -2
  45. data/lib/aws/simple_email_service/identity_collection.rb +1 -1
  46. data/lib/aws/simple_workflow/domain_collection.rb +1 -1
  47. data/lib/aws/simple_workflow/history_event_collection.rb +1 -1
  48. data/lib/aws/simple_workflow/type_collection.rb +1 -1
  49. data/lib/aws/simple_workflow/workflow_execution_collection.rb +1 -1
  50. data/lib/aws/sns/topic.rb +1 -1
  51. data/lib/aws/sts.rb +9 -1
  52. data/lib/aws/sts/client.rb +31 -14
  53. data/lib/net/http/connection_pool.rb +11 -5
  54. metadata +19 -4
  55. data/lib/aws/core/collection/limitable.rb +0 -99
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-29 00:00:00.000000000 Z
12
+ date: 2012-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: uuidtools
@@ -122,14 +122,28 @@ files:
122
122
  - lib/aws/cloud_formation/stack_summary.rb
123
123
  - lib/aws/cloud_formation/stack_summary_collection.rb
124
124
  - lib/aws/cloud_formation.rb
125
+ - lib/aws/cloud_watch/alarm.rb
126
+ - lib/aws/cloud_watch/alarm_collection.rb
127
+ - lib/aws/cloud_watch/alarm_history_item.rb
128
+ - lib/aws/cloud_watch/alarm_history_item_collection.rb
129
+ - lib/aws/cloud_watch/client.rb
130
+ - lib/aws/cloud_watch/config.rb
131
+ - lib/aws/cloud_watch/errors.rb
132
+ - lib/aws/cloud_watch/metric.rb
133
+ - lib/aws/cloud_watch/metric_alarm_collection.rb
134
+ - lib/aws/cloud_watch/metric_collection.rb
135
+ - lib/aws/cloud_watch/metric_statistics.rb
136
+ - lib/aws/cloud_watch/request.rb
137
+ - lib/aws/cloud_watch.rb
125
138
  - lib/aws/core/async_handle.rb
126
139
  - lib/aws/core/autoloader.rb
127
140
  - lib/aws/core/cacheable.rb
128
141
  - lib/aws/core/client/query_json.rb
129
142
  - lib/aws/core/client/query_xml.rb
130
143
  - lib/aws/core/client.rb
131
- - lib/aws/core/collection/limitable.rb
132
144
  - lib/aws/core/collection/simple.rb
145
+ - lib/aws/core/collection/with_limit_and_next_token.rb
146
+ - lib/aws/core/collection/with_next_token.rb
133
147
  - lib/aws/core/collection.rb
134
148
  - lib/aws/core/configuration.rb
135
149
  - lib/aws/core/credential_providers.rb
@@ -463,6 +477,7 @@ files:
463
477
  - lib/user.rb
464
478
  - lib/aws/api_config/AutoScaling-2011-01-01.yml
465
479
  - lib/aws/api_config/CloudFormation-2010-05-15.yml
480
+ - lib/aws/api_config/CloudWatch-2010-08-01.yml
466
481
  - lib/aws/api_config/DynamoDB-2011-12-05.yml
467
482
  - lib/aws/api_config/EC2-2012-06-01.yml
468
483
  - lib/aws/api_config/ELB-2011-08-15.yml
@@ -493,7 +508,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
493
508
  version: '0'
494
509
  segments:
495
510
  - 0
496
- hash: 2482550745628365272
511
+ hash: -730295580872100044
497
512
  required_rubygems_version: !ruby/object:Gem::Requirement
498
513
  none: false
499
514
  requirements:
@@ -1,99 +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
- # AWS::Core::Collection::Limitable is used by collections that
19
- # may truncate responses but that also accept a upper limit of
20
- # results to return in a single request.
21
- #
22
- # See {AWS::Core::Collection} for documentation on the available
23
- # methods.
24
- module Limitable
25
-
26
- include Model
27
- include Collection
28
- include Enumerable
29
-
30
- def each_batch options = {}, &block
31
-
32
- each_opts = options.dup
33
-
34
- ## limit and batch size should accept string values like '10'
35
-
36
- limit = each_opts.delete(:limit) || _limit
37
- limit = limit.to_i if limit
38
-
39
- batch_size = each_opts.delete(:batch_size)
40
- batch_size = batch_size.to_i if batch_size
41
-
42
- next_token = each_opts.delete(:next_token)
43
-
44
- total = 0 # count of items yeilded across all batches
45
-
46
- begin
47
-
48
- max = nil
49
- if limit or batch_size
50
- max = []
51
- max << (limit - total) if limit
52
- max << batch_size if batch_size
53
- max = max.min
54
- end
55
-
56
- batch = []
57
- next_token = _each_item(next_token, max, each_opts.dup) do |item|
58
-
59
- total += 1
60
- batch << item
61
-
62
- end
63
-
64
- yield(batch)
65
-
66
- end until next_token.nil? or (limit and limit == total)
67
-
68
- next_token
69
-
70
- end
71
-
72
- protected
73
- def _each_item next_token, limit, options = {}, &block
74
- raise NotImplementedError
75
- end
76
-
77
- # This method should be overriden in collection classes
78
- # when there is another method to provide a "limit" besides
79
- # as an option to the enumerable methods.
80
- #
81
- # SimpleDB::ItemCollection (for example) allows setting the limit
82
- # in a method chain, e.g.
83
- #
84
- # collection.limit(10).each {|item| ... }
85
- #
86
- # These collection classes can simply override #_limit and return
87
- # their prefered limit. This is only called in the abscense of
88
- # the +:limit+ option.
89
- #
90
- # @private
91
- protected
92
- def _limit
93
- nil
94
- end
95
-
96
- end
97
- end
98
- end
99
- end