aws-sdk 1.9.5 → 1.10.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 (49) hide show
  1. data/lib/aws/api_config/DynamoDB-2012-08-10.yml +4 -0
  2. data/lib/aws/api_config/EC2-2013-02-01.yml +1 -1
  3. data/lib/aws/api_config/ElasticTranscoder-2012-09-25.yml +948 -19
  4. data/lib/aws/api_config/OpsWorks-2013-02-18.yml +83 -2
  5. data/lib/aws/auto_scaling/client.rb +15 -0
  6. data/lib/aws/cloud_formation/client.rb +11 -0
  7. data/lib/aws/cloud_front/client.rb +58 -40
  8. data/lib/aws/cloud_search/client.rb +20 -0
  9. data/lib/aws/cloud_watch/client.rb +5 -0
  10. data/lib/aws/core.rb +5 -4
  11. data/lib/aws/core/configuration.rb +3 -1
  12. data/lib/aws/core/policy.rb +27 -1
  13. data/lib/aws/data_pipeline/client.rb +12 -0
  14. data/lib/aws/direct_connect/client.rb +11 -0
  15. data/lib/aws/dynamo_db/client.rb +17 -0
  16. data/lib/aws/dynamo_db/client_v2.rb +905 -417
  17. data/lib/aws/ec2.rb +1 -1
  18. data/lib/aws/ec2/client.rb +88 -0
  19. data/lib/aws/ec2/instance.rb +3 -1
  20. data/lib/aws/ec2/security_group.rb +1 -1
  21. data/lib/aws/elastic_beanstalk/client.rb +21 -0
  22. data/lib/aws/elastic_transcoder/client.rb +681 -114
  23. data/lib/aws/elasticache/client.rb +23 -0
  24. data/lib/aws/elb/client.rb +13 -0
  25. data/lib/aws/emr/client.rb +3 -0
  26. data/lib/aws/glacier/client.rb +7 -0
  27. data/lib/aws/iam/client.rb +35 -0
  28. data/lib/aws/import_export/client.rb +5 -0
  29. data/lib/aws/ops_works/client.rb +718 -238
  30. data/lib/aws/rds/client.rb +46 -0
  31. data/lib/aws/redshift/client.rb +30 -0
  32. data/lib/aws/route_53/client.rb +10 -0
  33. data/lib/aws/s3.rb +1 -1
  34. data/lib/aws/s3/client.rb +42 -27
  35. data/lib/aws/s3/client/xml.rb +10 -0
  36. data/lib/aws/s3/multipart_upload.rb +43 -16
  37. data/lib/aws/s3/s3_object.rb +61 -26
  38. data/lib/aws/s3/uploaded_part.rb +3 -1
  39. data/lib/aws/s3/uploaded_part_collection.rb +1 -1
  40. data/lib/aws/simple_db/client.rb +10 -0
  41. data/lib/aws/simple_email_service/client.rb +11 -0
  42. data/lib/aws/simple_workflow/client.rb +18 -0
  43. data/lib/aws/sns/client.rb +9 -0
  44. data/lib/aws/sqs/client.rb +9 -0
  45. data/lib/aws/storage_gateway/client.rb +72 -37
  46. data/lib/aws/sts/client.rb +3 -0
  47. data/lib/aws/version.rb +1 -1
  48. metadata +17 -9
  49. checksums.yaml +0 -7
@@ -29,6 +29,7 @@ module AWS
29
29
  # @return [Core::Response]
30
30
  # The #data method of the response object returns
31
31
  # a hash with the following structure:
32
+ #
32
33
  # * `:domain_status` - (Hash)
33
34
  # * `:domain_id` - (String)
34
35
  # * `:domain_name` - (String)
@@ -125,6 +126,7 @@ module AWS
125
126
  # @return [Core::Response]
126
127
  # The #data method of the response object returns
127
128
  # a hash with the following structure:
