aws-sdk 1.5.8 → 1.6.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.
Files changed (53) hide show
  1. data/lib/aws.rb +2 -0
  2. data/lib/aws/api_config/Route53-2012-02-29.yml +348 -0
  3. data/lib/aws/auto_scaling/client.rb +362 -588
  4. data/lib/aws/cloud_formation/client.rb +155 -224
  5. data/lib/aws/cloud_watch/client.rb +156 -229
  6. data/lib/aws/core.rb +67 -52
  7. data/lib/aws/core/client.rb +81 -82
  8. data/lib/aws/core/collection/with_limit_and_next_token.rb +2 -2
  9. data/lib/aws/core/configuration.rb +75 -72
  10. data/lib/aws/core/http/net_http_handler.rb +3 -3
  11. data/lib/aws/core/http/request.rb +107 -138
  12. data/lib/aws/core/inflection.rb +3 -3
  13. data/lib/aws/core/json_client.rb +106 -0
  14. data/lib/aws/core/option_grammar.rb +10 -1
  15. data/lib/aws/core/options/validator.rb +140 -0
  16. data/lib/aws/core/options/xml_serializer.rb +98 -0
  17. data/lib/aws/core/query_client.rb +131 -0
  18. data/lib/aws/core/rest_client.rb +90 -0
  19. data/lib/aws/core/rest_client/input_handler.rb +145 -0
  20. data/lib/aws/core/rest_client/output_handler.rb +43 -0
  21. data/lib/aws/core/signature/version_2.rb +7 -7
  22. data/lib/aws/core/signature/version_3.rb +5 -1
  23. data/lib/aws/core/signature/version_3_https.rb +51 -0
  24. data/lib/aws/core/signature/version_4.rb +5 -22
  25. data/lib/aws/core/signer.rb +1 -1
  26. data/lib/aws/core/uri_escape.rb +2 -0
  27. data/lib/aws/core/xml/frame.rb +8 -8
  28. data/lib/aws/core/xml/grammar.rb +8 -3
  29. data/lib/aws/dynamo_db/client.rb +600 -662
  30. data/lib/aws/ec2/client.rb +2688 -3492
  31. data/lib/aws/ec2/request.rb +0 -1
  32. data/lib/aws/elb/client.rb +280 -407
  33. data/lib/aws/emr/client.rb +7 -7
  34. data/lib/aws/iam/client.rb +822 -1268
  35. data/lib/aws/route_53.rb +71 -0
  36. data/lib/aws/route_53/client.rb +272 -0
  37. data/lib/aws/route_53/config.rb +18 -0
  38. data/lib/aws/route_53/errors.rb +22 -0
  39. data/lib/aws/route_53/request.rb +23 -0
  40. data/lib/aws/s3/object_version_collection.rb +6 -6
  41. data/lib/aws/s3/paginated_collection.rb +1 -1
  42. data/lib/aws/s3/request.rb +10 -5
  43. data/lib/aws/simple_db/client.rb +184 -234
  44. data/lib/aws/simple_email_service/client.rb +147 -238
  45. data/lib/aws/simple_workflow/client.rb +997 -1191
  46. data/lib/aws/sns/client.rb +176 -264
  47. data/lib/aws/sqs/client.rb +162 -253
  48. data/lib/aws/sqs/queue.rb +1 -1
  49. data/lib/aws/sqs/request.rb +4 -0
  50. data/lib/aws/sts/client.rb +57 -66
  51. metadata +95 -71
  52. data/lib/aws/core/client/query_json.rb +0 -112
  53. data/lib/aws/core/client/query_xml.rb +0 -122
@@ -19,7 +19,7 @@ module AWS
19
19
 
20
20
  API_VERSION = '2011-10-01'
21
21
 
22
- extend Core::Client::QueryXML
22
+ extend Core::QueryClient
23
23
 
24
24
  # @private
25
25
  CACHEABLE_REQUESTS = Set[]
