aws-sdk 1.8.1.3 → 1.8.2

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 (44) hide show
  1. data/lib/aws-sdk.rb +2 -0
  2. data/lib/aws/api_config/Redshift-2012-12-01.yml +1149 -0
  3. data/lib/aws/auto_scaling.rb +2 -2
  4. data/lib/aws/auto_scaling/activity_collection.rb +1 -1
  5. data/lib/aws/auto_scaling/group_options.rb +1 -1
  6. data/lib/aws/auto_scaling/scaling_policy_options.rb +1 -1
  7. data/lib/aws/auto_scaling/scheduled_action_collection.rb +4 -4
  8. data/lib/aws/cloud_search/client.rb +1 -1
  9. data/lib/aws/cloud_watch.rb +1 -1
  10. data/lib/aws/cloud_watch/alarm.rb +1 -1
  11. data/lib/aws/cloud_watch/metric_collection.rb +1 -1
  12. data/lib/aws/core.rb +14 -10
  13. data/lib/aws/core/client.rb +12 -6
  14. data/lib/aws/core/configuration.rb +15 -12
  15. data/lib/aws/core/inflection.rb +2 -0
  16. data/lib/aws/core/response.rb +0 -12
  17. data/lib/aws/dynamo_db.rb +1 -1
  18. data/lib/aws/elastic_beanstalk.rb +1 -1
  19. data/lib/aws/rails.rb +1 -1
  20. data/lib/aws/record/abstract_base.rb +1 -1
  21. data/lib/aws/redshift.rb +52 -0
  22. data/lib/aws/redshift/client.rb +1291 -0
  23. data/lib/aws/redshift/config.rb +18 -0
  24. data/lib/aws/redshift/errors.rb +22 -0
  25. data/lib/aws/redshift/request.rb +29 -0
  26. data/lib/aws/route_53/resource_record_set.rb +47 -26
  27. data/lib/aws/s3/client.rb +1 -1
  28. data/lib/aws/simple_db.rb +2 -2
  29. data/lib/aws/simple_db/attribute_collection.rb +2 -2
  30. data/lib/aws/simple_db/item_collection.rb +4 -4
  31. data/lib/aws/simple_email_service.rb +3 -3
  32. data/lib/aws/simple_email_service/client.rb +1 -1
  33. data/lib/aws/simple_email_service/email_address_collection.rb +1 -1
  34. data/lib/aws/simple_workflow.rb +5 -5
  35. data/lib/aws/simple_workflow/activity_task.rb +6 -6
  36. data/lib/aws/simple_workflow/decision_task.rb +2 -2
  37. data/lib/aws/simple_workflow/decision_task_collection.rb +4 -4
  38. data/lib/aws/simple_workflow/domain_collection.rb +3 -3
  39. data/lib/aws/simple_workflow/history_event_collection.rb +1 -1
  40. data/lib/aws/simple_workflow/workflow_execution.rb +3 -3
  41. data/lib/aws/simple_workflow/workflow_execution_collection.rb +8 -8
  42. data/lib/aws/simple_workflow/workflow_type.rb +1 -1
  43. data/lib/aws/version.rb +1 -1
  44. metadata +8 -2
@@ -0,0 +1,18 @@
1
+ # Copyright 2011-2013 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
+ AWS::Core::Configuration.module_eval do
15
+
16
+ add_service 'Redshift', 'redshift', 'redshift.us-east-1.amazonaws.com'
17
+
18
+ end
@@ -0,0 +1,22 @@
1
+ # Copyright 2011-2013 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
+ class Redshift
16
+ module Errors
17
+
18
+ extend Core::LazyErrorClasses
19
+
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,29 @@
1
+ # Copyright 2011-2013 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
+ class Redshift
16
+
17
+ # @private
18
+ class Request < Core::Http::Request
19
+
20
+ include Core::Signature::Version4
21
+
22
+ def service
23
+ 'redshift'
24
+ end
25
+
26
+ end
27
+
28
+ end
29
+ end
@@ -152,24 +152,15 @@ module AWS
152
152
  # @param [Hash] options Options for change batch.
