@aws-sdk/client-dynamodb 3.36.0 → 3.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist-cjs/DynamoDB.js +0 -21
  3. package/dist-cjs/DynamoDBClient.js +0 -26
  4. package/dist-cjs/commands/BatchExecuteStatementCommand.js +0 -26
  5. package/dist-cjs/commands/BatchGetItemCommand.js +0 -69
  6. package/dist-cjs/commands/BatchWriteItemCommand.js +0 -98
  7. package/dist-cjs/commands/CreateBackupCommand.js +0 -53
  8. package/dist-cjs/commands/CreateGlobalTableCommand.js +0 -91
  9. package/dist-cjs/commands/CreateTableCommand.js +0 -36
  10. package/dist-cjs/commands/DeleteBackupCommand.js +0 -25
  11. package/dist-cjs/commands/DeleteItemCommand.js +0 -29
  12. package/dist-cjs/commands/DeleteTableCommand.js +0 -40
  13. package/dist-cjs/commands/DescribeBackupCommand.js +0 -25
  14. package/dist-cjs/commands/DescribeContinuousBackupsCommand.js +0 -34
  15. package/dist-cjs/commands/DescribeContributorInsightsCommand.js +0 -24
  16. package/dist-cjs/commands/DescribeEndpointsCommand.js +0 -24
  17. package/dist-cjs/commands/DescribeExportCommand.js +0 -24
  18. package/dist-cjs/commands/DescribeGlobalTableCommand.js +0 -28
  19. package/dist-cjs/commands/DescribeGlobalTableSettingsCommand.js +0 -27
  20. package/dist-cjs/commands/DescribeKinesisStreamingDestinationCommand.js +0 -24
  21. package/dist-cjs/commands/DescribeLimitsCommand.js +0 -87
  22. package/dist-cjs/commands/DescribeTableCommand.js +0 -30
  23. package/dist-cjs/commands/DescribeTableReplicaAutoScalingCommand.js +0 -27
  24. package/dist-cjs/commands/DescribeTimeToLiveCommand.js +0 -24
  25. package/dist-cjs/commands/DisableKinesisStreamingDestinationCommand.js +0 -25
  26. package/dist-cjs/commands/EnableKinesisStreamingDestinationCommand.js +0 -27
  27. package/dist-cjs/commands/ExecuteStatementCommand.js +0 -26
  28. package/dist-cjs/commands/ExecuteTransactionCommand.js +0 -26
  29. package/dist-cjs/commands/ExportTableToPointInTimeCommand.js +0 -26
  30. package/dist-cjs/commands/GetItemCommand.js +0 -30
  31. package/dist-cjs/commands/ListBackupsCommand.js +0 -30
  32. package/dist-cjs/commands/ListContributorInsightsCommand.js +0 -24
  33. package/dist-cjs/commands/ListExportsCommand.js +0 -24
  34. package/dist-cjs/commands/ListGlobalTablesCommand.js +0 -27
  35. package/dist-cjs/commands/ListTablesCommand.js +0 -26
  36. package/dist-cjs/commands/ListTagsOfResourceCommand.js +0 -27
  37. package/dist-cjs/commands/PutItemCommand.js +0 -91
  38. package/dist-cjs/commands/QueryCommand.js +0 -79
  39. package/dist-cjs/commands/RestoreTableFromBackupCommand.js +0 -48
  40. package/dist-cjs/commands/RestoreTableToPointInTimeCommand.js +0 -79
  41. package/dist-cjs/commands/ScanCommand.js +0 -48
  42. package/dist-cjs/commands/TagResourceCommand.js +0 -30
  43. package/dist-cjs/commands/TransactGetItemsCommand.js +0 -49
  44. package/dist-cjs/commands/TransactWriteItemsCommand.js +0 -97
  45. package/dist-cjs/commands/UntagResourceCommand.js +0 -28
  46. package/dist-cjs/commands/UpdateContinuousBackupsCommand.js +0 -35
  47. package/dist-cjs/commands/UpdateContributorInsightsCommand.js +0 -24
  48. package/dist-cjs/commands/UpdateGlobalTableCommand.js +0 -52
  49. package/dist-cjs/commands/UpdateGlobalTableSettingsCommand.js +0 -24
  50. package/dist-cjs/commands/UpdateItemCommand.js +0 -26
  51. package/dist-cjs/commands/UpdateTableCommand.js +0 -46
  52. package/dist-cjs/commands/UpdateTableReplicaAutoScalingCommand.js +0 -27
  53. package/dist-cjs/commands/UpdateTimeToLiveCommand.js +0 -48
  54. package/dist-cjs/commands/index.js +53 -0
  55. package/dist-cjs/endpoints.js +6 -1
  56. package/dist-cjs/index.js +5 -60
  57. package/dist-cjs/models/models_0.js +0 -660
  58. package/dist-cjs/pagination/ListContributorInsightsPaginator.js +0 -10
  59. package/dist-cjs/pagination/ListExportsPaginator.js +0 -10
  60. package/dist-cjs/pagination/ListTablesPaginator.js +0 -10
  61. package/dist-cjs/pagination/QueryPaginator.js +0 -10
  62. package/dist-cjs/pagination/ScanPaginator.js +0 -10
  63. package/dist-cjs/pagination/index.js +9 -0
  64. package/dist-cjs/protocols/Aws_json1_0.js +0 -5
  65. package/dist-cjs/runtimeConfig.browser.js +1 -5
  66. package/dist-cjs/runtimeConfig.js +1 -5
  67. package/dist-cjs/runtimeConfig.native.js +0 -3
  68. package/dist-cjs/runtimeConfig.shared.js +0 -3
  69. package/dist-cjs/waiters/index.js +5 -0
  70. package/dist-cjs/waiters/waitForTableExists.js +0 -9
  71. package/dist-cjs/waiters/waitForTableNotExists.js +0 -9
  72. package/dist-es/commands/index.js +50 -0
  73. package/dist-es/endpoints.js +6 -1
  74. package/dist-es/index.js +5 -60
  75. package/dist-es/pagination/index.js +6 -0
  76. package/dist-es/waiters/index.js +2 -0
  77. package/dist-types/commands/index.d.ts +50 -0
  78. package/dist-types/index.d.ts +5 -60
  79. package/dist-types/pagination/index.d.ts +6 -0
  80. package/dist-types/ts3.4/DynamoDB.d.ts +51 -965
  81. package/dist-types/ts3.4/DynamoDBClient.d.ts +25 -112
  82. package/dist-types/ts3.4/commands/BatchExecuteStatementCommand.d.ts +2 -22
  83. package/dist-types/ts3.4/commands/BatchGetItemCommand.d.ts +2 -65
  84. package/dist-types/ts3.4/commands/BatchWriteItemCommand.d.ts +2 -94
  85. package/dist-types/ts3.4/commands/CreateBackupCommand.d.ts +2 -49
  86. package/dist-types/ts3.4/commands/CreateGlobalTableCommand.d.ts +2 -87
  87. package/dist-types/ts3.4/commands/CreateTableCommand.d.ts +2 -32
  88. package/dist-types/ts3.4/commands/DeleteBackupCommand.d.ts +2 -21
  89. package/dist-types/ts3.4/commands/DeleteItemCommand.d.ts +2 -25
  90. package/dist-types/ts3.4/commands/DeleteTableCommand.d.ts +2 -36
  91. package/dist-types/ts3.4/commands/DescribeBackupCommand.d.ts +2 -21
  92. package/dist-types/ts3.4/commands/DescribeContinuousBackupsCommand.d.ts +2 -30
  93. package/dist-types/ts3.4/commands/DescribeContributorInsightsCommand.d.ts +2 -20
  94. package/dist-types/ts3.4/commands/DescribeEndpointsCommand.d.ts +2 -20
  95. package/dist-types/ts3.4/commands/DescribeExportCommand.d.ts +2 -20
  96. package/dist-types/ts3.4/commands/DescribeGlobalTableCommand.d.ts +2 -24
  97. package/dist-types/ts3.4/commands/DescribeGlobalTableSettingsCommand.d.ts +2 -23
  98. package/dist-types/ts3.4/commands/DescribeKinesisStreamingDestinationCommand.d.ts +2 -20
  99. package/dist-types/ts3.4/commands/DescribeLimitsCommand.d.ts +2 -83
  100. package/dist-types/ts3.4/commands/DescribeTableCommand.d.ts +2 -26
  101. package/dist-types/ts3.4/commands/DescribeTableReplicaAutoScalingCommand.d.ts +2 -23
  102. package/dist-types/ts3.4/commands/DescribeTimeToLiveCommand.d.ts +2 -20
  103. package/dist-types/ts3.4/commands/DisableKinesisStreamingDestinationCommand.d.ts +2 -21
  104. package/dist-types/ts3.4/commands/EnableKinesisStreamingDestinationCommand.d.ts +2 -23
  105. package/dist-types/ts3.4/commands/ExecuteStatementCommand.d.ts +2 -22
  106. package/dist-types/ts3.4/commands/ExecuteTransactionCommand.d.ts +2 -22
  107. package/dist-types/ts3.4/commands/ExportTableToPointInTimeCommand.d.ts +2 -22
  108. package/dist-types/ts3.4/commands/GetItemCommand.d.ts +2 -26
  109. package/dist-types/ts3.4/commands/ListBackupsCommand.d.ts +2 -26
  110. package/dist-types/ts3.4/commands/ListContributorInsightsCommand.d.ts +2 -20
  111. package/dist-types/ts3.4/commands/ListExportsCommand.d.ts +2 -20
  112. package/dist-types/ts3.4/commands/ListGlobalTablesCommand.d.ts +2 -23
  113. package/dist-types/ts3.4/commands/ListTablesCommand.d.ts +2 -22
  114. package/dist-types/ts3.4/commands/ListTagsOfResourceCommand.d.ts +2 -23
  115. package/dist-types/ts3.4/commands/PutItemCommand.d.ts +2 -87
  116. package/dist-types/ts3.4/commands/QueryCommand.d.ts +2 -75
  117. package/dist-types/ts3.4/commands/RestoreTableFromBackupCommand.d.ts +2 -44
  118. package/dist-types/ts3.4/commands/RestoreTableToPointInTimeCommand.d.ts +2 -75
  119. package/dist-types/ts3.4/commands/ScanCommand.d.ts +2 -44
  120. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -26
  121. package/dist-types/ts3.4/commands/TransactGetItemsCommand.d.ts +2 -45
  122. package/dist-types/ts3.4/commands/TransactWriteItemsCommand.d.ts +2 -93
  123. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -24
  124. package/dist-types/ts3.4/commands/UpdateContinuousBackupsCommand.d.ts +2 -31
  125. package/dist-types/ts3.4/commands/UpdateContributorInsightsCommand.d.ts +2 -20
  126. package/dist-types/ts3.4/commands/UpdateGlobalTableCommand.d.ts +2 -48
  127. package/dist-types/ts3.4/commands/UpdateGlobalTableSettingsCommand.d.ts +2 -20
  128. package/dist-types/ts3.4/commands/UpdateItemCommand.d.ts +2 -22
  129. package/dist-types/ts3.4/commands/UpdateTableCommand.d.ts +2 -42
  130. package/dist-types/ts3.4/commands/UpdateTableReplicaAutoScalingCommand.d.ts +2 -23
  131. package/dist-types/ts3.4/commands/UpdateTimeToLiveCommand.d.ts +2 -44
  132. package/dist-types/ts3.4/commands/index.d.ts +50 -0
  133. package/dist-types/ts3.4/index.d.ts +5 -60
  134. package/dist-types/ts3.4/models/models_0.d.ts +1022 -6658
  135. package/dist-types/ts3.4/pagination/index.d.ts +6 -0
  136. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  137. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  138. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  139. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  140. package/dist-types/ts3.4/waiters/index.d.ts +2 -0
  141. package/dist-types/ts3.4/waiters/waitForTableExists.d.ts +2 -9
  142. package/dist-types/ts3.4/waiters/waitForTableNotExists.d.ts +2 -9
  143. package/dist-types/waiters/index.d.ts +2 -0
  144. package/package.json +34 -34