129
+ #
128
130
  # * `:index_field` - (Hash)
129
131
  # * `:options` - (Hash)
130
132
  # * `:index_field_name` - (String)
@@ -204,6 +206,7 @@ module AWS
204
206
  # @return [Core::Response]
205
207
  # The #data method of the response object returns
206
208
  # a hash with the following structure:
209
+ #
207
210
  # * `:rank_expression` - (Hash)
208
211
  # * `:options` - (Hash)
209
212
  # * `:rank_name` - (String)
@@ -221,6 +224,7 @@ module AWS
221
224
  # @return [Core::Response]
222
225
  # The #data method of the response object returns
223
226
  # a hash with the following structure:
227
+ #
224
228
  # * `:domain_status` - (Hash)
225
229
  # * `:domain_id` - (String)
226
230
  # * `:domain_name` - (String)
@@ -247,6 +251,7 @@ module AWS
247
251
  # @return [Core::Response]
248
252
  # The #data method of the response object returns
249
253
  # a hash with the following structure:
254
+ #
250
255
  # * `:index_field` - (Hash)
251
256
  # * `:options` - (Hash)
252
257
  # * `:index_field_name` - (String)
@@ -291,6 +296,7 @@ module AWS
291
296
  # @return [Core::Response]
292
297
  # The #data method of the response object returns
293
298
  # a hash with the following structure:
299
+ #
294
300
  # * `:rank_expression` - (Hash)
295
301
  # * `:options` - (Hash)
296
302
  # * `:rank_name` - (String)
@@ -308,6 +314,7 @@ module AWS
308
314
  # @return [Core::Response]
309
315
  # The #data method of the response object returns
310
316
  # a hash with the following structure:
317
+ #
311
318
  # * `:default_search_field` - (Hash)
312
319
  # * `:options` - (String)
313
320
  # * `:status` - (Hash)
@@ -324,6 +331,7 @@ module AWS
324
331
  # @return [Core::Response]
325
332
  # The #data method of the response object returns
326
333
  # a hash with the following structure:
334
+ #
327
335
  # * `:domain_status_list` - (Array<Hash>)
328
336
  # * `:domain_id` - (String)
329
337
  # * `:domain_name` - (String)
@@ -351,6 +359,7 @@ module AWS
351
359
  # @return [Core::Response]
352
360
  # The #data method of the response object returns
353
361
  # a hash with the following structure:
362
+ #
354
363
  # * `:index_fields` - (Array<Hash>)
355
364
  # * `:options` - (Hash)
356
365
  # * `:index_field_name` - (String)
@@ -395,6 +404,7 @@ module AWS
395
404
  # @return [Core::Response]
396
405
  # The #data method of the response object returns
397
406
  # a hash with the following structure:
407
+ #
398
408
  # * `:rank_expressions` - (Array<Hash>)
399
409
  # * `:options` - (Hash)
400
410
  # * `:rank_name` - (String)
@@ -412,6 +422,7 @@ module AWS
412
422
  # @return [Core::Response]
413
423
  # The #data method of the response object returns
414
424
  # a hash with the following structure:
425
+ #
415
426
  # * `:access_policies` - (Hash)
416
427
  # * `:options` - (String)
417
428
  # * `:status` - (Hash)
@@ -427,6 +438,7 @@ module AWS
427
438
  # @return [Core::Response]
428
439
  # The #data method of the response object returns
429
440
  # a hash with the following structure:
441
+ #
430
442
  # * `:stems` - (Hash)
431
443
  # * `:options` - (String)
432
444
  # * `:status` - (Hash)
@@ -442,6 +454,7 @@ module AWS
442
454
  # @return [Core::Response]
443
455
  # The #data method of the response object returns
444
456
  # a hash with the following structure:
457
+ #
445
458
  # * `:stopwords` - (Hash)
446
459
  # * `:options` - (String)
447
460
  # * `:status` - (Hash)