153
153
  # @return [ResourceRecordSet] New resource record set with current value.
154
154
  def update options = {}
155
- delete_options = {:name => name, :type => type}
156
- delete_options[:set_identifier] = set_identifier if set_identifier
157
- delete_options[:alias_target] = alias_target if alias_target
158
- delete_options[:weight] = weight if weight
159
- delete_options[:region] = region if region
160
- delete_options[:ttl] = ttl if ttl
161
- delete_options[:resource_records] = resource_records if resource_records
155
+ batch = new_change_batch(options)
156
+ batch << new_delete_request
157
+ batch << new_change_request
162
158
 
163
- create_options = delete_options.merge(@create_options)
164
- @create_options = {}
165
- batch = ChangeBatch.new(hosted_zone_id, options.merge(:config => config))
166
- batch << DeleteRequest.new(delete_options[:name], delete_options[:type], delete_options)
167
- batch << CreateRequest.new(create_options[:name], create_options[:type], create_options)
168
-
169
- @name = create_options[:name]
170
- @type = create_options[:type]
171
- @set_identifier = create_options[:set_identifier]
172
159
  @change_info = batch.call()
160
+ @name = @create_options[:name]
161
+ @type = @create_options[:type]
162
+ @set_identifier = @create_options[:set_identifier]
163
+ @create_options = {}
173
164
  self
174
165
  end
175
166
 
@@ -177,22 +168,39 @@ module AWS
177
168
  # @param [Hash] options Options for change batch.
178
169
  # @return [ChangeInfo]
179
170
  def delete options = {}
180
- delete_options = {:name => name, :type => type}
181
- delete_options[:set_identifier] = set_identifier if set_identifier
182
- delete_options[:alias_target] = alias_target if alias_target
183
- delete_options[:weight] = weight if weight
184
- delete_options[:region] = region if region
185
- delete_options[:ttl] = ttl if ttl
186
- delete_options[:resource_records] = resource_records if resource_records
187
-
188
- batch = ChangeBatch.new(hosted_zone_id, options.merge(:config => config))
189
- batch << DeleteRequest.new(delete_options[:name], delete_options[:type], delete_options)
171
+ batch = new_change_batch(options)
172
+ batch << new_delete_request
190
173
 
191
174
  change_info = batch.call()
192
175
  end
193
176
 
177
+ # Return a new change batch for this hosted zone.
178
+ # @param [Hash] options Options for change batch.
179
+ # @return [ChangeBatch]
180
+ def new_change_batch options = {}
181
+ ChangeBatch.new(hosted_zone_id, options.merge(:config => config))
182
+ end
183
+
184
+ # Return the create request that #update would include in its change
185
+ # batch. Note that #update also includes a delete request.
186
+ # @return [CreateRequest]
187
+ def new_create_request
188
+ create_options = delete_options.merge(@create_options)
189
+ CreateRequest.new(create_options[:name], create_options[:type],
190
+ create_options)
191
+ end
192
+
193
+ # Return a delete request that would delete this resource record set.
194
+ # @return [DeleteRequest]
195
+ def new_delete_request
196
+ options = delete_options
197
+ DeleteRequest.new(options[:name], options[:type], options)
198
+ end
199
+
200
+
194
201
  private
195
202
 
203
+
196
204
  def resource_identifiers
197
205
  [[:name, name], [:type, type], [:set_identifier, set_identifier]]
198
206
  end
@@ -207,6 +215,19 @@ module AWS
207
215
  client.list_resource_record_sets(options)
208
216
  end
209
217
 
218
+ # Format a hash of options that can be used to initialize a change
219
+ # request.
220
+ # @return [Hash]
221
+ def delete_options
222
+ options = {:name => name, :type => type}
223
+ options[:set_identifier] = set_identifier if set_identifier
224
+ options[:alias_target] = alias_target if alias_target
225
+ options[:weight] = weight if weight
226
+ options[:region] = region if region
227
+ options[:ttl] = ttl if ttl
228
+ options[:resource_records] = resource_records if resource_records
229
+ options
230
+ end
210
231
  end
