aws-sdk 1.2.6 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/lib/aws.rb +2 -0
  2. data/lib/aws/api_config/DynamoDB-2011-12-05.yml +721 -0
  3. data/lib/aws/core.rb +10 -1
  4. data/lib/aws/core/client.rb +17 -12
  5. data/lib/aws/core/configuration.rb +13 -3
  6. data/lib/aws/core/configured_json_client_methods.rb +71 -0
  7. data/lib/aws/core/lazy_error_classes.rb +7 -2
  8. data/lib/aws/core/option_grammar.rb +67 -13
  9. data/lib/aws/core/resource.rb +9 -1
  10. data/lib/aws/core/session_signer.rb +95 -0
  11. data/lib/aws/dynamo_db.rb +169 -0
  12. data/lib/aws/dynamo_db/attribute_collection.rb +460 -0
  13. data/lib/aws/dynamo_db/batch_get.rb +206 -0
  14. data/lib/aws/dynamo_db/client.rb +119 -0
  15. data/lib/aws/dynamo_db/config.rb +20 -0
  16. data/lib/aws/dynamo_db/errors.rb +57 -0
  17. data/lib/aws/dynamo_db/expectations.rb +40 -0
  18. data/lib/aws/dynamo_db/item.rb +130 -0
  19. data/lib/aws/dynamo_db/item_collection.rb +837 -0
  20. data/lib/aws/{record/optimistic_locking.rb → dynamo_db/item_data.rb} +9 -12
  21. data/lib/aws/{record/attributes/boolean.rb → dynamo_db/keys.rb} +15 -23
  22. data/lib/aws/dynamo_db/primary_key_element.rb +47 -0
  23. data/lib/aws/dynamo_db/request.rb +78 -0
  24. data/lib/aws/{record/attributes/float.rb → dynamo_db/resource.rb} +10 -25
  25. data/lib/aws/dynamo_db/table.rb +418 -0
  26. data/lib/aws/dynamo_db/table_collection.rb +165 -0
  27. data/lib/aws/dynamo_db/types.rb +86 -0
  28. data/lib/aws/ec2/resource_tag_collection.rb +3 -1
  29. data/lib/aws/record.rb +36 -8
  30. data/lib/aws/record/abstract_base.rb +642 -0
  31. data/lib/aws/record/attributes.rb +384 -0
  32. data/lib/aws/record/dirty_tracking.rb +0 -1
  33. data/lib/aws/record/errors.rb +0 -8
  34. data/lib/aws/record/hash_model.rb +163 -0
  35. data/lib/aws/record/hash_model/attributes.rb +182 -0
  36. data/lib/aws/record/hash_model/finder_methods.rb +178 -0
  37. data/lib/aws/record/hash_model/scope.rb +108 -0
  38. data/lib/aws/record/model.rb +429 -0
  39. data/lib/aws/record/model/attributes.rb +377 -0
  40. data/lib/aws/record/model/finder_methods.rb +232 -0
  41. data/lib/aws/record/model/scope.rb +213 -0
  42. data/lib/aws/record/scope.rb +43 -169
  43. data/lib/aws/record/validations.rb +11 -11
  44. data/lib/aws/s3/client.rb +9 -6
  45. data/lib/aws/s3/object_collection.rb +1 -1
  46. data/lib/aws/simple_db/expect_condition_option.rb +1 -1
  47. data/lib/aws/simple_db/item_collection.rb +5 -3
  48. data/lib/aws/sts/client.rb +9 -0
  49. metadata +73 -30
  50. data/lib/aws/record/attribute.rb +0 -94
  51. data/lib/aws/record/attribute_macros.rb +0 -312
  52. data/lib/aws/record/attributes/date.rb +0 -89
  53. data/lib/aws/record/attributes/datetime.rb +0 -86
  54. data/lib/aws/record/attributes/integer.rb +0 -68
  55. data/lib/aws/record/attributes/sortable_float.rb +0 -60
  56. data/lib/aws/record/attributes/sortable_integer.rb +0 -95
  57. data/lib/aws/record/attributes/string.rb +0 -69
  58. data/lib/aws/record/base.rb +0 -828
  59. data/lib/aws/record/finder_methods.rb +0 -230
  60. data/lib/aws/record/scopes.rb +0 -55
data/lib/aws.rb CHANGED
@@ -13,6 +13,7 @@
13
13
 