@@ -457,6 +470,7 @@ module AWS
457
470
  # @return [Core::Response]
458
471
  # The #data method of the response object returns
459
472
  # a hash with the following structure:
473
+ #
460
474
  # * `:synonyms` - (Hash)
461
475
  # * `:options` - (String)
462
476
  # * `:status` - (Hash)
@@ -472,6 +486,7 @@ module AWS
472
486
  # @return [Core::Response]
473
487
  # The #data method of the response object returns
474
488
  # a hash with the following structure:
489
+ #
475
490
  # * `:field_names` - (Array<String>)
476
491
 
477
492
  # @!method update_default_search_field(options = {})
@@ -484,6 +499,7 @@ module AWS
484
499
  # @return [Core::Response]
485
500
  # The #data method of the response object returns
486
501
  # a hash with the following structure:
502
+ #
487
503
  # * `:default_search_field` - (Hash)
488
504
  # * `:options` - (String)
489
505
  # * `:status` - (Hash)
@@ -500,6 +516,7 @@ module AWS
500
516
  # @return [Core::Response]
501
517
  # The #data method of the response object returns
502
518
  # a hash with the following structure:
519
+ #
503
520
  # * `:access_policies` - (Hash)
504
521
  # * `:options` - (String)
505
522
  # * `:status` - (Hash)
@@ -516,6 +533,7 @@ module AWS
516
533
  # @return [Core::Response]
517
534
  # The #data method of the response object returns
518
535
  # a hash with the following structure:
536
+ #
519
537
  # * `:stems` - (Hash)
520
538
  # * `:options` - (String)
521
539
  # * `:status` - (Hash)
@@ -532,6 +550,7 @@ module AWS
532
550
  # @return [Core::Response]
533
551
  # The #data method of the response object returns
534
552
  # a hash with the following structure:
553
+ #
535
554
  # * `:stopwords` - (Hash)
536
555
  # * `:options` - (String)
537
556
  # * `:status` - (Hash)
@@ -548,6 +567,7 @@ module AWS
548
567
  # @return [Core::Response]
549
568
  # The #data method of the response object returns
550
569
  # a hash with the following structure:
570
+ #
551
571
  # * `:synonyms` - (Hash)
552
572
  # * `:options` - (String)
553
573
  # * `:status` - (Hash)
@@ -54,6 +54,7 @@ module AWS
54
54
  # @return [Core::Response]
55
55
  # The #data method of the response object returns
56
56
  # a hash with the following structure:
57
+ #
57
58
  # * `:alarm_history_items` - (Array<Hash>)
58
59
  # * `:alarm_name` - (String)
59
60
  # * `:timestamp` - (Time)
@@ -82,6 +83,7 @@ module AWS
82
83
  # @return [Core::Response]
83
84
  # The #data method of the response object returns
84
85
  # a hash with the following structure:
86
+ #
85
87
  # * `:metric_alarms` - (Array<Hash>)
86
88
  # * `:alarm_name` - (String)
87
89
  # * `:alarm_arn` - (String)
@@ -158,6 +160,7 @@ module AWS
158
160
  # @return [Core::Response]
159
161
  # The #data method of the response object returns
160
162
  # a hash with the following structure:
163
+ #
161
164
  # * `:metric_alarms` - (Array<Hash>)
162
165
  # * `:alarm_name` - (String)
163
166
  # * `:alarm_arn` - (String)
@@ -255,6 +258,7 @@ module AWS
255
258
  # @return [Core::Response]
256
259
  # The #data method of the response object returns
257
260
  # a hash with the following structure:
261
+ #
258
262
  # * `:label` - (String)
259
263
  # * `:datapoints` - (Array<Hash>)
260
264
  # * `:timestamp` - (Time)
@@ -281,6 +285,7 @@ module AWS
281
285
  # @return [Core::Response]
282
286
  # The #data method of the response object returns
