Skip to content

Commit

Permalink
docs(client-dynamodb): Documentation updates for DynamoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Jul 25, 2023
1 parent 7b0a319 commit 098cca4
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 32 deletions.
8 changes: 4 additions & 4 deletions clients/client-dynamodb/src/commands/BatchWriteItemCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export interface BatchWriteItemCommandOutput extends BatchWriteItemOutput, __Met
* for the API call. For more details on this distinction, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html">Naming Rules and Data Types</a>.</p>
* <note>
* <p>
* <code>BatchWriteItem</code> cannot update items. If you perform a
* <code>BatchWriteItem</code> operation on an existing item, that item's values
* will be overwritten by the operation and it will appear like it was updated. To
* update items, we recommend you use the <code>UpdateItem</code> action.</p>
* <code>BatchWriteItem</code> cannot update items. If you perform a <code>BatchWriteItem</code>
* operation on an existing item, that item's values will be overwritten by the
* operation and it will appear like it was updated. To update items, we recommend you
* use the <code>UpdateItem</code> action.</p>
* </note>
* <p>The individual <code>PutItem</code> and <code>DeleteItem</code> operations specified
* in <code>BatchWriteItem</code> are atomic; however <code>BatchWriteItem</code> as a
Expand Down
3 changes: 2 additions & 1 deletion clients/client-dynamodb/src/commands/PutItemCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export interface PutItemCommandOutput extends PutItemOutput, __MetadataBearer {}
* a new item if one with the specified primary key doesn't exist), or replace an existing
* item if it has certain attribute values. You can return the item's attribute values in
* the same operation, using the <code>ReturnValues</code> parameter.</p>
* <p>When you add an item, the primary key attributes are the only required attributes. </p>
* <p>When you add an item, the primary key attributes are the only required attributes.
* </p>
* <p>Empty String and Binary attribute values are allowed. Attribute values of type String
* and Binary must have a length greater than zero if the attribute is used as a key
* attribute for a table or index. Set type attributes cannot be empty. </p>
Expand Down
50 changes: 33 additions & 17 deletions clients/client-dynamodb/src/commands/ScanCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,45 @@ export interface ScanCommandOutput extends ScanOutput, __MetadataBearer {}
* <p>The <code>Scan</code> operation returns one or more items and item attributes by
* accessing every item in a table or a secondary index. To have DynamoDB return fewer
* items, you can provide a <code>FilterExpression</code> operation.</p>
* <p>If the total number of scanned items exceeds the maximum dataset size limit of 1 MB,
* the scan stops and results are returned to the user as a <code>LastEvaluatedKey</code>
* value to continue the scan in a subsequent operation. The results also include the
* number of items exceeding the limit. A scan can result in no table data meeting the
* filter criteria. </p>
* <p>A single <code>Scan</code> operation reads up to the maximum number of items set (if
* using the <code>Limit</code> parameter) or a maximum of 1 MB of data and then apply any
* filtering to the results using <code>FilterExpression</code>. If
* <code>LastEvaluatedKey</code> is present in the response, you need to paginate the
* result set. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.Pagination">Paginating the
* Results</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p>
* <p>If the total size of scanned items exceeds the maximum dataset size limit of 1 MB,
* the scan completes and results are returned to the user. The <code>LastEvaluatedKey</code>
* value is also returned and the requestor can use the <code>LastEvaluatedKey</code> to continue
* the scan in a subsequent operation. Each scan response also includes number of items that were
* scanned (ScannedCount) as part of the request. If using a <code>FilterExpression</code>, a scan result
* can result in no items meeting the criteria and the <code>Count</code> will result in zero. If
* you did not use a <code>FilterExpression</code> in the scan request, then <code>Count</code> is
* the same as <code>ScannedCount</code>.</p>
* <note>
* <p>
* <code>Count</code> and <code>ScannedCount</code> only return the count of items specific to a
* single scan request and, unless the table is less than 1MB, do not represent the total number
* of items in the table.
* </p>
* </note>
* <p>A single <code>Scan</code> operation first reads up to the maximum number of items set (if
* using the <code>Limit</code> parameter) or a maximum of 1 MB of data and then applies any
* filtering to the results if a <code>FilterExpression</code> is provided. If
* <code>LastEvaluatedKey</code> is present in the response, pagination is required to complete the
* full table scan. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.Pagination">Paginating the
* Results</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
* <p>
* <code>Scan</code> operations proceed sequentially; however, for faster performance on
* a large table or secondary index, applications can request a parallel <code>Scan</code>
* operation by providing the <code>Segment</code> and <code>TotalSegments</code>
* parameters. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan">Parallel
* Scan</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
* <p>
* <code>Scan</code> uses eventually consistent reads when accessing the data in a table;
* therefore, the result set might not include the changes to data in the table immediately
* before the operation began. If you need a consistent copy of the data, as of the time
* that the <code>Scan</code> begins, you can set the <code>ConsistentRead</code> parameter
* to <code>true</code>.</p>
* <p>By default, a <code>Scan</code> uses eventually consistent reads when accessing the items in a table.
* Therefore, the results from an eventually consistent <code>Scan</code> may not include the latest item
* changes at the time the scan iterates through each item in the table. If you require a strongly consistent
* read of each item as the scan iterates through the items in the table, you can set the <code>ConsistentRead</code>
* parameter to true. Strong consistency only relates to the consistency of the read at the item level.</p>
* <note>
* <p>
* DynamoDB does not provide snapshot isolation for a scan operation when the <code>ConsistentRead</code>
* parameter is set to true. Thus, a DynamoDB scan operation does not guarantee that all reads in a scan
* see a consistent snapshot of the table when the scan operation was requested.
* </p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
9 changes: 5 additions & 4 deletions clients/client-dynamodb/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7052,7 +7052,7 @@ export interface ExecuteStatementInput {

/**
* <p>An optional parameter that returns the item attributes for an
* <code>ExecuteStatement</code> operation that failed a condition check.</p>
* <code>ExecuteStatement</code> operation that failed a condition check.</p>
* <p>There is no additional cost associated with requesting a return value aside from the
* small network and processing overhead of receiving a larger response. No read capacity
* units are consumed.</p>
Expand Down Expand Up @@ -8419,8 +8419,8 @@ export interface Update {
/**
* <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the
* <code>Update</code> condition fails. For
* <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE,
* ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
* <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE and
* ALL_OLD.</p>
*/
ReturnValuesOnConditionCheckFailure?: ReturnValuesOnConditionCheckFailure | string;
}
Expand Down Expand Up @@ -8776,7 +8776,8 @@ export interface WriteRequest {
*/
export interface BatchExecuteStatementOutput {
/**
* <p>The response to each PartiQL statement in the batch.</p>
* <p>The response to each PartiQL statement in the batch. The values of the list are
* ordered according to the ordering of the request statements.</p>
*/
Responses?: BatchStatementResponse[];

Expand Down
Loading

0 comments on commit 098cca4

Please sign in to comment.