14
14
  require 'aws/core'
15
15
 
16
+ require 'aws/dynamo_db/config'
16
17
  require 'aws/ec2/config'
17
18
  require 'aws/elb/config'
18
19
  require 'aws/iam/config'
@@ -25,6 +26,7 @@ require 'aws/sts/config'
25
26
 
26
27
  module AWS
27
28
  register_autoloads(self) do
29
+ autoload :DynamoDB, 'dynamo_db'
28
30
  autoload :EC2, 'ec2'
29
31
  autoload :ELB, 'elb'
30
32
  autoload :IAM, 'iam'
@@ -0,0 +1,721 @@
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
+ ---
15
+ :operations:
16
+ GetItem:
17
+ :input:
18
+ TableName:
19
+ - :string
20
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
21
+ - :required
22
+ Key:
23
+ - :structure:
24
+ HashKeyElement:
25
+ - :structure:
26
+ S:
27
+ - :string
28
+ N:
29
+ - :string
30
+ SS:
31
+ - :list:
32
+ - :string
33
+ NS:
34
+ - :list:
35
+ - :string
36
+ - :required
37
+ RangeKeyElement:
38
+ - :structure:
39
+ S:
40
+ - :string
41
+ N:
42
+ - :string
43
+ SS:
44
+ - :list:
45
+ - :string
46
+ NS:
47
+ - :list:
48
+ - :string
49
+ - :required
50
+ AttributesToGet:
51
+ - :list:
52
+ - :string
53
+ ConsistentRead:
54
+ - :boolean
55
+ :output:
56
+ - Item:
57
+ - :map:
58
+ - entry
59
+ - key
60
+ - value
61
+ - entry:
62
+ - value:
63
+ - SS:
64
+ - :list: member
65
+ - NS:
66
+ - :list: member
67
+ - ConsumedCapacityUnits:
68
+ - :float
69
+ BatchGetItem:
70
+ :input:
71
+ RequestItems:
72
+ - :map:
73
+ :key:
74
+ - :string
75
+ :value:
76
+ - :structure:
77
+ Keys:
78
+ - :list:
79
+ - :structure:
80
+ HashKeyElement:
81
+ - :structure:
82
+ S:
83
+ - :string
84
+ N:
85
+ - :string
86
+ SS:
87
+ - :list:
88
+ - :string
89
+ NS:
90
+ - :list:
91
+ - :string
92
+ - :required
93
+ RangeKeyElement:
94
+ - :structure:
95
+ S:
96
+ - :string
97
+ N:
98
+ - :string
99
+ SS:
100
+ - :list:
101
+ - :string
102
+ NS:
103
+ - :list:
104
+ - :string
105
+ - :required
106
+ AttributesToGet:
107
+ - :list:
108
+ - :string
109
+ - :required
110
+ :output:
111
+ - Responses:
112
+ - :map:
113
+ - entry
114
+ - key
115
+ - value
116
+ - entry:
117
+ - value:
118
+ - Items:
119
+ - :list: member
120
+ - member:
121
+ - :map:
122
+ - entry
123
+ - key
124
+ - value
125
+ - entry:
126
+ - value:
127
+ - SS:
128
+ - :list: member
129
+ - NS:
130
+ - :list: member
131
+ - ConsumedCapacityUnits:
132
+ - :float
133
+ - UnprocessedKeys:
134
+ - :map:
135
+ - entry
136
+ - key
137
+ - value
138
+ - entry:
139
+ - value:
140
+ - Keys:
141
+ - :list: member
142
+ - member:
143
+ - HashKeyElement:
144
+ - SS:
145
+ - :list: member
146
+ - NS:
147
+ - :list: member
148
+ - RangeKeyElement:
149
+ - SS:
150
+ - :list: member
151
+ - NS:
152
+ - :list: member
153
+ - AttributesToGet:
154
+ - :list: member
155
+ PutItem:
156
+ :input:
157
+ TableName:
158
+ - :string
159
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
160
+ - :required
161
+ Item:
162
+ - :map:
163
+ :key:
164
+ - :string
165
+ :value:
166
+ - :structure:
167
+ S:
168
+ - :string
169
+ N:
170
+ - :string
171
+ SS:
172
+ - :list:
173
+ - :string
174
+ NS:
175
+ - :list:
176
+ - :string
177
+ - :required
178
+ Expected:
179
+ - :map:
180
+ :key:
181
+ - :string
182
+ :value:
183
+ - :structure:
184
+ Value:
185
+ - :structure:
186
+ S:
187
+ - :string
188
+ N:
189
+ - :string
190
+ SS:
191
+ - :list:
192
+ - :string
193
+ NS:
194
+ - :list:
195
+ - :string
196
+ Exists:
197
+ - :boolean
198
+ ReturnValues:
199
+ - :string
200
+ :output:
201
+ - Attributes:
202
+ - :map:
203
+ - entry
204
+ - key
205
+ - value
206
+ - entry:
207
+ - value:
208
+ - SS:
209
+ - :list: member
210
+ - NS:
211
+ - :list: member
212
+ - ConsumedCapacityUnits:
213
+ - :float
214
+ DeleteItem:
215
+ :input:
216
+ TableName:
217
+ - :string
218
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
219
+ - :required
220
+ Key:
221
+ - :structure:
222
+ HashKeyElement:
223
+ - :structure:
224
+ S:
225
+ - :string
226
+ N:
227
+ - :string
228
+ SS:
229
+ - :list:
230
+ - :string
231
+ NS:
232
+ - :list:
233
+ - :string
234
+ - :required
235
+ RangeKeyElement:
236
+ - :structure:
237
+ S:
238
+ - :string
239
+ N:
240
+ - :string
241
+ SS:
242
+ - :list:
243
+ - :string
244
+ NS:
245
+ - :list:
246
+ - :string
247
+ - :required
248
+ Expected:
249
+ - :map:
250
+ :key:
251
+ - :string
252
+ :value:
253
+ - :structure:
254
+ Value:
255
+ - :structure:
256
+ S:
257
+ - :string
258
+ N:
259
+ - :string
260
+ SS:
261
+ - :list:
262
+ - :string
263
+ NS:
264
+ - :list:
265
+ - :string
266
+ Exists:
267
+ - :boolean
268
+ ReturnValues:
269
+ - :string
270
+ :output:
271
+ - Attributes:
272
+ - :map:
273
+ - entry
274
+ - key
275
+ - value
276
+ - entry:
277
+ - value:
278
+ - SS:
279
+ - :list: member
280
+ - NS:
281
+ - :list: member
282
+ - ConsumedCapacityUnits:
283
+ - :float
284
+ UpdateItem:
285
+ :input:
286
+ TableName:
287
+ - :string
288
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
289
+ - :required
290
+ Key:
291
+ - :structure:
292
+ HashKeyElement:
293
+ - :structure:
294
+ S:
295
+ - :string
296
+ N:
297
+ - :string
298
+ SS:
299
+ - :list:
300
+ - :string
301
+ NS:
302
+ - :list:
303
+ - :string
304
+ - :required
305
+ RangeKeyElement:
306
+ - :structure:
307
+ S:
308
+ - :string
309
+ N:
310
+ - :string
311
+ SS:
312
+ - :list:
313
+ - :string
314
+ NS:
315
+ - :list:
316
+ - :string
317
+ - :required
318
+ AttributeUpdates:
319
+ - :map:
320
+ :key:
321
+ - :string
322
+ :value:
323
+ - :structure:
324
+ Value:
325
+ - :structure:
326
+ S:
327
+ - :string
328
+ N:
329
+ - :string
330
+ SS:
331
+ - :list:
332
+ - :string
333
+ NS:
334
+ - :list:
335
+ - :string
336
+ Action:
337
+ - :string
338
+ - :required
339
+ Expected:
340
+ - :map:
341
+ :key:
342
+ - :string
343
+ :value:
344
+ - :structure:
345
+ Value:
346
+ - :structure:
347
+ S:
348
+ - :string
349
+ N:
350
+ - :string
351
+ SS:
352
+ - :list:
353
+ - :string
354
+ NS:
355
+ - :list:
356
+ - :string
357
+ Exists:
358
+ - :boolean
359
+ ReturnValues:
360
+ - :string
361
+ :output:
362
+ - Attributes:
363
+ - :map:
364
+ - entry
365
+ - key
366
+ - value
367
+ - entry:
368
+ - value:
369
+ - SS:
370
+ - :list: member
371
+ - NS:
372
+ - :list: member
373
+ - ConsumedCapacityUnits:
374
+ - :float
375
+ CreateTable:
376
+ :input:
377
+ TableName:
378
+ - :string
379
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
380
+ - :required
381
+ KeySchema:
382
+ - :structure:
383
+ HashKeyElement:
384
+ - :structure:
385
+ AttributeName:
386
+ - :string
387
+ - :required
388
+ AttributeType:
389
+ - :string
390
+ - :required
391
+ - :required
392
+ RangeKeyElement:
393
+ - :structure:
394
+ AttributeName:
395
+ - :string
396
+ - :required
397
+ AttributeType:
398
+ - :string
399
+ - :required
400
+ - :required
401
+ ProvisionedThroughput:
402
+ - :structure:
403
+ ReadCapacityUnits:
404
+ - :long
405
+ - :required
406
+ WriteCapacityUnits:
407
+ - :long
408
+ - :required
409
+ - :required
410
+ :output:
411
+ - TableDescription:
412
+ - CreationDateTime:
413
+ - :timestamp
414
+ - ProvisionedThroughput:
415
+ - LastIncreaseDateTime:
416
+ - :timestamp
417
+ - LastDecreaseDateTime:
418
+ - :timestamp
419
+ - ReadCapacityUnits:
420
+ - :long
421
+ - WriteCapacityUnits:
422
+ - :long
423
+ - TableSizeBytes:
424
+ - :long
425
+ - ItemCount:
426
+ - :long
427
+ UpdateTable:
428
+ :input:
429
+ TableName:
430
+ - :string
431
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
432
+ - :required
433
+ ProvisionedThroughput:
434
+ - :structure:
435
+ ReadCapacityUnits:
436
+ - :long
437
+ - :required
438
+ WriteCapacityUnits:
439
+ - :long
440
+ - :required
441
+ - :required
442
+ :output:
443
+ - TableDescription:
444
+ - CreationDateTime:
445
+ - :timestamp
446
+ - ProvisionedThroughput:
447
+ - LastIncreaseDateTime:
448
+ - :timestamp
449
+ - LastDecreaseDateTime:
450
+ - :timestamp
451
+ - ReadCapacityUnits:
452
+ - :long
453
+ - WriteCapacityUnits:
454
+ - :long
455
+ - TableSizeBytes:
456
+ - :long
457
+ - ItemCount:
458
+ - :long
459
+ DeleteTable:
460
+ :input:
461
+ TableName:
462
+ - :string
463
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
464
+ - :required
465
+ :output:
466
+ - TableDescription:
467
+ - CreationDateTime:
468
+ - :timestamp
469
+ - ProvisionedThroughput:
470
+ - LastIncreaseDateTime:
471
+ - :timestamp
472
+ - LastDecreaseDateTime:
473
+ - :timestamp
474
+ - ReadCapacityUnits:
475
+ - :long
476
+ - WriteCapacityUnits:
477
+ - :long
478
+ - TableSizeBytes:
479
+ - :long
480
+ - ItemCount:
481
+ - :long
482
+ DescribeTable:
483
+ :input:
484
+ TableName:
485
+ - :string
486
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
487
+ - :required
488
+ :output:
489
+ - Table:
490
+ - CreationDateTime:
491
+ - :timestamp
492
+ - ProvisionedThroughput:
493
+ - LastIncreaseDateTime:
494
+ - :timestamp
495
+ - LastDecreaseDateTime:
496
+ - :timestamp
497
+ - ReadCapacityUnits:
498
+ - :long
499
+ - WriteCapacityUnits:
500
+ - :long
501
+ - TableSizeBytes:
502
+ - :long
503
+ - ItemCount:
504
+ - :long
505
+ ListTables:
506
+ :input:
507
+ ExclusiveStartTableName:
508
+ - :string
509
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
510
+ Limit:
511
+ - :integer
512
+ :output:
513
+ - TableNames:
514
+ - :list: member
515
+ Scan:
516
+ :input:
517
+ TableName:
518
+ - :string
519
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
520
+ - :required
521
+ AttributesToGet:
522
+ - :list:
523
+ - :string
524
+ Limit:
525
+ - :integer
526
+ Count:
527
+ - :boolean
528
+ ScanFilter:
529
+ - :map:
530
+ :key:
531
+ - :string
532
+ :value:
533
+ - :structure:
534
+ AttributeValueList:
535
+ - :list:
536
+ - :structure:
537
+ S:
538
+ - :string
539
+ N:
540
+ - :string
541
+ SS:
542
+ - :list:
543
+ - :string
544
+ NS:
545
+ - :list:
546
+ - :string
547
+ ComparisonOperator:
548
+ - :string
549
+ ExclusiveStartKey:
550
+ - :structure:
551
+ HashKeyElement:
552
+ - :structure:
553
+ S:
554
+ - :string
555
+ N:
556
+ - :string
557
+ SS:
558
+ - :list:
559
+ - :string
560
+ NS:
561
+ - :list:
562
+ - :string
563
+ - :required
564
+ RangeKeyElement:
565
+ - :structure:
566
+ S:
567
+ - :string
568
+ N:
569
+ - :string
570
+ SS:
571
+ - :list:
572
+ - :string
573
+ NS:
574
+ - :list:
575
+ - :string
576
+ :output:
577
+ - Items:
578
+ - :list: member
579
+ - member:
580
+ - :map:
581
+ - entry
582
+ - key
583
+ - value
584
+ - entry:
585
+ - value:
586
+ - SS:
587
+ - :list: member
588
+ - NS:
589
+ - :list: member
590
+ - Count:
591
+ - :integer
592
+ - ScannedCount:
593
+ - :integer
594
+ - LastEvaluatedKey:
595
+ - HashKeyElement:
596
+ - SS:
597
+ - :list: member
598
+ - NS:
599
+ - :list: member
600
+ - RangeKeyElement:
601
+ - SS:
602
+ - :list: member
603
+ - NS:
604
+ - :list: member
605
+ - ConsumedCapacityUnits:
606
+ - :float
607
+ Query:
608
+ :input:
609
+ TableName:
610
+ - :string
611
+ - :pattern: !ruby/regexp /[a-zA-Z0-9_.-]+/
612
+ - :required
613
+ AttributesToGet:
614
+ - :list:
615
+ - :string
616
+ Limit:
617
+ - :integer
618
+ ConsistentRead:
619
+ - :boolean
620
+ Count:
621
+ - :boolean
622
+ HashKeyValue:
623
+ - :structure:
624
+ S:
625
+ - :string
626
+ N:
627
+ - :string
628
+ SS:
629
+ - :list:
630
+ - :string
631
+ NS:
632
+ - :list:
633
+ - :string
634
+ - :required
635
+ RangeKeyCondition:
636
+ - :structure:
637
+ AttributeValueList:
638
+ - :list:
639
+ - :structure:
640
+ S:
641
+ - :string
642
+ N:
643
+ - :string
644
+ SS:
645
+ - :list:
646
+ - :string
647
+ NS:
648
+ - :list:
649
+ - :string
650
+ ComparisonOperator:
651
+ - :string
652
+ ScanIndexForward:
653
+ - :boolean
654
+ ExclusiveStartKey:
655
+ - :structure:
656
+ HashKeyElement:
657
+ - :structure:
658
+ S:
659
+ - :string
660
+ N:
661
+ - :string
662
+ SS:
663
+ - :list:
664
+ - :string
665
+ NS:
666
+ - :list:
667
+ - :string
668
+ - :required
669
+ RangeKeyElement:
670
+ - :structure:
671
+ S:
672
+ - :string
673
+ N:
674
+ - :string
675
+ SS:
676
+ - :list:
677
+ - :string
678
+ NS:
679
+ - :list:
680
+ - :string
681
+ :output:
682
+ - Items:
683
+ - :list: member
684
+ - member:
685
+ - :map:
686
+ - entry
687
+ - key
688
+ - value
689
+ - entry:
690
+ - value:
691
+ - SS:
692
+ - :list: member
693
+ - NS:
694
+ - :list: member
695
+ - Count:
696
+ - :integer
697
+ - LastEvaluatedKey:
698
+ - HashKeyElement:
699
+ - SS:
700
+ - :list: member
701
+ - NS:
702
+ - :list: member
703
+ - RangeKeyElement:
704
+ - SS:
705
+ - :list: member
706
+ - NS:
707
+ - :list: member
708
+ - ConsumedCapacityUnits:
709
+ - :float
710
+ :client_errors:
711
+ ConditionalCheckFailed: []
712
+
713
+ ResourceInUseException: []
714
+
715
+ ResourceNotFoundException: []
716
+
717
+ LimitExceededException: []
718
+
719
+ ProvisionedThroughputExceededException: []
720
+
721
+ :server_errors: {}