283
287
  # a hash with the following structure:
288
+ #
284
289
  # * `:metrics` - (Array<Hash>)
285
290
  # * `:namespace` - (String)
286
291
  # * `:metric_name` - (String)
data/lib/aws/core.rb CHANGED
@@ -128,10 +128,6 @@ module AWS
128
128
  # @api private
129
129
  ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
130
130
 
131
- SERVICES.each_pair do |klass,service|
132
- autoload(klass, "aws/#{service[:ruby_name]}")
133
- end
134
-
135
131
  autoload :Errors, 'aws/errors'
136
132
  autoload :Record, 'aws/record'
137
133
 
@@ -738,6 +734,11 @@ module AWS
738
734
  end
739
735
  end
740
736
  end
737
+ end
741
738
 
739
+ SERVICES.each_pair do |klass,service|
740
+ autoload(klass, "aws/#{service[:ruby_name]}")
741
+ require "aws/#{service[:ruby_name]}/config"
742
742
  end
743
+
743
744
  end
@@ -447,7 +447,9 @@ module AWS
447
447
 
448
448
  add_option :session_token
449
449
 
450
- add_option :region, 'us-east-1'
450
+ add_option :region do |cfg,region|
451
+ region || ENV['AWS_REGION'] || ENV['AMAZON_REGION'] || 'us-east-1'
452
+ end
451
453
 
452
454
  add_option_with_needs :credential_provider,
453
455
  [:access_key_id, :secret_access_key, :session_token] do |cfg,static_creds|
@@ -714,6 +714,8 @@ module AWS
714
714
  # @return [Array] Returns an array of conditions for this policy.
715
715
  attr_accessor :conditions
716
716
 
717
+ attr_accessor :excluded_resources
718
+
717
719
  # Constructs a new statement.
718
720
  #
719
721
  # @option opts [String] :sid The statement ID. This is optional; if
@@ -776,11 +778,14 @@ module AWS
776
778
  "Sid" => sid,
777
779
  "Effect" => Inflection.class_name(effect.to_s),
778
780
  "Principal" => principals_hash,
779
- "Resource" => resource_arns,
781
+ "Resource" => (resource_arns if resource_arns),
782
+ "NotResource" => (excluded_resource_arns if excluded_resource_arns),
780
783
  "Condition" => (conditions.to_h if conditions)
781
784
  }
782
785
  stmt.delete("Condition") if !conditions || conditions.to_h.empty?
783
786
  stmt.delete("Principal") unless principals_hash
787
+ stmt.delete("Resource") unless resource_arns
788
+ stmt.delete("NotResource") unless excluded_resource_arns
784
789
  if !translated_actions || translated_actions.empty?
785
790
  stmt["NotAction"] = translated_excluded_actions
786
791
  else
@@ -834,6 +839,11 @@ module AWS
834
839
  coerce_array_option(:resources, value)
835
840
  end
836
841
 
842
+ def parse_not_resource_option(value)
843
+ coerce_array_option(:excluded_resources, value)
844
+ end
845
+ alias_method :parse_excluded_resource_option, :parse_not_resource_option
846
+
837
847
  protected
838
848
  def parse_condition_option(value)
839
849
  self.conditions = ConditionBlock.new(value)
@@ -909,6 +919,22 @@ module AWS
909
919
  resource.to_s
910
920
  end
911
921
 
922
+ protected
923
+ def excluded_resource_arns
924
+ return nil unless excluded_resources
925
+ excluded_resources.map do |excluded_resource|
926
+ case excluded_resource
927
+ when :any then "*"
928
+ else excluded_resource_arn(excluded_resource)
929
+ end
930
+ end
931
+ end
932
+
933
+ protected
934
+ def excluded_resource_arn excluded_resource
935
+ excluded_resource.to_s
936
+ end
937
+
912
938
  end
913
939
 
914
940
  end
