AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

The Table class is the starting object when using the Document API. It is used to Get documents from the DynamnoDB table and write documents back to the DynamoDB table.

Inheritance Hierarchy

System.Object
  Amazon.DynamoDBv2.DocumentModel.Table

Namespace: Amazon.DynamoDBv2.DocumentModel
Assembly: AWSSDK.DynamoDBv2.dll
Version: 3.x.y.z

Syntax

C#
public class Table

The Table type exposes the following members

Properties

NameTypeDescription
Public Property Attributes System.Collections.Generic.List<Amazon.DynamoDBv2.Model.AttributeDefinition>

List of key attributes on the table.

Public Property GlobalSecondaryIndexes System.Collections.Generic.Dictionary<System.String, Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription>

Global secondary indexes of the table.

Public Property GlobalSecondaryIndexNames System.Collections.Generic.List<System.String>

Names of the global secondary indexes of the table.

Public Property HashKeys System.Collections.Generic.List<System.String>

List of keys on the table marked HASH

Public Property Keys System.Collections.Generic.Dictionary<System.String, Amazon.DynamoDBv2.DocumentModel.KeyDescription>

Keys of the table.

Public Property LocalSecondaryIndexes System.Collections.Generic.Dictionary<System.String, Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription>

Local secondary indexes of the table.

Public Property LocalSecondaryIndexNames System.Collections.Generic.List<System.String>

Names of the local secondary indexes of the table.

Public Property RangeKeys System.Collections.Generic.List<System.String>

List of keys on the table marked RANGE

Public Property TableName System.String

Name of the table.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method Static Method ClearTableCache()

Clears current table cache. Next time a Table is created, its information will be loaded from DynamoDB.

Public Method CreateBatchGet()

Creates a DocumentBatchGet object for the current table, allowing a batch-get operation against DynamoDB.

Public Method CreateBatchWrite()

Creates a DocumentBatchWrite object for the current table, allowing a batch-put/delete operation against DynamoDB.

Public Method DeleteItem(Document, DeleteItemOperationConfig)

Delete a document in DynamoDB, using specified configs.

Public Method DeleteItem(Primitive, DeleteItemOperationConfig)

Delete a document in DynamoDB, identified by hash-key, using the specified configs.

Public Method DeleteItem(Primitive, Primitive, DeleteItemOperationConfig)

Delete a document in DynamoDB, identified by hash-and-range primary key, using the specified configs.

Public Method DeleteItem(IDictionary<String, DynamoDBEntry>, DeleteItemOperationConfig)

Delete a document in DynamoDB, identified by a key, using specified configs.

Public Method DeleteItemAsync(Primitive, Primitive, CancellationToken)

Initiates the asynchronous execution of the DeleteItem operation. Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.DeleteItemOperationConfig)

Public Method DeleteItemAsync(Primitive, Primitive, DeleteItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the DeleteItem operation. Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.DeleteItemOperationConfig)

Public Method DeleteItemAsync(IDictionary<String, DynamoDBEntry>, CancellationToken)

Initiates the asynchronous execution of the DeleteItem operation. Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.DeleteItemOperationConfig)

Public Method DeleteItemAsync(IDictionary<String, DynamoDBEntry>, DeleteItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the DeleteItem operation. Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.DeleteItemOperationConfig)

Public Method DeleteItemAsync(Document, CancellationToken)

Initiates the asynchronous execution of the DeleteItem operation. Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.DeleteItemOperationConfig)

Public Method DeleteItemAsync(Document, DeleteItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the DeleteItem operation. Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.DeleteItemOperationConfig)

Public Method DeleteItemAsync(Primitive, CancellationToken)

Initiates the asynchronous execution of the DeleteItem operation. Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.DeleteItemOperationConfig)

Public Method DeleteItemAsync(Primitive, DeleteItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the DeleteItem operation. Amazon.DynamoDBv2.DocumentModel.Table.DeleteItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.DeleteItemOperationConfig)

Public Method FromAttributeMap(Dictionary<String, AttributeValue>)

Creates a Document from an attribute map.

Public Method GetItem(Primitive, GetItemOperationConfig)

Gets a document from DynamoDB by hash primary key, using specified configs.

Public Method GetItem(Primitive, Primitive, GetItemOperationConfig)

Gets a document from DynamoDB by hash-and-range primary key, using specified configs.

Public Method GetItem(IDictionary<String, DynamoDBEntry>, GetItemOperationConfig)

Gets a document from DynamoDB by key, using specified configs.

Public Method GetItemAsync(Primitive, CancellationToken)