211
232
  end
212
233
  end
data/lib/aws/s3/client.rb CHANGED
@@ -1482,7 +1482,7 @@ module AWS
1482
1482
  if restore = resp.http_response.headers['x-amz-restore']
1483
1483
  if restore.first =~ /ongoing-request="(.+?)", expiry-date="(.+?)"/
1484
1484
  restoring = $1 == "true"
1485
- restore_date = DateTime.parse($2)
1485
+ restore_date = $2 && DateTime.parse($2)
1486
1486
  elsif restore.first =~ /ongoing-request="(.+?)"/
1487
1487
  restoring = $1 == "true"
1488
1488
  end
data/lib/aws/simple_db.rb CHANGED
@@ -120,7 +120,7 @@ module AWS
120
120
  # = Lazy Execution
121
121
  #
122
122
  # Requests are not made until necessary. This means you can drill down
123
- # all the way to an attribute, by name, without making any requets
123
+ # all the way to an attribute, by name, without making any requests
124
124
  # to SimpleDB.
125
125
  #
126
126
  # # makes no request to SimpleDB
@@ -176,7 +176,7 @@ module AWS
176
176
  #
177
177
  # === Other Modes
178
178
  #
179
- # You can also use this same function to disable consistent reads insie
179
+ # You can also use this same function to disable consistent reads inside
180
180
  # a block. This is useful if you have consistent reads enabled by
181
181
  # default:
182
182
  #
@@ -31,7 +31,7 @@ module AWS
31
31
  # @return [Item] The item this collection belongs to.
32
32
  attr_reader :item
33
33
 
34
- # Retuns an Attribute with the given name.
34
+ # Returns an Attribute with the given name.
35
35
  #
36
36
  # @note This does not make a request to SimpleDB.
37
37
  #
@@ -155,7 +155,7 @@ module AWS
155
155
  do_put(attribute_hashes(attributes, false), attributes)
156
156
  end
157
157
 
158
- # Perform a mixed update of added and replace attribues.
158
+ # Perform a mixed update of added and replace attributes.
159
159
  #
160
160
  # item.attributes.put(
161
161
  # :add => { 'colors' => %w(green blue), 'tags' => 'cool' }
@@ -74,7 +74,7 @@ module AWS
74
74
  item
75
75
  end
76
76
 
77
- # Retuns an item with the given name.
77
+ # Returns an item with the given name.
78
78
  #
79
79
  # @note This does not make a request to SimpleDB.
80
80
  #
@@ -117,7 +117,7 @@ module AWS
117
117
  #
118
118
  # You can also pass the standard scope options to #each as well:
119
119
  #
120
- # # output the item names of the 10 most expesive items
120
+ # # output the item names of the 10 most expensive items
121
121
  # domain.items.each(:order => [:price, :desc], :limit => 10).each do |item|
122
122
  # puts item.name
123
123
  # end
@@ -126,7 +126,7 @@ module AWS
126
126
  #
127
127
  # @yieldparam [Item,ItemData] item If the item collection has been
128
128
  # scoped by chaining +#select+ or by passing the +:select+ option
129
- # then {ItemData} objects (that contain a hash of attrbiutes) are
129
+ # then {ItemData} objects (that contain a hash of attributes) are
130
130
  # yielded. If no list of attributes has been provided, then#
131
131
  # {Item} objects (with no populated data) are yielded.
132
132
  #
@@ -268,7 +268,7 @@ module AWS
268
268
  #
269
269
  # * +:all+ or '*' to request all attributes for each item
270
270
  #
271
- # * A list or array of attribute names as strinsg or symbols
271
+ # * A list or array of attribute names as strings or symbols
272
272
  #
273
273
  # Attribute names may contain any characters that are valid
274
274
  # in a SimpleDB attribute name; this method will handle
@@ -88,9 +88,9 @@ module AWS
88
88
  #
89
89
  # == Listing Identities
90
90
  #
91
- # You can enumerate all identies:
91
+ # You can enumerate all identities:
92
92
  #