@@ -54,6 +54,7 @@ module AWS
54
54
  # @return [Core::Response]
55
55
  # The #data method of the response object returns
56
56
  # a hash with the following structure:
57
+ #
57
58
  # * `:pipeline_id` - (String)
58
59
 
59
60
  # @!method delete_pipeline(options = {})
@@ -81,6 +82,7 @@ module AWS
81
82
  # @return [Core::Response]
82
83
  # The #data method of the response object returns
83
84
  # a hash with the following structure:
85
+ #
84
86
  # * `:pipeline_objects` - (Array<Hash>)
85
87
  # * `:id` - (String)
86
88
  # * `:name` - (String)
@@ -101,6 +103,7 @@ module AWS
101
103
  # @return [Core::Response]
102
104
  # The #data method of the response object returns
103
105
  # a hash with the following structure:
106
+ #
104
107
  # * `:pipeline_description_list` - (Array<Hash>)
105
108
  # * `:pipeline_id` - (String)
106
109
  # * `:name` - (String)
@@ -120,6 +123,7 @@ module AWS
120
123
  # @return [Core::Response]
121
124
  # The #data method of the response object returns
122
125
  # a hash with the following structure:
126
+ #
123
127
  # * `:evaluated_expression` - (String)
124
128
 
125
129
  # @!method get_pipeline_definition(options = {})
@@ -132,6 +136,7 @@ module AWS
132
136
  # @return [Core::Response]
133
137
  # The #data method of the response object returns
134
138
  # a hash with the following structure:
139
+ #
135
140
  # * `:pipeline_objects` - (Array<Hash>)
136
141
  # * `:id` - (String)
137
142
  # * `:name` - (String)
@@ -151,6 +156,7 @@ module AWS
151
156
  # @return [Core::Response]
152
157
  # The #data method of the response object returns
153
158
  # a hash with the following structure:
159
+ #
154
160
  # * `:pipeline_id_list` - (Array<Hash>)
155
161
  # * `:id` - (String)
156
162
  # * `:name` - (String)
@@ -187,6 +193,7 @@ module AWS
187
193
  # @return [Core::Response]
188
194
  # The #data method of the response object returns
189
195
  # a hash with the following structure:
196
+ #
190
197
  # * `:task_object` - (Hash)
191
198
  # * `:task_id` - (String)
192
199
  # * `:pipeline_id` - (String)
@@ -219,6 +226,7 @@ module AWS
219
226
  # @return [Core::Response]
220
227
  # The #data method of the response object returns
221
228
  # a hash with the following structure:
229
+ #
222
230
  # * `:validation_errors` - (Array<Hash>)
223
231
  # * `:id` - (String)
224
232
  # * `:errors` - (Array<String>)
@@ -283,6 +291,7 @@ module AWS
283
291
  # @return [Core::Response]
284
292
  # The #data method of the response object returns
285
293
  # a hash with the following structure:
294
+ #
286
295
  # * `:ids` - (Array<String>)
287
296
  # * `:marker` - (String)
288
297
  # * `:has_more_results` - (Boolean)
@@ -296,6 +305,7 @@ module AWS
296
305
  # @return [Core::Response]
297
306
  # The #data method of the response object returns
298
307
  # a hash with the following structure:
308
+ #
299
309
  # * `:canceled` - (Boolean)
300
310
 
301
311
  # @!method report_task_runner_heartbeat(options = {})
@@ -319,6 +329,7 @@ module AWS
319
329
  # @return [Core::Response]
320
330
  # The #data method of the response object returns
321
331
  # a hash with the following structure:
332
+ #
322
333
  # * `:terminate` - (Boolean)
323
334
 
324
335
  # @!method set_status(options = {})
@@ -381,6 +392,7 @@ module AWS
381
392
  # @return [Core::Response]
382
393
  # The #data method of the response object returns
383
394
  # a hash with the following structure:
395
+ #
384
396
  # * `:validation_errors` - (Array<Hash>)