package/CHANGELOG.md CHANGED
@@ -3,6 +3,48 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-dynamodb
9
+
10
+
11
+
12
+
13
+
14
+ # [3.38.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.37.0...v3.38.0) (2021-10-22)
15
+
16
+
17
+ ### Features
18
+
19
+ * **client-documentation-generator:** rename package ([#2916](https://github.com/aws/aws-sdk-js-v3/issues/2916)) ([1a80bfd](https://github.com/aws/aws-sdk-js-v3/commit/1a80bfd2dfc583001ddb4a21b6432eaaad699aa7))
20
+ * **clients:** export folder from index.ts ([#2912](https://github.com/aws/aws-sdk-js-v3/issues/2912)) ([183b46d](https://github.com/aws/aws-sdk-js-v3/commit/183b46dde7f5613128038bf1c076f3c0b693203b))
21
+
22
+
23
+
24
+
25
+
26
+ # [3.37.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.1...v3.37.0) (2021-10-15)
27
+
28
+
29
+ ### Features
30
+
31
+ * **clients:** update clients as of 10/15/2021 ([#2902](https://github.com/aws/aws-sdk-js-v3/issues/2902)) ([2730b54](https://github.com/aws/aws-sdk-js-v3/commit/2730b5424377944a5a2ad5e1ad7d3ca4135dae1c))
32
+
33
+
34
+
35
+
36
+
37
+ ## [3.36.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.0...v3.36.1) (2021-10-12)
38
+
39
+
40
+ ### Bug Fixes
41
+
42
+ * **clients:** emitDeclarationOnly in tsconfig.types.json ([#2893](https://github.com/aws/aws-sdk-js-v3/issues/2893)) ([6dc3d56](https://github.com/aws/aws-sdk-js-v3/commit/6dc3d56c20809c90cbdc4dd48627eeebc64af99d))
43
+
44
+
45
+
46
+
47
+
6
48
  # [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
7
49
 
8
50
 
@@ -52,27 +52,6 @@ const UpdateTableCommand_1 = require("./commands/UpdateTableCommand");
52
52
  const UpdateTableReplicaAutoScalingCommand_1 = require("./commands/UpdateTableReplicaAutoScalingCommand");
53
53
  const UpdateTimeToLiveCommand_1 = require("./commands/UpdateTimeToLiveCommand");
54
54
  const DynamoDBClient_1 = require("./DynamoDBClient");
55
- /**
56
- * <fullname>Amazon DynamoDB</fullname>
57
- *
58
- *
59
- * <p>Amazon DynamoDB is a fully managed NoSQL database service that provides fast and
60
- * predictable performance with seamless scalability. DynamoDB lets you offload the
61
- * administrative burdens of operating and scaling a distributed database, so that you don't have
62
- * to worry about hardware provisioning, setup and configuration, replication, software patching,
63
- * or cluster scaling.</p>
64
- *
65
- * <p>With DynamoDB, you can create database tables that can store and retrieve any amount of
66
- * data, and serve any level of request traffic. You can scale up or scale down your tables'
67
- * throughput capacity without downtime or performance degradation, and use the AWS Management
68
- * Console to monitor resource utilization and performance metrics.</p>
69
- *
70
- * <p>DynamoDB automatically spreads the data and traffic for your tables over a sufficient
71
- * number of servers to handle your throughput and storage requirements, while maintaining
72
- * consistent and fast performance. All of your data is stored on solid state disks (SSDs) and
73
- * automatically replicated across multiple Availability Zones in an AWS region, providing
74
- * built-in high availability and data durability. </p>
75
- */
76
55
  class DynamoDB extends DynamoDBClient_1.DynamoDBClient {
77
56
  batchExecuteStatement(args, optionsOrCb, cb) {
78
57
  const command = new BatchExecuteStatementCommand_1.BatchExecuteStatementCommand(args);
@@ -12,27 +12,6 @@ const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
12
12
  const smithy_client_1 = require("@aws-sdk/smithy-client");
13
13
  const DescribeEndpointsCommand_1 = require("./commands/DescribeEndpointsCommand");
14
14
  const runtimeConfig_1 = require("./runtimeConfig");
15
- /**
16
- * <fullname>Amazon DynamoDB</fullname>
17
- *
18
- *
19
- * <p>Amazon DynamoDB is a fully managed NoSQL database service that provides fast and
20
- * predictable performance with seamless scalability. DynamoDB lets you offload the
21
- * administrative burdens of operating and scaling a distributed database, so that you don't have
22
- * to worry about hardware provisioning, setup and configuration, replication, software patching,
23
- * or cluster scaling.</p>
24
- *
25
- * <p>With DynamoDB, you can create database tables that can store and retrieve any amount of
26
- * data, and serve any level of request traffic. You can scale up or scale down your tables'
27
- * throughput capacity without downtime or performance degradation, and use the AWS Management
28
- * Console to monitor resource utilization and performance metrics.</p>
29
- *
30
- * <p>DynamoDB automatically spreads the data and traffic for your tables over a sufficient
31
- * number of servers to handle your throughput and storage requirements, while maintaining
32
- * consistent and fast performance. All of your data is stored on solid state disks (SSDs) and
33
- * automatically replicated across multiple Availability Zones in an AWS region, providing
34
- * built-in high availability and data durability. </p>
35
- */
36
15
  class DynamoDBClient extends smithy_client_1.Client {
37
16
  constructor(configuration) {
38
17
  const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);
@@ -54,11 +33,6 @@ class DynamoDBClient extends smithy_client_1.Client {
54
33
  this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config));
55
34
  this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));
56
35
  }
57
- /**
58
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
59
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
60
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
61
- */
62
36
  destroy() {
63
37
  super.destroy();
64
38
  }
@@ -5,37 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
- /**
9
- * <p>
10
- * This operation allows you to perform batch reads and writes on data stored in DynamoDB, using PartiQL.
11
- * </p>
12
- * @example
13
- * Use a bare-bones client and the command you need to make an API call.
14
- * ```javascript
15
- * import { DynamoDBClient, BatchExecuteStatementCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
16
- * // const { DynamoDBClient, BatchExecuteStatementCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
17
- * const client = new DynamoDBClient(config);
18
- * const command = new BatchExecuteStatementCommand(input);
19
- * const response = await client.send(command);
20
- * ```
21
- *
22
- * @see {@link BatchExecuteStatementCommandInput} for command's `input` shape.
23
- * @see {@link BatchExecuteStatementCommandOutput} for command's `response` shape.
24
- * @see {@link DynamoDBClientResolvedConfig | config} for command's `input` shape.
25
- *
26
- */
27
8
  class BatchExecuteStatementCommand extends smithy_client_1.Command {
28
- // Start section: command_properties
29
- // End section: command_properties
30
9
  constructor(input) {
31
- // Start section: command_constructor
32
10
  super();
33
11
  this.input = input;
34
- // End section: command_constructor
35
12
  }
36
- /**
37
- * @internal
38
- */
39
13
  resolveMiddleware(clientStack, configuration, options) {
40
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
41
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,80 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
- /**
9
- * <p>The <code>BatchGetItem</code> operation returns the attributes of one or more items from one or
10
- * more tables. You identify requested items by primary key.</p>
11
- * <p>A single operation can retrieve up to 16 MB of data, which can contain as many as 100
12
- * items. <code>BatchGetItem</code> returns a partial result if the response size limit is
13
- * exceeded, the table's provisioned throughput is exceeded, or an internal processing
14
- * failure occurs. If a partial result is returned, the operation returns a value for
15
- * <code>UnprocessedKeys</code>. You can use this value to retry the operation starting
16
- * with the next item to get.</p>
17
- * <important>
18
- * <p>If you request more than 100 items, <code>BatchGetItem</code> returns a
19
- * <code>ValidationException</code> with the message "Too many items requested for
20
- * the BatchGetItem call."</p>
21
- * </important>
22
- * <p>For example, if you ask to retrieve 100 items, but each individual item is 300 KB in
23
- * size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns
24
- * an appropriate <code>UnprocessedKeys</code> value so you can get the next page of
25
- * results. If desired, your application can include its own logic to assemble the pages of
26
- * results into one dataset.</p>
27
- * <p>If <i>none</i> of the items can be processed due to insufficient
28
- * provisioned throughput on all of the tables in the request, then
29
- * <code>BatchGetItem</code> returns a
30
- * <code>ProvisionedThroughputExceededException</code>. If <i>at least
31
- * one</i> of the items is successfully processed, then
32
- * <code>BatchGetItem</code> completes successfully, while returning the keys of the
33
- * unread items in <code>UnprocessedKeys</code>.</p>
34
- * <important>
35
- * <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those
36
- * items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>.
37
- * If you retry the batch operation immediately, the underlying read or write requests can
38
- * still fail due to throttling on the individual tables. If you delay the batch operation
39
- * using exponential backoff, the individual requests in the batch are much more likely to
40
- * succeed.</p>
41
- * <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations">Batch
42
- * Operations and Error Handling</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
43
- * </important>
44
- * <p>By default, <code>BatchGetItem</code> performs eventually consistent reads on every table in the
45
- * request. If you want strongly consistent reads instead, you can set <code>ConsistentRead</code> to
46
- * <code>true</code> for any or all tables.</p>
47
- * <p>In order to minimize response latency, <code>BatchGetItem</code> retrieves items in parallel.</p>
48
- * <p>When designing your application, keep in mind that DynamoDB does not return items in any
49
- * particular order. To help parse the response by item, include the primary key values for the
50
- * items in your request in the <code>ProjectionExpression</code> parameter.</p>
51
- * <p>If a requested item does not exist, it is not returned in the result. Requests for
52
- * nonexistent items consume the minimum read capacity units according to the type of read.
53
- * For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations">Working with Tables</a> in the <i>Amazon DynamoDB Developer
54
- * Guide</i>.</p>
55
- * @example
56
- * Use a bare-bones client and the command you need to make an API call.
57
- * ```javascript
58
- * import { DynamoDBClient, BatchGetItemCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
59
- * // const { DynamoDBClient, BatchGetItemCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
60
- * const client = new DynamoDBClient(config);
61
- * const command = new BatchGetItemCommand(input);
62
- * const response = await client.send(command);
63
- * ```
64
- *
65
- * @see {@link BatchGetItemCommandInput} for command's `input` shape.
66
- * @see {@link BatchGetItemCommandOutput} for command's `response` shape.
67
- * @see {@link DynamoDBClientResolvedConfig | config} for command's `input` shape.
68
- *
69
- */
70
8
  class BatchGetItemCommand extends smithy_client_1.Command {
71
- // Start section: command_properties
72
- // End section: command_properties
73
9
  constructor(input) {
74
- // Start section: command_constructor
75
10
  super();
76
11
  this.input = input;
77
- // End section: command_constructor
78
12
  }
79
- /**
80
- * @internal
81
- */
82
13
  resolveMiddleware(clientStack, configuration, options) {
83
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
84
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,109 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
- /**
9
- * <p>The <code>BatchWriteItem</code> operation puts or deletes multiple items in one or more
10
- * tables. A single call to <code>BatchWriteItem</code> can write up to 16 MB of data,
11
- * which can comprise as many as 25 put or delete requests. Individual items to be written
12
- * can be as large as 400 KB.</p>
13
- * <note>
14
- * <p>
15
- * <code>BatchWriteItem</code> cannot update items. To update items, use the <code>UpdateItem</code>
16
- * action.</p>
17
- * </note>
18
- * <p>The individual <code>PutItem</code> and <code>DeleteItem</code> operations specified in
19
- * <code>BatchWriteItem</code> are atomic; however <code>BatchWriteItem</code> as a whole is not. If any
20
- * requested operations fail because the table's provisioned throughput is exceeded or an
21
- * internal processing failure occurs, the failed operations are returned in the
22
- * <code>UnprocessedItems</code> response parameter. You can investigate and optionally resend the
23
- * requests. Typically, you would call <code>BatchWriteItem</code> in a loop. Each iteration would
24
- * check for unprocessed items and submit a new <code>BatchWriteItem</code> request with those
25
- * unprocessed items until all items have been processed.</p>
26
- * <p>If <i>none</i> of the items can be processed due to insufficient
27
- * provisioned throughput on all of the tables in the request, then
28
- * <code>BatchWriteItem</code> returns a
29
- * <code>ProvisionedThroughputExceededException</code>.</p>
30
- * <important>
31
- * <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those
32
- * items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>.
33
- * If you retry the batch operation immediately, the underlying read or write requests can
34
- * still fail due to throttling on the individual tables. If you delay the batch operation
35
- * using exponential backoff, the individual requests in the batch are much more likely to
36
- * succeed.</p>
37
- * <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#Programming.Errors.BatchOperations">Batch Operations and Error Handling</a> in the <i>Amazon DynamoDB
38
- * Developer Guide</i>.</p>
39
- * </important>
40
- *
41
- * <p>With <code>BatchWriteItem</code>, you can efficiently write or delete large amounts of
42
- * data, such as from Amazon EMR, or copy data from another database into DynamoDB. In
43
- * order to improve performance with these large-scale operations,
44
- * <code>BatchWriteItem</code> does not behave in the same way as individual
45
- * <code>PutItem</code> and <code>DeleteItem</code> calls would. For example, you
46
- * cannot specify conditions on individual put and delete requests, and
47
- * <code>BatchWriteItem</code> does not return deleted items in the response.</p>
48
- * <p>If you use a programming language that supports concurrency, you can use
49
- * threads to write items in parallel. Your application must include the necessary logic to
50
- * manage the threads. With languages that don't support threading, you must update
51
- * or delete the specified items one at a time. In both situations, <code>BatchWriteItem</code>
52
- * performs the specified put and delete operations in
53
- * parallel, giving you the power of the thread pool approach without having to introduce
54
- * complexity into your application.</p>
55
- * <p>Parallel processing reduces latency, but each specified put and delete request consumes the same number of write capacity units whether it is processed in parallel or not. Delete operations on nonexistent items consume one write capacity unit.</p>
56
- * <p>If one or more of the following is true, DynamoDB rejects the entire batch write operation:</p>
57
- * <ul>
58
- * <li>
59
- * <p>One or more tables specified in the <code>BatchWriteItem</code> request does not exist.</p>
60
- * </li>
61
- * <li>
62
- * <p>Primary key attributes specified on an item in the request do not match those in the corresponding table's primary key schema.</p>
63
- * </li>
64
- * <li>
65
- * <p>You try to perform multiple operations on the same item in the same <code>BatchWriteItem</code>
66
- * request. For example, you cannot put and delete the same item in the same
67
- * <code>BatchWriteItem</code> request. </p>
68
- * </li>
69
- * <li>
70
- * <p>
71
- * Your request contains at least two items with identical hash and range keys (which essentially is two put operations).
72
- * </p>
73
- * </li>
74
- * <li>
75
- * <p>There are more than 25 requests in the batch.</p>
76
- * </li>
77
- * <li>
78
- * <p>Any individual item in a batch exceeds 400 KB.</p>
79
- * </li>
80
- * <li>
81
- * <p>The total request size exceeds 16 MB.</p>
82
- * </li>
83
- * </ul>
84
- * @example
85
- * Use a bare-bones client and the command you need to make an API call.
86
- * ```javascript
87
- * import { DynamoDBClient, BatchWriteItemCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
88
- * // const { DynamoDBClient, BatchWriteItemCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
89
- * const client = new DynamoDBClient(config);
90
- * const command = new BatchWriteItemCommand(input);
91
- * const response = await client.send(command);
92
- * ```
93
- *
94
- * @see {@link BatchWriteItemCommandInput} for command's `input` shape.
95
- * @see {@link BatchWriteItemCommandOutput} for command's `response` shape.
96
- * @see {@link DynamoDBClientResolvedConfig | config} for command's `input` shape.
97
- *
98
- */
99
8
  class BatchWriteItemCommand extends smithy_client_1.Command {
100
- // Start section: command_properties
101
- // End section: command_properties
102
9
  constructor(input) {
103
- // Start section: command_constructor
104
10
  super();
105
11
  this.input = input;
106
- // End section: command_constructor
107
12
  }
108
- /**
109
- * @internal
110
- */
111
13
  resolveMiddleware(clientStack, configuration, options) {
112
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
113
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,64 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
- /**
9
- * <p>Creates a backup for an existing table.</p>
10
- * <p> Each time you create an on-demand backup, the entire table data is backed up. There
11
- * is no limit to the number of on-demand backups that can be taken. </p>
12
- * <p> When you create an on-demand backup, a time marker of the request is cataloged, and
13
- * the backup is created asynchronously, by applying all changes until the time of the
14
- * request to the last full table snapshot. Backup requests are processed instantaneously
15
- * and become available for restore within minutes. </p>
16
- * <p>You can call <code>CreateBackup</code> at a maximum rate of 50 times per second.</p>
17
- * <p>All backups in DynamoDB work without consuming any provisioned throughput on the table.</p>
18
- * <p> If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed
19
- * to contain all data committed to the table up to 14:24:00, and data committed after
20
- * 14:26:00 will not be. The backup might contain data modifications made between 14:24:00
21
- * and 14:26:00. On-demand backup does not support causal consistency. </p>
22
- * <p>
23
- * Along with data, the following are also included on the backups:
24
- * </p>
25
- * <ul>
26
- * <li>
27
- * <p>Global secondary indexes (GSIs)</p>
28
- * </li>
29
- * <li>
30
- * <p>Local secondary indexes (LSIs)</p>
31
- * </li>
32
- * <li>
33
- * <p>Streams</p>
34
- * </li>
35
- * <li>
36
- * <p>Provisioned read and write capacity</p>
37
- * </li>
38
- * </ul>
39
- * @example
40
- * Use a bare-bones client and the command you need to make an API call.
41
- * ```javascript
42
- * import { DynamoDBClient, CreateBackupCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
43
- * // const { DynamoDBClient, CreateBackupCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
44
- * const client = new DynamoDBClient(config);
45
- * const command = new CreateBackupCommand(input);
46
- * const response = await client.send(command);
47
- * ```
48
- *
49
- * @see {@link CreateBackupCommandInput} for command's `input` shape.
50
- * @see {@link CreateBackupCommandOutput} for command's `response` shape.
51
- * @see {@link DynamoDBClientResolvedConfig | config} for command's `input` shape.
52
- *
53
- */
54
8
  class CreateBackupCommand extends smithy_client_1.Command {
55
- // Start section: command_properties
56
- // End section: command_properties
57
9
  constructor(input) {
58
- // Start section: command_constructor
59
10
  super();
60
11
  this.input = input;
61
- // End section: command_constructor
62
12
  }
63
- /**
64
- * @internal
65
- */
66
13
  resolveMiddleware(clientStack, configuration, options) {
67
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
68
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,102 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
- /**
9
- * <p>Creates a global table from an existing table. A global table creates a replication
10
- * relationship between two or more DynamoDB tables with the same table name in the
11
- * provided Regions. </p>
12
- * <note>
13
- * <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p>
14
- * </note>
15
- *
16
- * <p>If you want to add a new replica table to a global table, each of the following conditions
17
- * must be true:</p>
18
- * <ul>
19
- * <li>
20
- * <p>The table must have the same primary key as all of the other replicas.</p>
21
- * </li>
22
- * <li>
23
- * <p>The table must have the same name as all of the other replicas.</p>
24
- * </li>
25
- * <li>
26
- * <p>The table must have DynamoDB Streams enabled, with the stream containing both the new and the old
27
- * images of the item.</p>
28
- * </li>
29
- * <li>
30
- * <p>None of the replica tables in the global table can contain any data.</p>
31
- * </li>
32
- * </ul>
33
- * <p>
34
- * If global secondary indexes are specified, then the following conditions must also be met:
35
- * </p>
36
- * <ul>
37
- * <li>
38
- * <p>
39
- * The global secondary indexes must have the same name.
40
- * </p>
41
- * </li>
42
- * <li>
43
- * <p>
44
- * The global secondary indexes must have the same hash key and sort key (if present).
45
- * </p>
46
- * </li>
47
- * </ul>
48
- * <p>
49
- * If local secondary indexes are specified, then the following conditions must also be met:
50
- * </p>
51
- * <ul>
52
- * <li>
53
- * <p>
54
- * The local secondary indexes must have the same name.
55
- * </p>
56
- * </li>
57
- * <li>
58
- * <p>
59
- * The local secondary indexes must have the same hash key and sort key (if present).
60
- * </p>
61
- * </li>
62
- * </ul>
63
- *
64
- * <important>
65
- * <p>
66
- * Write capacity settings should be set consistently across your replica tables and
67
- * secondary indexes. DynamoDB strongly recommends enabling auto scaling to manage the write
68
- * capacity settings for all of your global tables replicas and indexes.
69
- * </p>
70
- * <p>
71
- * If you prefer to manage write capacity settings manually, you should provision equal
72
- * replicated write capacity units to your replica tables. You should also provision
73
- * equal replicated write capacity units to matching secondary indexes across
74
- * your global table.
75
- * </p>
76
- * </important>
77
- * @example
78
- * Use a bare-bones client and the command you need to make an API call.
79
- * ```javascript
80
- * import { DynamoDBClient, CreateGlobalTableCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
81
- * // const { DynamoDBClient, CreateGlobalTableCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
82
- * const client = new DynamoDBClient(config);
83
- * const command = new CreateGlobalTableCommand(input);
84
- * const response = await client.send(command);
85
- * ```
86
- *
87
- * @see {@link CreateGlobalTableCommandInput} for command's `input` shape.
88
- * @see {@link CreateGlobalTableCommandOutput} for command's `response` shape.
89
- * @see {@link DynamoDBClientResolvedConfig | config} for command's `input` shape.
90
- *
91
- */
92
8
  class CreateGlobalTableCommand extends smithy_client_1.Command {
93
- // Start section: command_properties
94
- // End section: command_properties
95
9
  constructor(input) {
96
- // Start section: command_constructor
97
10
  super();
98
11
  this.input = input;
99
- // End section: command_constructor
100
12
  }
101
- /**
102
- * @internal
103
- */
104
13
  resolveMiddleware(clientStack, configuration, options) {
105
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
106
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,47 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
- /**
9
- * <p>The <code>CreateTable</code> operation adds a new table to your account. In an AWS
10
- * account, table names must be unique within each Region. That is, you can have two tables
11
- * with same name if you create the tables in different Regions.</p>
12
- * <p>
13
- * <code>CreateTable</code> is an asynchronous operation. Upon receiving a <code>CreateTable</code> request,
14
- * DynamoDB immediately returns a response with a <code>TableStatus</code> of <code>CREATING</code>. After
15
- * the table is created, DynamoDB sets the <code>TableStatus</code> to <code>ACTIVE</code>. You can
16
- * perform read and write operations only on an <code>ACTIVE</code> table. </p>
17
- * <p>You can optionally define secondary indexes on the new table, as part of the <code>CreateTable</code>
18
- * operation. If you want to create multiple tables with secondary indexes on them, you must create the
19
- * tables sequentially. Only one table with secondary indexes can be in the <code>CREATING</code> state at
20
- * any given time.</p>
21
- * <p>You can use the <code>DescribeTable</code> action to check the table status.</p>
22
- * @example
23
- * Use a bare-bones client and the command you need to make an API call.
24
- * ```javascript
25
- * import { DynamoDBClient, CreateTableCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
26
- * // const { DynamoDBClient, CreateTableCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
27
- * const client = new DynamoDBClient(config);
28
- * const command = new CreateTableCommand(input);
29
- * const response = await client.send(command);
30
- * ```
31
- *
32
- * @see {@link CreateTableCommandInput} for command's `input` shape.
33
- * @see {@link CreateTableCommandOutput} for command's `response` shape.
34
- * @see {@link DynamoDBClientResolvedConfig | config} for command's `input` shape.
35
- *
36
- */
37
8
  class CreateTableCommand extends smithy_client_1.Command {
38
- // Start section: command_properties
39
- // End section: command_properties
40
9
  constructor(input) {
41
- // Start section: command_constructor
42
10
  super();
43
11
  this.input = input;
44
- // End section: command_constructor
45
12
  }
46
- /**
47
- * @internal
48
- */
49
13
  resolveMiddleware(clientStack, configuration, options) {
50
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
51
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,36 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
- /**
9
- * <p>Deletes an existing backup of a table.</p>
10
- * <p>You can call <code>DeleteBackup</code> at a maximum rate of 10 times per second.</p>
11
- * @example
12
- * Use a bare-bones client and the command you need to make an API call.
13
- * ```javascript
14
- * import { DynamoDBClient, DeleteBackupCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
15
- * // const { DynamoDBClient, DeleteBackupCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
16
- * const client = new DynamoDBClient(config);
17
- * const command = new DeleteBackupCommand(input);
18
- * const response = await client.send(command);
19
- * ```
20
- *
21
- * @see {@link DeleteBackupCommandInput} for command's `input` shape.
22
- * @see {@link DeleteBackupCommandOutput} for command's `response` shape.
23
- * @see {@link DynamoDBClientResolvedConfig | config} for command's `input` shape.
24
- *
25
- */
26
8
  class DeleteBackupCommand extends smithy_client_1.Command {
27
- // Start section: command_properties
28
- // End section: command_properties
29
9
  constructor(input) {
30
- // Start section: command_constructor
31
10
  super();
32
11
  this.input = input;
33
- // End section: command_constructor
34
12
  }
35
- /**
36
- * @internal
37
- */
38
13
  resolveMiddleware(clientStack, configuration, options) {
39
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
40
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,40 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
8
- /**
9
- * <p>Deletes a single item in a table by primary key. You can perform a conditional delete operation that deletes the item if it exists, or if it has an expected attribute value.</p>
10
- * <p>In addition to deleting an item, you can also return the item's attribute values in the same
11
- * operation, using the <code>ReturnValues</code> parameter.</p>
12
- * <p>Unless you specify conditions, the <code>DeleteItem</code> is an idempotent operation; running it
13
- * multiple times on the same item or attribute does <i>not</i> result in an error response.</p>
14
- * <p>Conditional deletes are useful for deleting items only if specific conditions are met. If those conditions are met, DynamoDB performs the delete. Otherwise, the item is not deleted.</p>
15
- * @example
16
- * Use a bare-bones client and the command you need to make an API call.
17
- * ```javascript
18
- * import { DynamoDBClient, DeleteItemCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
19
- * // const { DynamoDBClient, DeleteItemCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
20
- * const client = new DynamoDBClient(config);
21
- * const command = new DeleteItemCommand(input);
22
- * const response = await client.send(command);
23
- * ```
24
- *
25
- * @see {@link DeleteItemCommandInput} for command's `input` shape.
26
- * @see {@link DeleteItemCommandOutput} for command's `response` shape.
27
- * @see {@link DynamoDBClientResolvedConfig | config} for command's `input` shape.
28
- *
29
- */
30
8
  class DeleteItemCommand extends smithy_client_1.Command {
31
- // Start section: command_properties
32
- // End section: command_properties
33
9
  constructor(input) {
34
- // Start section: command_constructor
35
10
  super();
36
11
  this.input = input;
37
- // End section: command_constructor
38
12
  }
39
- /**
40
- * @internal
41
- */
42
13
  resolveMiddleware(clientStack, configuration, options) {
43
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
44
15
  const stack = clientStack.concat(this.middlewareStack);