93
- # ses.identites.map(&:identity)
93
+ # ses.identities.map(&:identity)
94
94
  # #=> ['email@foo.com', 'somedomain.com']
95
95
  #
96
96
  # You can filter the types of identities enumerated:
@@ -98,7 +98,7 @@ module AWS
98
98
  # domains = ses.identities.domains.map(&:identity)
99
99
  # email_addresses = ses.identities.email_addresses.map(&:identity)
100
100
  #
101
- # You can get the verfication status and token from identities as well.
101
+ # You can get the verification status and token from identities as well.
102
102
  #
103
103
  # # for an email address
104
104
  # identity = ses.identities['youremail@yourdomain.com']
@@ -230,7 +230,7 @@ module AWS
230
230
  # notifications that will be published to the specified topic.
231
231
  # * +:sns_topic+ - (String) The Amazon Resource Name (ARN) of the
232
232
  # Amazon Simple Notification Service (Amazon SNS) topic. If the
233
- # parameter is ommited from the request or a null value is passed,
233
+ # parameter is omitted from the request or a null value is passed,
234
234
  # the topic is cleared and publishing is disabled.
235
235
  # @return [Core::Response]
236
236
 
@@ -22,7 +22,7 @@ module AWS
22
22
  include Core::Model
23
23
  include Enumerable
24
24
 
25
- # Requets for an email address to be verified. An email will be
25
+ # Requests for an email address to be verified. An email will be
26
26
  # sent to the given +email_address+ with a link to click. Once
27
27
  # the link has been followed the +email_address+ will be verified.
28
28
  #
@@ -28,7 +28,7 @@ module AWS
28
28
  # # name the domain and specify the retention period (in days)
29
29
  # domain = swf.domains.create('my-domain', 10)
30
30
  #
31
- # You can reference existin domains as well.
31
+ # You can reference existing domains as well.
32
32
  #
33
33
  # domain = swf.domains['my-domain']
34
34
  #
@@ -38,7 +38,7 @@ module AWS
38
38
  # activity types. Both types (workflow and activity) are templates that
39
39
  # can be used to start workflow executions or schedule activity tasks.
40
40
  #
41
- # Workflow and Acitivity types both have a number of default values
41
+ # Workflow and Activity types both have a number of default values
42
42
  # (e.g. default task list, timeouts, etc). If you do not specify these
43
43
  # optional default values when creating the type, you *MUST* specify
44
44
  # the actual values when starting a workflow execution or scheduling
@@ -76,9 +76,9 @@ module AWS
76
76
  #
77
77
  # = Decision Tasks
78
78
  #
79
- # Once a workflow execution has been started, it will start to generte
79
+ # Once a workflow execution has been started, it will start to generate
80
80
  # decision tasks. You poll for decision tasks from a task list.
81
- # Yielded decsion tasks provide access to the history of events
81
+ # Yielded decision tasks provide access to the history of events
82
82
  # for the workflow execution. You can also enumerate only new
83
83
  # events since the last decision.
84
84
  #
@@ -104,7 +104,7 @@ module AWS
104
104
  # # poll for decision tasks from 'my-task-list'
105
105
  # domain.decision_tasks.poll('my-task-list') do |task|
106
106
  #
107
- # # invesitate new events and make decisions
107
+ # # investigate new events and make decisions
108
108
  # task.new_events.each do |event|
109
109
  # case event.event_type
110
110
  # when 'WorkflowExecutionStarted'
@@ -16,7 +16,7 @@ module AWS
16
16
  class ActivityTask
17
17
 
18
18
  # Raised by {ActivityTask#record_heartbeat!} when this activity
19
- # task has received a cancelation request.
19
+ # task has received a cancellation request.
20
20
  class CancelRequestedError < StandardError; end
21
21
 
22
22
  include Core::Model
@@ -68,8 +68,8 @@ module AWS
68
68
 
69
69
  # Reports to the service that the activity task is progressing.
70
70
  #