@@ -28,329 +28,238 @@ module AWS
28
28
 
29
29
  # Calls the AddPermission API operation.
30
30
  # @method add_permission(options = {})
31
- #
32
- # === Options:
33
- #
34
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
35
- # action on.
36
- # * +:label+ - *required* - (String) The unique identification of the
37
- # permission you're setting (e.g., AliceSendMessage). Constraints:
38
- # Maximum 80 characters; alphanumeric characters, hyphens (-), and
39
- # underscores (_) are allowed.
40
- # * +:aws_account_ids+ - *required* - (Array<String>) The AWS account
41
- # number of the principal who will be given permission. The principal
42
- # must have an AWS account, but does not need to be signed up for
43
- # Amazon SQS.
44
- # * +:actions+ - *required* - (Array<String>) The action the client wants
45
- # to allow for the specified principal.
46
- #
47
- # === Response Structure:
48
- #
49
- # This method returns no response data.
50
- #
31
+ # @param [Hash] options
32
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
33
+ # take action on.
34
+ # * +:label+ - *required* - (String) The unique identification of the
35
+ # permission you're setting (e.g., AliceSendMessage). Constraints:
36
+ # Maximum 80 characters; alphanumeric characters, hyphens (-), and
37
+ # underscores (_) are allowed.
38
+ # * +:aws_account_ids+ - *required* - (Array<String>) The AWS account
39
+ # number of the principal who will be given permission. The principal
40
+ # must have an AWS account, but does not need to be signed up for
41
+ # Amazon SQS.
42
+ # * +:actions+ - *required* - (Array<String>) The action the client
43
+ # wants to allow for the specified principal.
51
44
  # @return [Core::Response]
52
- #
53
45
  define_client_method :add_permission, 'AddPermission'
54
46
 
55
47
  # Calls the ChangeMessageVisibility API operation.
56
48
  # @method change_message_visibility(options = {})
57
- #
58
- # === Options:
59
- #
60
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
61
- # action on.
62
- # * +:receipt_handle+ - *required* - (String) The receipt handle
63
- # associated with the message whose visibility timeout should be
64
- # changed.
65
- # * +:visibility_timeout+ - *required* - (Integer) The new value (in
66
- # seconds) for the message's visibility timeout.
67
- #
68
- # === Response Structure:
69
- #
70
- # This method returns no response data.
71
- #
49
+ # @param [Hash] options
50
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
51
+ # take action on.
52
+ # * +:receipt_handle+ - *required* - (String) The receipt handle
53
+ # associated with the message whose visibility timeout should be
54
+ # changed.
55
+ # * +:visibility_timeout+ - *required* - (Integer) The new value (in
56
+ # seconds) for the message's visibility timeout.
72
57
  # @return [Core::Response]
73
- #
74
58
  define_client_method :change_message_visibility, 'ChangeMessageVisibility'
75
59
 
76
60
  # Calls the ChangeMessageVisibilityBatch API operation.
77
61
  # @method change_message_visibility_batch(options = {})
78
- #
79
- # === Options:
80
- #
81
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
82
- # action on.
83
- # * +:entries+ - *required* - (Array<Hash>) A list of receipt handles of
84
- # the messages for which the visibility timeout must be changed.
85
- # * +:id+ - *required* - (String) An identifier for this particular
86
- # receipt handle. This is used to communicate the result. Note that
87
- # the Ids of a batch request need to be unique within the request.
88
- # * +:receipt_handle+ - *required* - (String) A receipt handle.
89
- # * +:visibility_timeout+ - (Integer) The new value (in seconds) for
90
- # the message's visibility timeout.
91
- #
92
- # === Response Structure:
93
- #
94
- # * +:successful+ - (Array<Hash>)
95
- # * +:id+ - (String)
96
- # * +:failed+ - (Array<Hash>)
97
- # * +:id+ - (String)
98
- # * +:sender_fault+ - (Boolean)
99
- # * +:code+ - (String)
100
- # * +:message+ - (String)
101
- #
62
+ # @param [Hash] options
63
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
64
+ # take action on.
65
+ # * +:entries+ - *required* - (Array<Hash>) A list of receipt handles
66
+ # of the messages for which the visibility timeout must be changed.
67
+ # * +:id+ - *required* - (String) An identifier for this particular
68
+ # receipt handle. This is used to communicate the result. Note that
69
+ # the Ids of a batch request need to be unique within the request.
70
+ # * +:receipt_handle+ - *required* - (String) A receipt handle.
71
+ # * +:visibility_timeout+ - (Integer) The new value (in seconds) for
72
+ # the message's visibility timeout.
102
73
  # @return [Core::Response]