Initiates the asynchronous execution of the GetItem operation. Amazon.DynamoDBv2.DocumentModel.Table.GetItem(Amazon.DynamoDBv2.DocumentModel.Primitive,Amazon.DynamoDBv2.DocumentModel.GetItemOperationConfig)

Public Method GetItemAsync(Primitive, GetItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the GetItem operation. Amazon.DynamoDBv2.DocumentModel.Table.GetItem(Amazon.DynamoDBv2.DocumentModel.Primitive,Amazon.DynamoDBv2.DocumentModel.GetItemOperationConfig)

Public Method GetItemAsync(Primitive, Primitive, CancellationToken)

Initiates the asynchronous execution of the GetItem operation. Amazon.DynamoDBv2.DocumentModel.Table.GetItem(Amazon.DynamoDBv2.DocumentModel.Primitive,Amazon.DynamoDBv2.DocumentModel.GetItemOperationConfig)

Public Method GetItemAsync(Primitive, Primitive, GetItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the GetItem operation. Amazon.DynamoDBv2.DocumentModel.Table.GetItem(Amazon.DynamoDBv2.DocumentModel.Primitive,Amazon.DynamoDBv2.DocumentModel.GetItemOperationConfig)

Public Method GetItemAsync(IDictionary<String, DynamoDBEntry>, CancellationToken)

Initiates the asynchronous execution of the GetItem operation. Amazon.DynamoDBv2.DocumentModel.Table.GetItem(Amazon.DynamoDBv2.DocumentModel.Primitive,Amazon.DynamoDBv2.DocumentModel.GetItemOperationConfig)

Public Method GetItemAsync(IDictionary<String, DynamoDBEntry>, GetItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the GetItem operation. Amazon.DynamoDBv2.DocumentModel.Table.GetItem(Amazon.DynamoDBv2.DocumentModel.Primitive,Amazon.DynamoDBv2.DocumentModel.GetItemOperationConfig)

Public Method Static Method LoadTable(IAmazonDynamoDB, TableConfig)

Creates a Table object with the specified configuration, using the passed-in client to load the table definition. This method will throw an exception if the table does not exist.

Public Method Static Method LoadTable(IAmazonDynamoDB, string)

Creates a Table object with the specified name, using the passed-in client to load the table definition. The returned table will use the conversion specified by AWSConfigs.DynamoDBConfig.ConversionSchema This method will throw an exception if the table does not exist.

Public Method Static Method LoadTable(IAmazonDynamoDB, string, DynamoDBEntryConversion)

Creates a Table object with the specified name, using the passed-in client to load the table definition. This method will throw an exception if the table does not exist.

Public Method PutItem(Document, PutItemOperationConfig)

Puts a document into DynamoDB, using optional configs.

Public Method PutItemAsync(Document, CancellationToken)

Initiates the asynchronous execution of the PutItem operation. Amazon.DynamoDBv2.DocumentModel.Table.PutItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.PutItemOperationConfig)

Public Method PutItemAsync(Document, PutItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the PutItem operation. Amazon.DynamoDBv2.DocumentModel.Table.PutItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.PutItemOperationConfig)

Public Method Query(Primitive, QueryFilter)

Initiates a Search object to Query a DynamoDB table, with the specified hash primary key and filter. No calls are made until the Search object is used.

Public Method Query(Primitive, Expression)

Initiates a Search object to Query a DynamoDB table, with the specified hash primary key and expression. No calls are made until the Search object is used.

Public Method Query(QueryFilter)

Initiates a Search object to Query a DynamoDB table, with the specified filter. No calls are made until the Search object is used.

Public Method Query(QueryOperationConfig)

Initiates a Search object to Query a DynamoDB table, with the specified config. No calls are made until the Search object is used.

Public Method Scan(ScanFilter)

Initiates a Search object to Scan a DynamoDB table, with the specified filter. No calls are made until the Search object is used.

Public Method Scan(Expression)

Initiates a Search object to Scan a DynamoDB table, with the specified expression. No calls are made until the Search object is used.

Public Method Scan(ScanOperationConfig)

Initiates a Search object to Scan a DynamoDB table, with the specified config. No calls are made until the Search object is used.

Public Method ToAttributeMap(Document)

Creates a map of attribute names mapped to AttributeValue objects. Converts .NET types using the conversion specified in this Table.

Public Method ToAttributeUpdateMap(Document, bool)

Creates a map of attribute names mapped to AttributeValueUpdate objects.

Public Method ToExpectedAttributeMap(Document)

Creates a map of attribute names mapped to ExpectedAttributeValue objects.

Public Method TryDeleteItem(Document, DeleteItemOperationConfig)

Delete a document in DynamoDB, using specified configs.

Public Method TryDeleteItem(Primitive, DeleteItemOperationConfig)

Delete a document in DynamoDB, identified by a hash primary key, using specified configs.

Public Method TryDeleteItem(Primitive, Primitive, DeleteItemOperationConfig)

Delete a document in DynamoDB, identified by hash-and-range primary key, using the specified configs.

Public Method TryDeleteItem(IDictionary<String, DynamoDBEntry>, DeleteItemOperationConfig)

Delete a document in DynamoDB, identified by a key, using specified configs.

Public Method Static Method TryLoadTable(IAmazonDynamoDB, string, out Table)

Creates a Table object with the specified name, using the passed-in client to load the table definition. The returned table will use the conversion specified by AWSConfigs.DynamoDBConfig.ConversionSchema This method will return false if the table does not exist.

Public Method Static Method TryLoadTable(IAmazonDynamoDB, string, DynamoDBEntryConversion, out Table)

Creates a Table object with the specified name, using the passed-in client to load the table definition. This method will return false if the table does not exist.

Public Method Static Method TryLoadTable(IAmazonDynamoDB, TableConfig, out Table)

Creates a Table object with the specified configuration, using the passed-in client to load the table definition. This method will return false if the table does not exist.

Public Method TryPutItem(Document, PutItemOperationConfig)

Puts a document into DynamoDB, using optional configs.

Public Method TryUpdateItem(Document, UpdateItemOperationConfig)

Update a document in DynamoDB, using specified config.

Public Method TryUpdateItem(Document, IDictionary<String, DynamoDBEntry>, UpdateItemOperationConfig)

Update a document in DynamoDB, with a key to identify the document, and using the specified config.

Public Method TryUpdateItem(Document, Primitive, UpdateItemOperationConfig)

Update a document in DynamoDB, with a hash primary key to identify the document, and using the specified config.

Public Method TryUpdateItem(Document, Primitive, Primitive, UpdateItemOperationConfig)

Update a document in DynamoDB, with a hash-and-range primary key to identify the document, and using the specified config.

Public Method UpdateItem(Document, UpdateItemOperationConfig)

Update a document in DynamoDB, using specified config.

Public Method UpdateItem(Document, IDictionary<String, DynamoDBEntry>, UpdateItemOperationConfig)

Update a document in DynamoDB, with a key to identify the document, and using the specified config.

Public Method UpdateItem(Document, Primitive, UpdateItemOperationConfig)

Update a document in DynamoDB, with a hash primary key to identify the document, and using the specified config.

Public Method UpdateItem(Document, Primitive, Primitive, UpdateItemOperationConfig)

Update a document in DynamoDB, with a hash-and-range primary key to identify the document, and using the specified config.

Public Method UpdateItemAsync(Document, CancellationToken)

Initiates the asynchronous execution of the UpdateItem operation. Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.UpdateItemOperationConfig)

Public Method UpdateItemAsync(Document, UpdateItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the UpdateItem operation. Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.UpdateItemOperationConfig)

Public Method UpdateItemAsync(Document, IDictionary<String, DynamoDBEntry>, CancellationToken)

Initiates the asynchronous execution of the UpdateItem operation. Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.UpdateItemOperationConfig)

Public Method UpdateItemAsync(Document, IDictionary<String, DynamoDBEntry>, UpdateItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the UpdateItem operation. Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.UpdateItemOperationConfig)

Public Method UpdateItemAsync(Document, Primitive, CancellationToken)

Initiates the asynchronous execution of the UpdateItem operation. Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.UpdateItemOperationConfig)

Public Method UpdateItemAsync(Document, Primitive, UpdateItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the UpdateItem operation. Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.UpdateItemOperationConfig)

Public Method UpdateItemAsync(Document, Primitive, Primitive, CancellationToken)

Initiates the asynchronous execution of the UpdateItem operation. Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.UpdateItemOperationConfig)

Public Method UpdateItemAsync(Document, Primitive, Primitive, UpdateItemOperationConfig, CancellationToken)

Initiates the asynchronous execution of the UpdateItem operation. Amazon.DynamoDBv2.DocumentModel.Table.UpdateItem(Amazon.DynamoDBv2.DocumentModel.Document,Amazon.DynamoDBv2.DocumentModel.UpdateItemOperationConfig)

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Unity:
Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone