Database Reference
In-Depth Information
// Delete the existing ISBN attribute.
{ "isbn", new AttributeValueUpdate { Action="DELETE"
} }
}
};
var response = dynamodbClient.UpdateItem(request);
Delete item
You can delete an existing item from a particular table by specifying its primary key, as
shown in the following code:
var request = new DeleteItemRequest
{
TableName = "Book",
Key = new Dictionary<string,AttributeValue>() { {
"bookId", new AttributeValue { N = "2001" } } },
};
var response = dynamodbClient.DeleteItem(request);
BatchGetItems
This API allows fetching of up to 100 items from multiple tables at a time. One thing to
note is the request data size should not exceed the maximum limit of 1 MB. It can be used
as shown in the following code:
string tableName = "Book";
var request = new BatchGetItemRequest
{
RequestItems = new Dictionary<string, KeysAndAttributes>()
{
{ tableName,
new KeysAndAttributes
{
Keys = new List<Dictionary<string,
AttributeValue>>()
{
new Dictionary<string, AttributeValue>()
{
{ "bookId", new AttributeValue { N = "2010" } }
Search WWH ::




Custom Search