get_item: Get Dynamo DB Item

Description Usage Arguments Value References Examples

View source: R/get_item.R

Description

Get an item from a Dynamo DB tables

Usage

1
get_item(table, item, ...)

Arguments

table

A character string specifying the table name, or an object of class “aws_dynamodb_table”.

item

A list of key-value pairs. If the table only has a primary key, this should specify the primary key attribute name and value for the desired item. If a composite primary key is used, then both attribute names and values must be specified.

...

Additional arguments passed to dynamoHTTP.

Value

A list.

References

API Guide: GetItem API Guide: BatchGetItem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
  tab <- create_table(
    table = "Music",
    attributes = list(Artist = "S"),
    primary_key = "Artist"
  )
  
  # put item
  put_item("Music", list(Artist = "No One You Know", SongTitle = "Call Me Today"))

  # get item
  get_item("Music", list(Artist = "No One You Know"))

  # cleanup
  delete_table(tab)

## End(Not run)

cloudyr/aws.dynamodb documentation built on Jan. 14, 2020, 4:56 a.m.