aws-sdk-dynamodb 1.0.0.rc7 → 1.0.0.rc8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-dynamodb.rb +1 -1
- data/lib/aws-sdk-dynamodb/client.rb +554 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f76fa20626947bf31de3b9a0b321f4750cd54cd5
|
4
|
+
data.tar.gz: 0d7dda80369be75f3a9d38ac68c5f93cb5d28cec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3d42d64824e97e5f6118b36df0a17a4863a410f27a8df8f23f05e746191a0ceaaadb194cea34a1919c2bf50cb33bf42e8b745b5130bb4e15890b1fc6f481b4
|
7
|
+
data.tar.gz: df857146ebdde05739b7db8bde4b9fdc94ab3bc54a88168820514500ad0ee26bc6e1920ae807cae840b1b400ee128fa8d3210af97c3656804b4a694da02c9ae4
|
data/lib/aws-sdk-dynamodb.rb
CHANGED
@@ -354,6 +354,68 @@ module Aws::DynamoDB
|
|
354
354
|
# * {Types::BatchGetItemOutput#unprocessed_keys #unprocessed_keys} => Hash<String,Types::KeysAndAttributes>
|
355
355
|
# * {Types::BatchGetItemOutput#consumed_capacity #consumed_capacity} => Array<Types::ConsumedCapacity>
|
356
356
|
#
|
357
|
+
#
|
358
|
+
# @example Example: To retrieve multiple items from a table
|
359
|
+
#
|
360
|
+
# # This example reads multiple items from the Music table using a batch of three GetItem requests. Only the AlbumTitle attribute is returned.
|
361
|
+
#
|
362
|
+
# resp = client.batch_get_item({
|
363
|
+
# request_items: {
|
364
|
+
# "Music" => {
|
365
|
+
# keys: [
|
366
|
+
# {
|
367
|
+
# "Artist" => {
|
368
|
+
# s: "No One You Know",
|
369
|
+
# },
|
370
|
+
# "SongTitle" => {
|
371
|
+
# s: "Call Me Today",
|
372
|
+
# },
|
373
|
+
# },
|
374
|
+
# {
|
375
|
+
# "Artist" => {
|
376
|
+
# s: "Acme Band",
|
377
|
+
# },
|
378
|
+
# "SongTitle" => {
|
379
|
+
# s: "Happy Day",
|
380
|
+
# },
|
381
|
+
# },
|
382
|
+
# {
|
383
|
+
# "Artist" => {
|
384
|
+
# s: "No One You Know",
|
385
|
+
# },
|
386
|
+
# "SongTitle" => {
|
387
|
+
# s: "Scared of My Shadow",
|
388
|
+
# },
|
389
|
+
# },
|
390
|
+
# ],
|
391
|
+
# projection_expression: "AlbumTitle",
|
392
|
+
# },
|
393
|
+
# },
|
394
|
+
# })
|
395
|
+
#
|
396
|
+
# resp.to_h outputs the following:
|
397
|
+
# {
|
398
|
+
# responses: {
|
399
|
+
# "Music" => [
|
400
|
+
# {
|
401
|
+
# "AlbumTitle" => {
|
402
|
+
# s: "Somewhat Famous",
|
403
|
+
# },
|
404
|
+
# },
|
405
|
+
# {
|
406
|
+
# "AlbumTitle" => {
|
407
|
+
# s: "Blue Sky Blues",
|
408
|
+
# },
|
409
|
+
# },
|
410
|
+
# {
|
411
|
+
# "AlbumTitle" => {
|
412
|
+
# s: "Louder Than Ever",
|
413
|
+
# },
|
414
|
+
# },
|
415
|
+
# ],
|
416
|
+
# },
|
417
|
+
# }
|
418
|
+
#
|
357
419
|
# @example Request syntax with placeholder values
|
358
420
|
#
|
359
421
|
# resp = client.batch_get_item({
|
@@ -553,6 +615,67 @@ module Aws::DynamoDB
|
|
553
615
|
# * {Types::BatchWriteItemOutput#item_collection_metrics #item_collection_metrics} => Hash<String,Array<Types::ItemCollectionMetrics>>
|
554
616
|
# * {Types::BatchWriteItemOutput#consumed_capacity #consumed_capacity} => Array<Types::ConsumedCapacity>
|
555
617
|
#
|
618
|
+
#
|
619
|
+
# @example Example: To add multiple items to a table
|
620
|
+
#
|
621
|
+
# # This example adds three new items to the Music table using a batch of three PutItem requests.
|
622
|
+
#
|
623
|
+
# resp = client.batch_write_item({
|
624
|
+
# request_items: {
|
625
|
+
# "Music" => [
|
626
|
+
# {
|
627
|
+
# put_request: {
|
628
|
+
# item: {
|
629
|
+
# "AlbumTitle" => {
|
630
|
+
# s: "Somewhat Famous",
|
631
|
+
# },
|
632
|
+
# "Artist" => {
|
633
|
+
# s: "No One You Know",
|
634
|
+
# },
|
635
|
+
# "SongTitle" => {
|
636
|
+
# s: "Call Me Today",
|
637
|
+
# },
|
638
|
+
# },
|
639
|
+
# },
|
640
|
+
# },
|
641
|
+
# {
|
642
|
+
# put_request: {
|
643
|
+
# item: {
|
644
|
+
# "AlbumTitle" => {
|
645
|
+
# s: "Songs About Life",
|
646
|
+
# },
|
647
|
+
# "Artist" => {
|
648
|
+
# s: "Acme Band",
|
649
|
+
# },
|
650
|
+
# "SongTitle" => {
|
651
|
+
# s: "Happy Day",
|
652
|
+
# },
|
653
|
+
# },
|
654
|
+
# },
|
655
|
+
# },
|
656
|
+
# {
|
657
|
+
# put_request: {
|
658
|
+
# item: {
|
659
|
+
# "AlbumTitle" => {
|
660
|
+
# s: "Blue Sky Blues",
|
661
|
+
# },
|
662
|
+
# "Artist" => {
|
663
|
+
# s: "No One You Know",
|
664
|
+
# },
|
665
|
+
# "SongTitle" => {
|
666
|
+
# s: "Scared of My Shadow",
|
667
|
+
# },
|
668
|
+
# },
|
669
|
+
# },
|
670
|
+
# },
|
671
|
+
# ],
|
672
|
+
# },
|
673
|
+
# })
|
674
|
+
#
|
675
|
+
# resp.to_h outputs the following:
|
676
|
+
# {
|
677
|
+
# }
|
678
|
+
#
|
556
679
|
# @example Request syntax with placeholder values
|
557
680
|
#
|
558
681
|
# resp = client.batch_write_item({
|
@@ -799,6 +922,74 @@ module Aws::DynamoDB
|
|
799
922
|
#
|
800
923
|
# * {Types::CreateTableOutput#table_description #table_description} => Types::TableDescription
|
801
924
|
#
|
925
|
+
#
|
926
|
+
# @example Example: To create a table
|
927
|
+
#
|
928
|
+
# # This example creates a table named Music.
|
929
|
+
#
|
930
|
+
# resp = client.create_table({
|
931
|
+
# attribute_definitions: [
|
932
|
+
# {
|
933
|
+
# attribute_name: "Artist",
|
934
|
+
# attribute_type: "S",
|
935
|
+
# },
|
936
|
+
# {
|
937
|
+
# attribute_name: "SongTitle",
|
938
|
+
# attribute_type: "S",
|
939
|
+
# },
|
940
|
+
# ],
|
941
|
+
# key_schema: [
|
942
|
+
# {
|
943
|
+
# attribute_name: "Artist",
|
944
|
+
# key_type: "HASH",
|
945
|
+
# },
|
946
|
+
# {
|
947
|
+
# attribute_name: "SongTitle",
|
948
|
+
# key_type: "RANGE",
|
949
|
+
# },
|
950
|
+
# ],
|
951
|
+
# provisioned_throughput: {
|
952
|
+
# read_capacity_units: 5,
|
953
|
+
# write_capacity_units: 5,
|
954
|
+
# },
|
955
|
+
# table_name: "Music",
|
956
|
+
# })
|
957
|
+
#
|
958
|
+
# resp.to_h outputs the following:
|
959
|
+
# {
|
960
|
+
# table_description: {
|
961
|
+
# attribute_definitions: [
|
962
|
+
# {
|
963
|
+
# attribute_name: "Artist",
|
964
|
+
# attribute_type: "S",
|
965
|
+
# },
|
966
|
+
# {
|
967
|
+
# attribute_name: "SongTitle",
|
968
|
+
# attribute_type: "S",
|
969
|
+
# },
|
970
|
+
# ],
|
971
|
+
# creation_date_time: Time.parse("1421866952.062"),
|
972
|
+
# item_count: 0,
|
973
|
+
# key_schema: [
|
974
|
+
# {
|
975
|
+
# attribute_name: "Artist",
|
976
|
+
# key_type: "HASH",
|
977
|
+
# },
|
978
|
+
# {
|
979
|
+
# attribute_name: "SongTitle",
|
980
|
+
# key_type: "RANGE",
|
981
|
+
# },
|
982
|
+
# ],
|
983
|
+
# provisioned_throughput: {
|
984
|
+
# read_capacity_units: 5,
|
985
|
+
# write_capacity_units: 5,
|
986
|
+
# },
|
987
|
+
# table_name: "Music",
|
988
|
+
# table_size_bytes: 0,
|
989
|
+
# table_status: "CREATING",
|
990
|
+
# },
|
991
|
+
# }
|
992
|
+
#
|
802
993
|
# @example Request syntax with placeholder values
|
803
994
|
#
|
804
995
|
# resp = client.create_table({
|
@@ -1112,6 +1303,31 @@ module Aws::DynamoDB
|
|
1112
1303
|
# * {Types::DeleteItemOutput#consumed_capacity #consumed_capacity} => Types::ConsumedCapacity
|
1113
1304
|
# * {Types::DeleteItemOutput#item_collection_metrics #item_collection_metrics} => Types::ItemCollectionMetrics
|
1114
1305
|
#
|
1306
|
+
#
|
1307
|
+
# @example Example: To delete an item
|
1308
|
+
#
|
1309
|
+
# # This example deletes an item from the Music table.
|
1310
|
+
#
|
1311
|
+
# resp = client.delete_item({
|
1312
|
+
# key: {
|
1313
|
+
# "Artist" => {
|
1314
|
+
# s: "No One You Know",
|
1315
|
+
# },
|
1316
|
+
# "SongTitle" => {
|
1317
|
+
# s: "Scared of My Shadow",
|
1318
|
+
# },
|
1319
|
+
# },
|
1320
|
+
# table_name: "Music",
|
1321
|
+
# })
|
1322
|
+
#
|
1323
|
+
# resp.to_h outputs the following:
|
1324
|
+
# {
|
1325
|
+
# consumed_capacity: {
|
1326
|
+
# capacity_units: 1,
|
1327
|
+
# table_name: "Music",
|
1328
|
+
# },
|
1329
|
+
# }
|
1330
|
+
#
|
1115
1331
|
# @example Request syntax with placeholder values
|
1116
1332
|
#
|
1117
1333
|
# resp = client.delete_item({
|
@@ -1195,6 +1411,30 @@ module Aws::DynamoDB
|
|
1195
1411
|
#
|
1196
1412
|
# * {Types::DeleteTableOutput#table_description #table_description} => Types::TableDescription
|
1197
1413
|
#
|
1414
|
+
#
|
1415
|
+
# @example Example: To delete a table
|
1416
|
+
#
|
1417
|
+
# # This example deletes the Music table.
|
1418
|
+
#
|
1419
|
+
# resp = client.delete_table({
|
1420
|
+
# table_name: "Music",
|
1421
|
+
# })
|
1422
|
+
#
|
1423
|
+
# resp.to_h outputs the following:
|
1424
|
+
# {
|
1425
|
+
# table_description: {
|
1426
|
+
# item_count: 0,
|
1427
|
+
# provisioned_throughput: {
|
1428
|
+
# number_of_decreases_today: 1,
|
1429
|
+
# read_capacity_units: 5,
|
1430
|
+
# write_capacity_units: 5,
|
1431
|
+
# },
|
1432
|
+
# table_name: "Music",
|
1433
|
+
# table_size_bytes: 0,
|
1434
|
+
# table_status: "DELETING",
|
1435
|
+
# },
|
1436
|
+
# }
|
1437
|
+
#
|
1198
1438
|
# @example Request syntax with placeholder values
|
1199
1439
|
#
|
1200
1440
|
# resp = client.delete_table({
|
@@ -1339,6 +1579,22 @@ module Aws::DynamoDB
|
|
1339
1579
|
# * {Types::DescribeLimitsOutput#table_max_read_capacity_units #table_max_read_capacity_units} => Integer
|
1340
1580
|
# * {Types::DescribeLimitsOutput#table_max_write_capacity_units #table_max_write_capacity_units} => Integer
|
1341
1581
|
#
|
1582
|
+
#
|
1583
|
+
# @example Example: To determine capacity limits per table and account, in the current AWS region
|
1584
|
+
#
|
1585
|
+
# # The following example returns the maximum read and write capacity units per table, and for the AWS account, in the current AWS region.
|
1586
|
+
#
|
1587
|
+
# resp = client.describe_limits({
|
1588
|
+
# })
|
1589
|
+
#
|
1590
|
+
# resp.to_h outputs the following:
|
1591
|
+
# {
|
1592
|
+
# account_max_read_capacity_units: 20000,
|
1593
|
+
# account_max_write_capacity_units: 20000,
|
1594
|
+
# table_max_read_capacity_units: 10000,
|
1595
|
+
# table_max_write_capacity_units: 10000,
|
1596
|
+
# }
|
1597
|
+
#
|
1342
1598
|
# @example Response structure
|
1343
1599
|
#
|
1344
1600
|
# resp.account_max_read_capacity_units #=> Integer
|
@@ -1375,6 +1631,51 @@ module Aws::DynamoDB
|
|
1375
1631
|
#
|
1376
1632
|
# * {Types::DescribeTableOutput#table #table} => Types::TableDescription
|
1377
1633
|
#
|
1634
|
+
#
|
1635
|
+
# @example Example: To describe a table
|
1636
|
+
#
|
1637
|
+
# # This example describes the Music table.
|
1638
|
+
#
|
1639
|
+
# resp = client.describe_table({
|
1640
|
+
# table_name: "Music",
|
1641
|
+
# })
|
1642
|
+
#
|
1643
|
+
# resp.to_h outputs the following:
|
1644
|
+
# {
|
1645
|
+
# table: {
|
1646
|
+
# attribute_definitions: [
|
1647
|
+
# {
|
1648
|
+
# attribute_name: "Artist",
|
1649
|
+
# attribute_type: "S",
|
1650
|
+
# },
|
1651
|
+
# {
|
1652
|
+
# attribute_name: "SongTitle",
|
1653
|
+
# attribute_type: "S",
|
1654
|
+
# },
|
1655
|
+
# ],
|
1656
|
+
# creation_date_time: Time.parse("1421866952.062"),
|
1657
|
+
# item_count: 0,
|
1658
|
+
# key_schema: [
|
1659
|
+
# {
|
1660
|
+
# attribute_name: "Artist",
|
1661
|
+
# key_type: "HASH",
|
1662
|
+
# },
|
1663
|
+
# {
|
1664
|
+
# attribute_name: "SongTitle",
|
1665
|
+
# key_type: "RANGE",
|
1666
|
+
# },
|
1667
|
+
# ],
|
1668
|
+
# provisioned_throughput: {
|
1669
|
+
# number_of_decreases_today: 1,
|
1670
|
+
# read_capacity_units: 5,
|
1671
|
+
# write_capacity_units: 5,
|
1672
|
+
# },
|
1673
|
+
# table_name: "Music",
|
1674
|
+
# table_size_bytes: 0,
|
1675
|
+
# table_status: "ACTIVE",
|
1676
|
+
# },
|
1677
|
+
# }
|
1678
|
+
#
|
1378
1679
|
# @example Request syntax with placeholder values
|
1379
1680
|
#
|
1380
1681
|
# resp = client.describe_table({
|
@@ -1600,6 +1901,38 @@ module Aws::DynamoDB
|
|
1600
1901
|
# * {Types::GetItemOutput#item #item} => Hash<String,Types::AttributeValue>
|
1601
1902
|
# * {Types::GetItemOutput#consumed_capacity #consumed_capacity} => Types::ConsumedCapacity
|
1602
1903
|
#
|
1904
|
+
#
|
1905
|
+
# @example Example: To read an item from a table
|
1906
|
+
#
|
1907
|
+
# # This example retrieves an item from the Music table. The table has a partition key and a sort key (Artist and SongTitle), so you must specify both of these attributes.
|
1908
|
+
#
|
1909
|
+
# resp = client.get_item({
|
1910
|
+
# key: {
|
1911
|
+
# "Artist" => {
|
1912
|
+
# s: "Acme Band",
|
1913
|
+
# },
|
1914
|
+
# "SongTitle" => {
|
1915
|
+
# s: "Happy Day",
|
1916
|
+
# },
|
1917
|
+
# },
|
1918
|
+
# table_name: "Music",
|
1919
|
+
# })
|
1920
|
+
#
|
1921
|
+
# resp.to_h outputs the following:
|
1922
|
+
# {
|
1923
|
+
# item: {
|
1924
|
+
# "AlbumTitle" => {
|
1925
|
+
# s: "Songs About Life",
|
1926
|
+
# },
|
1927
|
+
# "Artist" => {
|
1928
|
+
# s: "Acme Band",
|
1929
|
+
# },
|
1930
|
+
# "SongTitle" => {
|
1931
|
+
# s: "Happy Day",
|
1932
|
+
# },
|
1933
|
+
# },
|
1934
|
+
# }
|
1935
|
+
#
|
1603
1936
|
# @example Request syntax with placeholder values
|
1604
1937
|
#
|
1605
1938
|
# resp = client.get_item({
|
@@ -1655,6 +1988,24 @@ module Aws::DynamoDB
|
|
1655
1988
|
# * {Types::ListTablesOutput#table_names #table_names} => Array<String>
|
1656
1989
|
# * {Types::ListTablesOutput#last_evaluated_table_name #last_evaluated_table_name} => String
|
1657
1990
|
#
|
1991
|
+
#
|
1992
|
+
# @example Example: To list tables
|
1993
|
+
#
|
1994
|
+
# # This example lists all of the tables associated with the current AWS account and endpoint.
|
1995
|
+
#
|
1996
|
+
# resp = client.list_tables({
|
1997
|
+
# })
|
1998
|
+
#
|
1999
|
+
# resp.to_h outputs the following:
|
2000
|
+
# {
|
2001
|
+
# table_names: [
|
2002
|
+
# "Forum",
|
2003
|
+
# "ProductCatalog",
|
2004
|
+
# "Reply",
|
2005
|
+
# "Thread",
|
2006
|
+
# ],
|
2007
|
+
# }
|
2008
|
+
#
|
1658
2009
|
# @example Request syntax with placeholder values
|
1659
2010
|
#
|
1660
2011
|
# resp = client.list_tables({
|
@@ -1947,6 +2298,35 @@ module Aws::DynamoDB
|
|
1947
2298
|
# * {Types::PutItemOutput#consumed_capacity #consumed_capacity} => Types::ConsumedCapacity
|
1948
2299
|
# * {Types::PutItemOutput#item_collection_metrics #item_collection_metrics} => Types::ItemCollectionMetrics
|
1949
2300
|
#
|
2301
|
+
#
|
2302
|
+
# @example Example: To add an item to a table
|
2303
|
+
#
|
2304
|
+
# # This example adds a new item to the Music table.
|
2305
|
+
#
|
2306
|
+
# resp = client.put_item({
|
2307
|
+
# item: {
|
2308
|
+
# "AlbumTitle" => {
|
2309
|
+
# s: "Somewhat Famous",
|
2310
|
+
# },
|
2311
|
+
# "Artist" => {
|
2312
|
+
# s: "No One You Know",
|
2313
|
+
# },
|
2314
|
+
# "SongTitle" => {
|
2315
|
+
# s: "Call Me Today",
|
2316
|
+
# },
|
2317
|
+
# },
|
2318
|
+
# return_consumed_capacity: "TOTAL",
|
2319
|
+
# table_name: "Music",
|
2320
|
+
# })
|
2321
|
+
#
|
2322
|
+
# resp.to_h outputs the following:
|
2323
|
+
# {
|
2324
|
+
# consumed_capacity: {
|
2325
|
+
# capacity_units: 1,
|
2326
|
+
# table_name: "Music",
|
2327
|
+
# },
|
2328
|
+
# }
|
2329
|
+
#
|
1950
2330
|
# @example Request syntax with placeholder values
|
1951
2331
|
#
|
1952
2332
|
# resp = client.put_item({
|
@@ -2398,6 +2778,37 @@ module Aws::DynamoDB
|
|
2398
2778
|
# * {Types::QueryOutput#last_evaluated_key #last_evaluated_key} => Hash<String,Types::AttributeValue>
|
2399
2779
|
# * {Types::QueryOutput#consumed_capacity #consumed_capacity} => Types::ConsumedCapacity
|
2400
2780
|
#
|
2781
|
+
#
|
2782
|
+
# @example Example: To query an item
|
2783
|
+
#
|
2784
|
+
# # This example queries items in the Music table. The table has a partition key and sort key (Artist and SongTitle), but this query only specifies the partition key value. It returns song titles by the artist named "No One You Know".
|
2785
|
+
#
|
2786
|
+
# resp = client.query({
|
2787
|
+
# expression_attribute_values: {
|
2788
|
+
# ":v1" => {
|
2789
|
+
# s: "No One You Know",
|
2790
|
+
# },
|
2791
|
+
# },
|
2792
|
+
# key_condition_expression: "Artist = :v1",
|
2793
|
+
# projection_expression: "SongTitle",
|
2794
|
+
# table_name: "Music",
|
2795
|
+
# })
|
2796
|
+
#
|
2797
|
+
# resp.to_h outputs the following:
|
2798
|
+
# {
|
2799
|
+
# consumed_capacity: {
|
2800
|
+
# },
|
2801
|
+
# count: 2,
|
2802
|
+
# items: [
|
2803
|
+
# {
|
2804
|
+
# "SongTitle" => {
|
2805
|
+
# s: "Call Me Today",
|
2806
|
+
# },
|
2807
|
+
# },
|
2808
|
+
# ],
|
2809
|
+
# scanned_count: 2,
|
2810
|
+
# }
|
2811
|
+
#
|
2401
2812
|
# @example Request syntax with placeholder values
|
2402
2813
|
#
|
2403
2814
|
# resp = client.query({
|
@@ -2791,6 +3202,52 @@ module Aws::DynamoDB
|
|
2791
3202
|
# * {Types::ScanOutput#last_evaluated_key #last_evaluated_key} => Hash<String,Types::AttributeValue>
|
2792
3203
|
# * {Types::ScanOutput#consumed_capacity #consumed_capacity} => Types::ConsumedCapacity
|
2793
3204
|
#
|
3205
|
+
#
|
3206
|
+
# @example Example: To scan a table
|
3207
|
+
#
|
3208
|
+
# # This example scans the entire Music table, and then narrows the results to songs by the artist "No One You Know". For each item, only the album title and song title are returned.
|
3209
|
+
#
|
3210
|
+
# resp = client.scan({
|
3211
|
+
# expression_attribute_names: {
|
3212
|
+
# "AT" => "AlbumTitle",
|
3213
|
+
# "ST" => "SongTitle",
|
3214
|
+
# },
|
3215
|
+
# expression_attribute_values: {
|
3216
|
+
# ":a" => {
|
3217
|
+
# s: "No One You Know",
|
3218
|
+
# },
|
3219
|
+
# },
|
3220
|
+
# filter_expression: "Artist = :a",
|
3221
|
+
# projection_expression: "#ST, #AT",
|
3222
|
+
# table_name: "Music",
|
3223
|
+
# })
|
3224
|
+
#
|
3225
|
+
# resp.to_h outputs the following:
|
3226
|
+
# {
|
3227
|
+
# consumed_capacity: {
|
3228
|
+
# },
|
3229
|
+
# count: 2,
|
3230
|
+
# items: [
|
3231
|
+
# {
|
3232
|
+
# "AlbumTitle" => {
|
3233
|
+
# s: "Somewhat Famous",
|
3234
|
+
# },
|
3235
|
+
# "SongTitle" => {
|
3236
|
+
# s: "Call Me Today",
|
3237
|
+
# },
|
3238
|
+
# },
|
3239
|
+
# {
|
3240
|
+
# "AlbumTitle" => {
|
3241
|
+
# s: "Blue Sky Blues",
|
3242
|
+
# },
|
3243
|
+
# "SongTitle" => {
|
3244
|
+
# s: "Scared of My Shadow",
|
3245
|
+
# },
|
3246
|
+
# },
|
3247
|
+
# ],
|
3248
|
+
# scanned_count: 3,
|
3249
|
+
# }
|
3250
|
+
#
|
2794
3251
|
# @example Request syntax with placeholder values
|
2795
3252
|
#
|
2796
3253
|
# resp = client.scan({
|
@@ -3220,6 +3677,52 @@ module Aws::DynamoDB
|
|
3220
3677
|
# * {Types::UpdateItemOutput#consumed_capacity #consumed_capacity} => Types::ConsumedCapacity
|
3221
3678
|
# * {Types::UpdateItemOutput#item_collection_metrics #item_collection_metrics} => Types::ItemCollectionMetrics
|
3222
3679
|
#
|
3680
|
+
#
|
3681
|
+
# @example Example: To update an item in a table
|
3682
|
+
#
|
3683
|
+
# # This example updates an item in the Music table. It adds a new attribute (Year) and modifies the AlbumTitle attribute. All of the attributes in the item, as they appear after the update, are returned in the response.
|
3684
|
+
#
|
3685
|
+
# resp = client.update_item({
|
3686
|
+
# expression_attribute_names: {
|
3687
|
+
# "#AT" => "AlbumTitle",
|
3688
|
+
# "#Y" => "Year",
|
3689
|
+
# },
|
3690
|
+
# expression_attribute_values: {
|
3691
|
+
# ":t" => {
|
3692
|
+
# s: "Louder Than Ever",
|
3693
|
+
# },
|
3694
|
+
# ":y" => {
|
3695
|
+
# n: "2015",
|
3696
|
+
# },
|
3697
|
+
# },
|
3698
|
+
# key: {
|
3699
|
+
# "Artist" => {
|
3700
|
+
# s: "Acme Band",
|
3701
|
+
# },
|
3702
|
+
# "SongTitle" => {
|
3703
|
+
# s: "Happy Day",
|
3704
|
+
# },
|
3705
|
+
# },
|
3706
|
+
# return_values: "ALL_NEW",
|
3707
|
+
# table_name: "Music",
|
3708
|
+
# update_expression: "SET #Y = :y, #AT = :t",
|
3709
|
+
# })
|
3710
|
+
#
|
3711
|
+
# resp.to_h outputs the following:
|
3712
|
+
# {
|
3713
|
+
# attributes: {
|
3714
|
+
# "AlbumTitle" => {
|
3715
|
+
# s: "Songs About Life",
|
3716
|
+
# },
|
3717
|
+
# "Artist" => {
|
3718
|
+
# s: "Acme Band",
|
3719
|
+
# },
|
3720
|
+
# "SongTitle" => {
|
3721
|
+
# s: "Happy Day",
|
3722
|
+
# },
|
3723
|
+
# },
|
3724
|
+
# }
|
3725
|
+
#
|
3223
3726
|
# @example Request syntax with placeholder values
|
3224
3727
|
#
|
3225
3728
|
# resp = client.update_item({
|
@@ -3345,6 +3848,56 @@ module Aws::DynamoDB
|
|
3345
3848
|
#
|
3346
3849
|
# * {Types::UpdateTableOutput#table_description #table_description} => Types::TableDescription
|
3347
3850
|
#
|
3851
|
+
#
|
3852
|
+
# @example Example: To modify a table's provisioned throughput
|
3853
|
+
#
|
3854
|
+
# # This example increases the provisioned read and write capacity on the Music table.
|
3855
|
+
#
|
3856
|
+
# resp = client.update_table({
|
3857
|
+
# provisioned_throughput: {
|
3858
|
+
# read_capacity_units: 10,
|
3859
|
+
# write_capacity_units: 10,
|
3860
|
+
# },
|
3861
|
+
# table_name: "MusicCollection",
|
3862
|
+
# })
|
3863
|
+
#
|
3864
|
+
# resp.to_h outputs the following:
|
3865
|
+
# {
|
3866
|
+
# table_description: {
|
3867
|
+
# attribute_definitions: [
|
3868
|
+
# {
|
3869
|
+
# attribute_name: "Artist",
|
3870
|
+
# attribute_type: "S",
|
3871
|
+
# },
|
3872
|
+
# {
|
3873
|
+
# attribute_name: "SongTitle",
|
3874
|
+
# attribute_type: "S",
|
3875
|
+
# },
|
3876
|
+
# ],
|
3877
|
+
# creation_date_time: Time.parse("1421866952.062"),
|
3878
|
+
# item_count: 0,
|
3879
|
+
# key_schema: [
|
3880
|
+
# {
|
3881
|
+
# attribute_name: "Artist",
|
3882
|
+
# key_type: "HASH",
|
3883
|
+
# },
|
3884
|
+
# {
|
3885
|
+
# attribute_name: "SongTitle",
|
3886
|
+
# key_type: "RANGE",
|
3887
|
+
# },
|
3888
|
+
# ],
|
3889
|
+
# provisioned_throughput: {
|
3890
|
+
# last_increase_date_time: Time.parse("1421874759.194"),
|
3891
|
+
# number_of_decreases_today: 1,
|
3892
|
+
# read_capacity_units: 1,
|
3893
|
+
# write_capacity_units: 1,
|
3894
|
+
# },
|
3895
|
+
# table_name: "MusicCollection",
|
3896
|
+
# table_size_bytes: 0,
|
3897
|
+
# table_status: "UPDATING",
|
3898
|
+
# },
|
3899
|
+
# }
|
3900
|
+
#
|
3348
3901
|
# @example Request syntax with placeholder values
|
3349
3902
|
#
|
3350
3903
|
# resp = client.update_table({
|
@@ -3543,7 +4096,7 @@ module Aws::DynamoDB
|
|
3543
4096
|
params: params,
|
3544
4097
|
config: config)
|
3545
4098
|
context[:gem_name] = 'aws-sdk-dynamodb'
|
3546
|
-
context[:gem_version] = '1.0.0.
|
4099
|
+
context[:gem_version] = '1.0.0.rc8'
|
3547
4100
|
Seahorse::Client::Request.new(handlers, context)
|
3548
4101
|
end
|
3549
4102
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-dynamodb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.0.
|
19
|
+
version: 3.0.0.rc14
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.0.
|
26
|
+
version: 3.0.0.rc14
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: aws-sigv4
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|