71
- # You can optionally specifiy +:details+ that decibe the progress.
72
- # This might be a percetnage completetion, step number, etc.
71
+ # You can optionally specify +:details+ that describe the progress.
72
+ # This might be a percentage competition, step number, etc.
73
73
  #
74
74
  # activity_task.record_heartbeat! :details => '.75' # 75% complete
75
75
  #
@@ -86,10 +86,10 @@ module AWS
86
86
  #
87
87
  # task.record_heartbeat! # raises CancelRequestedError
88
88
  #
89
- # end # traps the error and responds activity task cancled.
89
+ # end # traps the error and responds activity task canceled.
90
90
  #
91
- # If you need to cleanup or provide addtional details in the
92
- # cancelation response, you can trap the error and
91
+ # If you need to cleanup or provide additional details in the
92
+ # cancellation response, you can trap the error and
93
93
  # respond manually.
94
94
  #
95
95
  # domain.activity_tasks.poll('task-list') do |task|
@@ -64,11 +64,11 @@ module AWS
64
64
  # * {#request_cancel_external_workflow_execution}
65
65
  # * {#start_child_workflow_execution}
66
66
  #
67
- # The deicision methods are grouped above by concern.
67
+ # The decision methods are grouped above by concern.
68
68
  #
69
69
  # == Completing the Decision Task
70
70
  #
71
- # Once you have finished adding deicions to the task, you need to
71
+ # Once you have finished adding decisions to the task, you need to
72
72
  # complete it. If you called {DecisionTaskCollection#poll} or
73
73
  # {DecisionTaskCollection#poll_for_single_task} with a block
74
74
  # argument then the decision will be completed automatically at the
@@ -48,7 +48,7 @@ module AWS
48
48
  #
49
49
  # == Polling for Tasks in a Loop
50
50
  #
51
- # You can poll indefinetly for tasks in a loop with {#poll}:
51
+ # You can poll indefinitely for tasks in a loop with {#poll}:
52
52
  #
53
53
  # domain.decision_tasks.poll('my-task-list') do |task|
54
54
  # # yields once for every decision task found
@@ -97,7 +97,7 @@ module AWS
97
97
  #
98
98
  # @return [Count] Returns a {Count} object that specifies the number
99
99
  # of decision tasks for the given task list. This count will
100
- # also indiciate if the count was truncated.
100
+ # also indicate if the count was truncated.
101
101
  #
102
102
  def count task_list
103
103
  options = {}
@@ -186,11 +186,11 @@ module AWS
186
186
 
187
187
  end
188
188
 
189
- # Polls indefinetly for decision tasks. Each deicsion task found is
189
+ # Polls indefinitely for decision tasks. Each decision task found is
190
190
  # yielded to the block. At the end of the block the decision task
191
191
  # is auto-completed ({DecisionTask#complete!} is called).
192
192
  #
193
- # # yields once for each decision task found, indefinetly
193
+ # # yields once for each decision task found, indefinitely
194
194
  # domain.decision_tasks.poll do |decision_task|
195
195
  # # make decisions here
196
196
  # end
@@ -14,7 +14,7 @@
14
14
  module AWS
15
15
  class SimpleWorkflow
16
16
 
17
- # The primary interface for registerign, listing and deprecating
17
+ # The primary interface for registering, listing and deprecating
18
18
  # domains.
19
19
  #
20
20
  # == Creating a Domain
@@ -24,7 +24,7 @@ module AWS
24
24
  # domain = simple_workflow.domains.create('my-domain', :none)
25
25
  # #=> #<AWS::SimpleWorkflow::Domain name:my-domain>
26
26
  #
27
- # == Gettin a Domain
27
+ # == Getting a Domain
28
28
  #
29
29
  # Domains are indexed by their name.
30
30
  #
@@ -80,7 +80,7 @@ module AWS
80
80
  # available in the results of visibility calls.
81
81
  #
82
82
  # If you pass the symbol +:none+ then there is no expiration for
83
- # workflow execution history (effectively an infinite rention
83
+ # workflow execution history (effectively an infinite retention
84
84
  # period).
85
85
  #
86
86
  # @param [Hash] options