385
397
  # * `:id` - (String)
386
398
  # * `:errors` - (Array<String>)
@@ -30,6 +30,7 @@ module AWS
30
30
  # @return [Core::Response]
31
31
  # The #data method of the response object returns
32
32
  # a hash with the following structure:
33
+ #
33
34
  # * `:connection_id` - (String)
34
35
  # * `:connection_name` - (String)
35
36
  # * `:connection_state` - (String)
@@ -52,6 +53,7 @@ module AWS
52
53
  # @return [Core::Response]
53
54
  # The #data method of the response object returns
54
55
  # a hash with the following structure:
56
+ #
55
57
  # * `:virtual_interface_id` - (String)
56
58
  # * `:location` - (String)
57
59
  # * `:connection_id` - (String)
@@ -87,6 +89,7 @@ module AWS
87
89
  # @return [Core::Response]
88
90
  # The #data method of the response object returns
89
91
  # a hash with the following structure:
92
+ #
90
93
  # * `:virtual_interface_id` - (String)
91
94
  # * `:location` - (String)
92
95
  # * `:connection_id` - (String)
@@ -110,6 +113,7 @@ module AWS
110
113
  # @return [Core::Response]
111
114
  # The #data method of the response object returns
112
115
  # a hash with the following structure:
116
+ #
113
117
  # * `:connection_id` - (String)
114
118
  # * `:connection_name` - (String)
115
119
  # * `:connection_state` - (String)
@@ -123,6 +127,7 @@ module AWS
123
127
  # @return [Core::Response]
124
128
  # The #data method of the response object returns
125
129
  # a hash with the following structure:
130
+ #
126
131
  # * `:virtual_interface_state` - (String)
127
132
 
128
133
  # @!method describe_connection_detail(options = {})
@@ -132,6 +137,7 @@ module AWS
132
137
  # @return [Core::Response]
133
138
  # The #data method of the response object returns
134
139
  # a hash with the following structure:
140
+ #
135
141
  # * `:connection_id` - (String)
136
142
  # * `:connection_name` - (String)
137
143
  # * `:connection_state` - (String)
@@ -158,6 +164,7 @@ module AWS
158
164
  # @return [Core::Response]
159
165
  # The #data method of the response object returns
160
166
  # a hash with the following structure:
167
+ #
161
168
  # * `:connections` - (Array<Hash>)
162
169
  # * `:connection_id` - (String)
163
170
  # * `:connection_name` - (String)
@@ -172,6 +179,7 @@ module AWS
172
179
  # @return [Core::Response]
173
180
  # The #data method of the response object returns
174
181
  # a hash with the following structure:
182
+ #
175
183
  # * `:offering_id` - (String)
176
184
  # * `:region` - (String)
177
185
  # * `:location` - (String)
@@ -196,6 +204,7 @@ module AWS
196
204
  # @return [Core::Response]
197
205
  # The #data method of the response object returns
198
206
  # a hash with the following structure:
207
+ #
199
208
  # * `:offerings` - (Array<Hash>)
200
209
  # * `:offering_id` - (String)
201
210
  # * `:region` - (String)
@@ -215,6 +224,7 @@ module AWS
215
224
  # @return [Core::Response]
216
225
  # The #data method of the response object returns
217
226
  # a hash with the following structure:
227
+ #
218
228
  # * `:virtual_gateways` - (Array<Hash>)
219
229
  # * `:virtual_gateway_id` - (String)
220
230
  # * `:virtual_gateway_state` - (String)
@@ -227,6 +237,7 @@ module AWS
227
237
  # @return [Core::Response]
228
238
  # The #data method of the response object returns
229
239
  # a hash with the following structure:
240
+ #
230
241
  # * `:virtual_interfaces` - (Array<Hash>)
231
242
  # * `:virtual_interface_id` - (String)
232
243
  # * `:location` - (String)