103
- #
74
+ # The #data method of the response object returns
75
+ # a hash with the following structure:
76
+ # * +:successful+ - (Array<Hash>)
77
+ # * +:id+ - (String)
78
+ # * +:failed+ - (Array<Hash>)
79
+ # * +:id+ - (String)
80
+ # * +:sender_fault+ - (Boolean)
81
+ # * +:code+ - (String)
82
+ # * +:message+ - (String)
104
83
  define_client_method :change_message_visibility_batch, 'ChangeMessageVisibilityBatch'
105
84
 
106
85
  # Calls the CreateQueue API operation.
107
86
  # @method create_queue(options = {})
108
- #
109
- # === Options:
110
- #
111
- # * +:queue_name+ - *required* - (String) The name for the queue to be
112
- # created.
113
- # * +:attributes+ - (Hash<String,String>) A map of attributes with their
114
- # corresponding values.
115
- #
116
- # === Response Structure:
117
- #
118
- # * +:queue_url+ - (String)
119
- #
87
+ # @param [Hash] options
88
+ # * +:queue_name+ - *required* - (String) The name for the queue to be
89
+ # created.
90
+ # * +:attributes+ - (Hash<String,String>) A map of attributes with
91
+ # their corresponding values.
120
92
  # @return [Core::Response]
121
- #
93
+ # The #data method of the response object returns
94
+ # a hash with the following structure:
95
+ # * +:queue_url+ - (String)
122
96
  define_client_method :create_queue, 'CreateQueue'
123
97
 
124
98
  # Calls the DeleteMessage API operation.
125
99
  # @method delete_message(options = {})
126
- #
127
- # === Options:
128
- #
129
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
130
- # action on.
131
- # * +:receipt_handle+ - *required* - (String) The receipt handle
132
- # associated with the message to delete.
133
- #
134
- # === Response Structure:
135
- #
136
- # This method returns no response data.
137
- #
100
+ # @param [Hash] options
101
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
102
+ # take action on.
103
+ # * +:receipt_handle+ - *required* - (String) The receipt handle
104
+ # associated with the message to delete.
138
105
  # @return [Core::Response]
139
- #
140
106
  define_client_method :delete_message, 'DeleteMessage'
141
107
 
142
108
  # Calls the DeleteMessageBatch API operation.
143
109
  # @method delete_message_batch(options = {})
144
- #
145
- # === Options:
146
- #
147
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
148
- # action on.
149
- # * +:entries+ - *required* - (Array<Hash>) A list of receipt handles for
150
- # the messages to be deleted.
151
- # * +:id+ - *required* - (String) An identifier for this particular
152
- # receipt handle. This is used to communicate the result. Note that
153
- # the Ids of a batch request need to be unique within the request.
154
- # * +:receipt_handle+ - *required* - (String) A receipt handle.
155
- #
156
- # === Response Structure:
157
- #
158
- # * +:successful+ - (Array<Hash>)
159
- # * +:id+ - (String)
160
- # * +:failed+ - (Array<Hash>)
161
- # * +:id+ - (String)
162
- # * +:sender_fault+ - (Boolean)
163
- # * +:code+ - (String)
164
- # * +:message+ - (String)
165
- #
110
+ # @param [Hash] options
111
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
112
+ # take action on.
113
+ # * +:entries+ - *required* - (Array<Hash>) A list of receipt handles
114
+ # for the messages to be deleted.
115
+ # * +:id+ - *required* - (String) An identifier for this particular
116
+ # receipt handle. This is used to communicate the result. Note that
117
+ # the Ids of a batch request need to be unique within the request.
118
+ # * +:receipt_handle+ - *required* - (String) A receipt handle.
166
119
  # @return [Core::Response]
