/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace DynamoDB { namespace Model { /** *

Represents the input of a BatchGetItem operation.

See * Also:

AWS * API Reference

*/ class BatchGetItemRequest : public DynamoDBRequest { public: AWS_DYNAMODB_API BatchGetItemRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "BatchGetItem"; } AWS_DYNAMODB_API Aws::String SerializePayload() const override; AWS_DYNAMODB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline const Aws::Map& GetRequestItems() const{ return m_requestItems; } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline bool RequestItemsHasBeenSet() const { return m_requestItemsHasBeenSet; } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline void SetRequestItems(const Aws::Map& value) { m_requestItemsHasBeenSet = true; m_requestItems = value; } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline void SetRequestItems(Aws::Map&& value) { m_requestItemsHasBeenSet = true; m_requestItems = std::move(value); } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline BatchGetItemRequest& WithRequestItems(const Aws::Map& value) { SetRequestItems(value); return *this;} /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline BatchGetItemRequest& WithRequestItems(Aws::Map&& value) { SetRequestItems(std::move(value)); return *this;} /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline BatchGetItemRequest& AddRequestItems(const Aws::String& key, const KeysAndAttributes& value) { m_requestItemsHasBeenSet = true; m_requestItems.emplace(key, value); return *this; } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline BatchGetItemRequest& AddRequestItems(Aws::String&& key, const KeysAndAttributes& value) { m_requestItemsHasBeenSet = true; m_requestItems.emplace(std::move(key), value); return *this; } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline BatchGetItemRequest& AddRequestItems(const Aws::String& key, KeysAndAttributes&& value) { m_requestItemsHasBeenSet = true; m_requestItems.emplace(key, std::move(value)); return *this; } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline BatchGetItemRequest& AddRequestItems(Aws::String&& key, KeysAndAttributes&& value) { m_requestItemsHasBeenSet = true; m_requestItems.emplace(std::move(key), std::move(value)); return *this; } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline BatchGetItemRequest& AddRequestItems(const char* key, KeysAndAttributes&& value) { m_requestItemsHasBeenSet = true; m_requestItems.emplace(key, std::move(value)); return *this; } /** *

A map of one or more table names and, for each table, a map that describes * one or more items to retrieve from that table. Each table name can be used only * once per BatchGetItem request.

Each element in the map of * items to retrieve consists of the following:

  • * ConsistentRead - If true, a strongly consistent read * is used; if false (the default), an eventually consistent read is * used.

  • ExpressionAttributeNames - One or more * substitution tokens for attribute names in the ProjectionExpression * parameter. The following are some use cases for using * ExpressionAttributeNames:

    • To access an attribute * whose name conflicts with a DynamoDB reserved word.

    • To create * a placeholder for repeating occurrences of an attribute name in an * expression.

    • To prevent special characters in an attribute name * from being misinterpreted in an expression.

    Use the # * character in an expression to dereference an attribute name. For example, * consider the following attribute name:

    • Percentile *

    The name of this attribute conflicts with a reserved word, * so it cannot be used directly in an expression. (For the complete list of * reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, * you could specify the following for ExpressionAttributeNames:

    *
    • {"#P":"Percentile"}

    You could * then use this substitution in an expression, as in this example:

    • *

      #P = :val

    Tokens that begin with the * : character are expression attribute values, which are * placeholders for the actual value at runtime.

    For more * information about expression attribute names, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • Keys - An array of primary key attribute values that * define specific items in the table. For each primary key, you must provide * all of the key attributes. For example, with a simple primary key, you * only need to provide the partition key value. For a composite key, you must * provide both the partition key value and the sort key value.

  • *
  • ProjectionExpression - A string that identifies one or * more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression * must be separated by commas.

    If no attribute names are specified, then * all attributes are returned. If any of the requested attributes are not found, * they do not appear in the result.

    For more information, see Accessing * Item Attributes in the Amazon DynamoDB Developer Guide.

  • *
  • AttributesToGet - This is a legacy parameter. Use * ProjectionExpression instead. For more information, see AttributesToGet * in the Amazon DynamoDB Developer Guide.

*/ inline BatchGetItemRequest& AddRequestItems(const char* key, const KeysAndAttributes& value) { m_requestItemsHasBeenSet = true; m_requestItems.emplace(key, value); return *this; } inline const ReturnConsumedCapacity& GetReturnConsumedCapacity() const{ return m_returnConsumedCapacity; } inline bool ReturnConsumedCapacityHasBeenSet() const { return m_returnConsumedCapacityHasBeenSet; } inline void SetReturnConsumedCapacity(const ReturnConsumedCapacity& value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = value; } inline void SetReturnConsumedCapacity(ReturnConsumedCapacity&& value) { m_returnConsumedCapacityHasBeenSet = true; m_returnConsumedCapacity = std::move(value); } inline BatchGetItemRequest& WithReturnConsumedCapacity(const ReturnConsumedCapacity& value) { SetReturnConsumedCapacity(value); return *this;} inline BatchGetItemRequest& WithReturnConsumedCapacity(ReturnConsumedCapacity&& value) { SetReturnConsumedCapacity(std::move(value)); return *this;} private: Aws::Map m_requestItems; bool m_requestItemsHasBeenSet = false; ReturnConsumedCapacity m_returnConsumedCapacity; bool m_returnConsumedCapacityHasBeenSet = false; }; } // namespace Model } // namespace DynamoDB } // namespace Aws