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.

Represents the output of a BatchGetItem operation.

Inheritance Hierarchy


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


public class BatchGetItemResponse : AmazonWebServiceResponse

The BatchGetItemResponse type exposes the following members


Public Method BatchGetItemResponse()


Public Property ConsumedCapacity System.Collections.Generic.List<Amazon.DynamoDBv2.Model.ConsumedCapacity>

Gets and sets the property ConsumedCapacity.

The read capacity units consumed by the entire BatchGetItem operation.

Each element consists of:

  • TableName - The table that consumed the provisioned throughput.

  • CapacityUnits - The total number of capacity units consumed.

Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property Responses System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<System.Collections.Generic.Dictionary<System.String, Amazon.DynamoDBv2.Model.AttributeValue>>>

Gets and sets the property Responses.

A map of table name to a list of items. Each object in Responses consists of a table name, along with a map of attribute data consisting of the data type and attribute value.

Public Property UnprocessedKeys System.Collections.Generic.Dictionary<System.String, Amazon.DynamoDBv2.Model.KeysAndAttributes>

Gets and sets the property UnprocessedKeys.

A map of tables and their respective keys that were not processed with the current response. The UnprocessedKeys value is in the same form as RequestItems, so the value can be provided directly to a subsequent BatchGetItem operation. For more information, see RequestItems in the Request Parameters section.

Each element consists of:

  • Keys - An array of primary key attribute values that define specific items in the table.

  • ProjectionExpression - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result.

  • ConsistentRead - The consistency of a read operation. If set to true, then a strongly consistent read is used; otherwise, an eventually consistent read is used.

If there are no unprocessed keys remaining, the response contains an empty UnprocessedKeys map.



var response = client.BatchGetItem(new BatchGetItemRequest 
    RequestItems = new Dictionary {
        { "tablename1", new KeysAndAttributes {
            Keys = new List> {
                new Dictionary {
                    { "key1", new AttributeValue { N = "NumberAttributeValue" } }
            AttributesToGet = new List {
            ConsistentRead = true,
            ProjectionExpression = "str1",
            ExpressionAttributeNames = new Dictionary {
                { "name1", "attr3" },
                { "name2", "attr4" }
        } },
        { "tablename2", new KeysAndAttributes {
            Keys = new List> {
                new Dictionary {
                    { "key2", new AttributeValue { BOOL = true } }
            AttributesToGet = new List {
            ConsistentRead = false,
            ProjectionExpression = "str2",
            ExpressionAttributeNames = new Dictionary {
                { "name1", "attr3" },
                { "name2", "attr4" }
        } }
    ReturnConsumedCapacity = "NONE"

Dictionary>> responses = response.Responses;
List consumedCapacity = response.ConsumedCapacity;


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

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