167
- #
120
+ # The #data method of the response object returns
121
+ # a hash with the following structure:
122
+ # * +:successful+ - (Array<Hash>)
123
+ # * +:id+ - (String)
124
+ # * +:failed+ - (Array<Hash>)
125
+ # * +:id+ - (String)
126
+ # * +:sender_fault+ - (Boolean)
127
+ # * +:code+ - (String)
128
+ # * +:message+ - (String)
168
129
  define_client_method :delete_message_batch, 'DeleteMessageBatch'
169
130
 
170
131
  # Calls the DeleteQueue API operation.
171
132
  # @method delete_queue(options = {})
172
- #
173
- # === Options:
174
- #
175
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
176
- # action on.
177
- #
178
- # === Response Structure:
179
- #
180
- # This method returns no response data.
181
- #
133
+ # @param [Hash] options
134
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
135
+ # take action on.
182
136
  # @return [Core::Response]
183
- #
184
137
  define_client_method :delete_queue, 'DeleteQueue'
185
138
 
186
139
  # Calls the GetQueueAttributes API operation.
187
140
  # @method get_queue_attributes(options = {})
188
- #
189
- # === Options:
190
- #
191
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
192
- # action on.
193
- # * +:attribute_names+ - (Array<String>) A list of attributes to retrieve
194
- # information for.
195
- #
196
- # === Response Structure:
197
- #
198
- # * +:attributes+ - (Hash<String,String>)
199
- #
141
+ # @param [Hash] options
142
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
143
+ # take action on.
144
+ # * +:attribute_names+ - (Array<String>) A list of attributes to
145
+ # retrieve information for.
200
146
  # @return [Core::Response]
201
- #
147
+ # The #data method of the response object returns
148
+ # a hash with the following structure:
149
+ # * +:attributes+ - (Hash<String,String>)
202
150
  define_client_method :get_queue_attributes, 'GetQueueAttributes'
203
151
 
204
152
  # Calls the GetQueueUrl API operation.
205
153
  # @method get_queue_url(options = {})
206
- #
207
- # === Options:
208
- #
209
- # * +:queue_name+ - *required* - (String) The name of the queue whose URL
210
- # must be fetched.
211
- # * +:queue_owner_aws_account_id+ - (String) The AWS account number of
212
- # the queue's owner.
213
- #
214
- # === Response Structure:
215
- #
216
- # * +:queue_url+ - (String)
217
- #
154
+ # @param [Hash] options
155
+ # * +:queue_name+ - *required* - (String) The name of the queue whose
156
+ # URL must be fetched.
157
+ # * +:queue_owner_aws_account_id+ - (String) The AWS account number of
158
+ # the queue's owner.
218
159
  # @return [Core::Response]
219
- #
160
+ # The #data method of the response object returns
161
+ # a hash with the following structure:
162
+ # * +:queue_url+ - (String)
220
163
  define_client_method :get_queue_url, 'GetQueueUrl'
221
164
 
222
165
  # Calls the ListQueues API operation.
223
166
  # @method list_queues(options = {})
224
- #
225
- # === Options:
226
- #
227
- # * +:queue_name_prefix+ - (String) A string to use for filtering the
228
- # list results. Only those queues whose name begins with the specified
229
- # string are returned.
230
- #
231
- # === Response Structure:
232
- #
233
- # * +:queue_urls+ - (Array<String>)
234
- #
167
+ # @param [Hash] options
168
+ # * +:queue_name_prefix+ - (String) A string to use for filtering the
169
+ # list results. Only those queues whose name begins with the
170
+ # specified string are returned.
235
171
  # @return [Core::Response]
236
- #
172
+ # The #data method of the response object returns
173
+ # a hash with the following structure:
174
+ # * +:queue_urls+ - (Array<String>)
237
175
  define_client_method :list_queues, 'ListQueues'
238
176
 
239
177
  # Calls the ReceiveMessage API operation.
240
178
  # @method receive_message(options = {})
241
- #
242
- # === Options:
243
- #
244
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
245
- # action on.
246
- # * +:attribute_names+ - (Array<String>) A list of attributes to retrieve
247
- # information for.
248
- # * +:max_number_of_messages+ - (Integer) The maximum number of messages
249
- # to return. Amazon SQS never returns more messages than this value but
250
- # may return fewer. All of the messages are not necessarily returned.
251
- # * +:visibility_timeout+ - (Integer) The duration (in seconds) that the
252
- # received messages are hidden from subsequent retrieve requests after
253
- # being retrieved by a ReceiveMessage request.
254
- #
255
- # === Response Structure:
256
- #
257
- # * +:messages+ - (Array<Hash>)
258
- # * +:message_id+ - (String)
259
- # * +:receipt_handle+ - (String)
260
- # * +:md5_of_body+ - (String)
261
- # * +:body+ - (String)
262
- # * +:attributes+ - (Hash<String,String>)
263
- #
179
+ # @param [Hash] options
180
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
181
+ # take action on.
182
+ # * +:attribute_names+ - (Array<String>) A list of attributes to
183
+ # retrieve information for.
184
+ # * +:max_number_of_messages+ - (Integer) The maximum number of
185
+ # messages to return. Amazon SQS never returns more messages than
186
+ # this value but may return fewer. All of the messages are not
187
+ # necessarily returned.
188
+ # * +:visibility_timeout+ - (Integer) The duration (in seconds) that
189
+ # the received messages are hidden from subsequent retrieve requests
190
+ # after being retrieved by a ReceiveMessage request.
264
191
  # @return [Core::Response]
265
- #
192
+ # The #data method of the response object returns
193
+ # a hash with the following structure:
194
+ # * +:messages+ - (Array<Hash>)
195
+ # * +:message_id+ - (String)
196
+ # * +:receipt_handle+ - (String)
197
+ # * +:md5_of_body+ - (String)
198
+ # * +:body+ - (String)
199
+ # * +:attributes+ - (Hash<String,String>)
266
200
  define_client_method :receive_message, 'ReceiveMessage'
267
201
 
268
202
  # Calls the RemovePermission API operation.
269
203
  # @method remove_permission(options = {})
270
- #
271
- # === Options:
272
- #
273
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
274
- # action on.
275
- # * +:label+ - *required* - (String) The identification of the permission
276
- # to remove. This is the label added with the AddPermission operation.
277
- #
278
- # === Response Structure:
279
- #
280
- # This method returns no response data.
281
- #
204
+ # @param [Hash] options
205
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
206
+ # take action on.
207
+ # * +:label+ - *required* - (String) The identification of the
208
+ # permission to remove. This is the label added with the
209
+ # AddPermission operation.
282
210
  # @return [Core::Response]
283
- #
284
211
  define_client_method :remove_permission, 'RemovePermission'
285
212
 
286
213
  # Calls the SendMessage API operation.
287
214
  # @method send_message(options = {})
288
- #
289
- # === Options:
290
- #
291
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
292
- # action on.
293
- # * +:message_body+ - *required* - (String) The message to send.
294
- # * +:delay_seconds+ - (Integer) The number of seconds the message has to
295
- # be delayed.
296
- #
297
- # === Response Structure:
298
- #
299
- # * +:md5_of_message_body+ - (String)
300
- # * +:message_id+ - (String)
301
- #
215
+ # @param [Hash] options
216
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
217
+ # take action on.
218
+ # * +:message_body+ - *required* - (String) The message to send.
219
+ # * +:delay_seconds+ - (Integer) The number of seconds the message has
220
+ # to be delayed.
302
221
  # @return [Core::Response]
303
- #
222
+ # The #data method of the response object returns
223
+ # a hash with the following structure:
224
+ # * +:md5_of_message_body+ - (String)
225
+ # * +:message_id+ - (String)
304
226
  define_client_method :send_message, 'SendMessage'
305
227
 
306
228
  # Calls the SendMessageBatch API operation.
307
229
  # @method send_message_batch(options = {})
308
- #
309
- # === Options:
310
- #
311
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
312
- # action on.
313
- # * +:entries+ - *required* - (Array<Hash>) A list of
314
- # SendMessageBatchRequestEntrys.
315
- # * +:id+ - *required* - (String) An identifier for the message in this
316
- # batch. This is used to communicate the result. Note that the the
317
- # Ids of a batch request need to be unique within the request.
318
- # * +:message_body+ - *required* - (String) Body of the message.
319
- # * +:delay_seconds+ - (Integer) The number of seconds for which the
320
- # message has to be delayed.
321
- #
322
- # === Response Structure:
323
- #
324
- # * +:successful+ - (Array<Hash>)
325
- # * +:id+ - (String)
326
- # * +:message_id+ - (String)
327
- # * +:md5_of_message_body+ - (String)
328
- # * +:failed+ - (Array<Hash>)
329
- # * +:id+ - (String)
330
- # * +:sender_fault+ - (Boolean)
331
- # * +:code+ - (String)
332
- # * +:message+ - (String)
333
- #
230
+ # @param [Hash] options
231
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
232
+ # take action on.
233
+ # * +:entries+ - *required* - (Array<Hash>) A list of
234
+ # SendMessageBatchRequestEntrys.
235
+ # * +:id+ - *required* - (String) An identifier for the message in
236
+ # this batch. This is used to communicate the result. Note that the
237
+ # the Ids of a batch request need to be unique within the request.
238
+ # * +:message_body+ - *required* - (String) Body of the message.
239
+ # * +:delay_seconds+ - (Integer) The number of seconds for which the
240
+ # message has to be delayed.
334
241
  # @return [Core::Response]
335
- #
242
+ # The #data method of the response object returns
243
+ # a hash with the following structure:
244
+ # * +:successful+ - (Array<Hash>)
245
+ # * +:id+ - (String)
246
+ # * +:message_id+ - (String)
247
+ # * +:md5_of_message_body+ - (String)
248
+ # * +:failed+ - (Array<Hash>)
249
+ # * +:id+ - (String)
250
+ # * +:sender_fault+ - (Boolean)
251
+ # * +:code+ - (String)
252
+ # * +:message+ - (String)
336
253
  define_client_method :send_message_batch, 'SendMessageBatch'
337
254
 
338
255
  # Calls the SetQueueAttributes API operation.
339
256
  # @method set_queue_attributes(options = {})
340
- #
341
- # === Options:
342
- #
343
- # * +:queue_url+ - *required* - (String) The URL of the SQS queue to take
344
- # action on.
345
- # * +:attributes+ - *required* - (Hash<String,String>) A map of
346
- # attributes to set.
347
- #
348
- # === Response Structure:
349
- #
350
- # This method returns no response data.
351
- #
257
+ # @param [Hash] options
258
+ # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
259
+ # take action on.
260
+ # * +:attributes+ - *required* - (Hash<String,String>) A map of
261
+ # attributes to set.
352
262
  # @return [Core::Response]
353
- #
354
263
  define_client_method :set_queue_attributes, 'SetQueueAttributes'
355
264
 
356
265
  ## end client methods ##